Buggy code:
class Safari extends WebBrowser { WebView webView ; SWTWebViewDelegate delegate ; int jniRef ; boolean changingLocation ; String lastHoveredLinkURL ; String html ; int identifier ; int resourceCount ; String url = "" ; Point location ; Point size ; boolean statusBar = true ; boolean toolBar = true ; boolean ignoreDispose ; int lastMouseMoveX ; int lastMouseMoveY ; static boolean Initialized ; static Callback Callback2 ; static Callback Callback3 ; static Callback Callback4 ; static Callback Callback5 ; static Callback Callback6 ; static Callback Callback7 ; static final int MIN_SIZE = 16 ; static final int MAX_PROGRESS = 100 ; static final String WebElementLinkURLKey = "WebElementLinkURL" ; static final String AGENT_STRING = "Safari//unknown" ; static final String URI_FROMMEMORY = "file://////" ; static final String PROTOCOL_FILE = "file:" ; static final String PROTOCOL_HTTP = "http:" ; static final String ABOUT_BLANK = "about:blank" ; static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix" ; static final String DOMEVENT_KEYUP = "keyup" ; static final String DOMEVENT_KEYDOWN = "keydown" ; static final String DOMEVENT_MOUSEDOWN = "mousedown" ; static final String DOMEVENT_MOUSEUP = "mouseup" ; static final String DOMEVENT_MOUSEMOVE = "mousemove" ; static final String DOMEVENT_MOUSEWHEEL = "mousewheel" ; public void create ( Composite parent , int style ) { String className = "SWTWebViewDelegate" ; if ( ( OS . objc_lookUpClass ( className ) ) == 0 ) { Class safaryClass = this . getClass ( ) ; Safari . Callback2 = new Callback ( safaryClass , "browserProc" , 2 ) ; int proc2 = Safari . Callback2 . getAddress ( ) ; if ( proc2 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; Safari . Callback3 = new Callback ( safaryClass , "browserProc" , 3 ) ; int proc3 = Safari . Callback3 . getAddress ( ) ; if ( proc3 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; Safari . Callback4 = new Callback ( safaryClass , "browserProc" , 4 ) ; int proc4 = Safari . Callback4 . getAddress ( ) ; if ( proc4 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; Safari . Callback5 = new Callback ( safaryClass , "browserProc" , 5 ) ; int proc5 = Safari . Callback5 . getAddress ( ) ; if ( proc5 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; Safari . Callback6 = new Callback ( safaryClass , "browserProc" , 6 ) ; int proc6 = Safari . Callback6 . getAddress ( ) ; if ( proc6 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; Safari . Callback7 = new Callback ( safaryClass , "browserProc" , 7 ) ; int proc7 = Safari . Callback7 . getAddress ( ) ; if ( proc7 == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; <START_BUG> int cls = OS . objc_allocateClassPair ( class_WebView , className , 0 ) ; <END_BUG> OS . class_addIvar ( cls , "tag" , PTR_SIZEOF , ( ( byte ) ( ( Math . log ( PTR_SIZEOF ) ) // ( Math . log ( 2 ) ) ) ) , "i" ) ; OS . class_addMethod ( cls , sel_tag , proc2 , "@:" ) ; OS . class_addMethod ( cls , sel_setTag_1 , proc3 , "@:i" ) ; OS . class_addMethod ( cls , sel_webView_1didChangeLocationWithinPageForFrame_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1didFailProvisionalLoadWithError_1forFrame_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_webView_1didFinishLoadForFrame_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1didReceiveTitle_1forFrame_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_webView_1didStartProvisionalLoadForFrame_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1didCommitLoadForFrame_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1resource_1didFinishLoadingFromDataSource_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_webView_1resource_1didFailLoadingWithError_1fromDataSource_1 , proc6 , "@:@@@@" ) ; OS . class_addMethod ( cls , sel_webView_1identifierForInitialRequest_1fromDataSource_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_webView_1resource_1willSendRequest_1redirectResponse_1fromDataSource_1 , proc7 , "@:@@@@@" ) ; OS . class_addMethod ( cls , sel_handleNotification_1 , proc3 , "@:@" ) ; OS . class_addMethod ( cls , sel_webView_1createWebViewWithRequest_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webViewShow_1 , proc3 , "@:@" ) ; OS . class_addMethod ( cls , sel_webView_1setFrame_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webViewClose_1 , proc3 , "@:@" ) ; OS . class_addMethod ( cls , sel_webView_1contextMenuItemsForElement_1defaultMenuItems_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_webView_1setStatusBarVisible_1 , proc4 , "@:@B" ) ; OS . class_addMethod ( cls , sel_webView_1setResizable_1 , proc4 , "@:@B" ) ; OS . class_addMethod ( cls , sel_webView_1setToolbarsVisible_1 , proc4 , "@:@B" ) ; OS . class_addMethod ( cls , sel_webView_1setStatusText_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webViewFocus_1 , proc3 , "@:@" ) ; OS . class_addMethod ( cls , sel_webViewUnfocus_1 , proc3 , "@:@" ) ; OS . class_addMethod ( cls , sel_webView_1runJavaScriptAlertPanelWithMessage_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1runJavaScriptConfirmPanelWithMessage_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1runOpenPanelForFileButtonWithResultListener_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1mouseDidMoveOverElement_1modifierFlags_1 , proc5 , "@:@@I" ) ; OS . class_addMethod ( cls , sel_webView_1printFrameView_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_webView_1decidePolicyForMIMEType_1request_1frame_1decisionListener_1 , proc7 , "@:@@@@@" ) ; OS . class_addMethod ( cls , sel_webView_1decidePolicyForNavigationAction_1request_1frame_1decisionListener_1 , proc7 , "@:@@@@@" ) ; OS . class_addMethod ( cls , sel_webView_1decidePolicyForNewWindowAction_1request_1newFrameName_1decisionListener_1 , proc7 , "@:@@@@@" ) ; OS . class_addMethod ( cls , sel_webView_1unableToImplementPolicyWithError_1frame_1 , proc5 , "@:@@@" ) ; OS . class_addMethod ( cls , sel_download_1decideDestinationWithSuggestedFilename_1 , proc4 , "@:@@" ) ; OS . class_addMethod ( cls , sel_handleEvent_1 , proc3 , "@:@" ) ; OS . objc_registerClassPair ( cls ) ; } browser . setData ( Safari . SAFARI_EVENTS_FIX_KEY ) ;

Fix:
int cls = OS . objc_allocateClassPair ( class_NSObject , className , 0 ) ;