Buggy code:
static final byte [ ] SWT_OBJECT = new byte [ ] { 'S' , 'W' , 'T' , '_' , 'O' , 'B' , 'J' , 'E' , 'C' , 'T' , '' } ; 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 ) { } public boolean back ( ) { } static int browserProc ( int id , int sel , int arg0 ) { } static int browserProc ( int id , int sel , int arg0 , int arg1 ) { } static int browserProc ( int id , int sel , int arg0 , int arg1 , int arg2 ) { } static int browserProc ( int id , int sel , int arg0 , int arg1 , int arg2 , int arg3 ) { } static int browserProc ( int id , int sel , int arg0 , int arg1 , int arg2 , int arg3 , int arg4 ) { } static boolean isSelectorExcludedFromWebScript ( int aSelector ) { } static int webScriptNameForSelector ( int aSelector ) { } public boolean execute ( String script ) { } public boolean forward ( ) { } public String getBrowserType ( ) { } public String getText ( ) { } public String getUrl ( ) { } public boolean isBackEnabled ( ) { } public boolean isForwardEnabled ( ) { } public void refresh ( ) { } public boolean setText ( String html ) { } void _setText ( String html ) { } public boolean setUrl ( String url ) { } public void stop ( ) { } void webView_didChangeLocationWithinPageForFrame ( int sender , int frameID ) { } void webView_didFailProvisionalLoadWithError_forFrame ( int sender , int error , int frame ) { } void webView_didFinishLoadForFrame ( int sender , int frameID ) { } void hookDOMKeyListeners ( int frameID ) { } void hookDOMMouseListeners ( int frameID ) { } void webView_didReceiveTitle_forFrame ( int sender , int titleID , int frameID ) { } void webView_didStartProvisionalLoadForFrame ( int sender , int frameID ) { } void webView_didCommitLoadForFrame ( int sender , int frameID ) { } void webView_windowScriptObjectAvailable ( int webView , int windowScriptObject ) { } void webView_resource_didFinishLoadingFromDataSource ( int sender , int identifier , int dataSource ) { } void webView_resource_didFailLoadingWithError_fromDataSource ( int sender , int identifier , int error , int dataSource ) { } void webView_resource_didReceiveAuthenticationChallenge_fromDataSource ( int sender , int identifier , int challenge , int dataSource ) { } boolean showAuthenticationDialog ( final String [ ] user , final String [ ] password , String host , String realm ) { } int webView_identifierForInitialRequest_fromDataSource ( int sender , int request , int dataSourceID ) { } int webView_resource_willSendRequest_redirectResponse_fromDataSource ( int sender , int identifier , int request , int redirectResponse , int dataSource ) { } int webView_createWebViewWithRequest ( int sender , int request ) { WindowEvent newEvent = new WindowEvent ( browser ) ; newEvent . display = browser . getDisplay ( ) ; newEvent . widget = browser ; newEvent . required = true ; if ( ( openWindowListeners ) != null ) { for ( int i = 0 ; i < ( openWindowListeners . length ) ; i ++ ) { openWindowListeners [ i ] . open ( newEvent ) ; } } WebView result = null ; Browser browser = null ; if ( ( ( newEvent . browser ) != null ) && ( ( newEvent . browser . webBrowser ) instanceof Safari ) ) { browser = newEvent . browser ; } if ( ( browser != null ) && ( ! ( browser . isDisposed ( ) ) ) ) { result = ( ( Safari ) ( browser . webBrowser ) ) . webView ; if ( request != 0 ) { <START_BUG> WebFrame mainFrame = webView . mainFrame ( ) ; <END_BUG> mainFrame . loadRequest ( new NSURLRequest ( request ) ) ; } } return result != null ? result . id : 0 ; } void webViewShow ( int sender ) { } void webView_setFrame ( int sender , int frame ) { } void webViewFocus ( int sender ) { } void webViewUnfocus ( int sender ) { } void webView_runJavaScriptAlertPanelWithMessage ( int sender , int messageID ) { } int webView_runJavaScriptConfirmPanelWithMessage ( int sender , int messageID ) { } void webView_runOpenPanelForFileButtonWithResultListener ( int sender , int resultListenerID ) { } void webViewClose ( int sender ) { } int webView_contextMenuItemsForElement_defaultMenuItems ( int sender , int element , int defaultMenuItems ) { } void webView_setStatusBarVisible ( int sender , boolean visible ) { } void webView_setStatusText ( int sender , int textID ) { } void webView_setResizable ( int sender , boolean visible ) { } void webView_setToolbarsVisible ( int sender , boolean visible ) { } void webView_mouseDidMoveOverElement_modifierFlags ( int sender , int elementInformationID , int modifierFlags ) { } void webView_printFrameView ( int sender , int frameViewID ) { } void webView_decidePolicyForMIMEType_request_frame_decisionListener ( int sender , int type , int request , int frame , int listenerID ) { } void webView_decidePolicyForNavigationAction_request_frame_decisionListener ( int sender , int actionInformation , int request , int frame , int listenerID ) { } void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener ( int sender , int actionInformation , int request , int frameName , int listenerID ) { } void webView_unableToImplementPolicyWithError_frame ( int sender , int error , int frame ) { } void download_decideDestinationWithSuggestedFilename ( int downloadId , int filename ) { } void handleEvent ( int evtId ) { } Object convertToJava ( int value ) { } NSObject convertToJS ( Object value ) { } NSObject callJava ( int index , int args , int arg1 ) { }

Fix:
WebFrame mainFrame = result . mainFrame ( ) ;