Buggy code:
class Safari extends WebBrowser { int delegate ; int webViewHandle ; int windowBoundsHandler ; boolean changingLocation ; String lastHoveredLinkURL ; String html ; int identifier ; int resourceCount ; String url = "" ; Point location ; Point size ; boolean statusBar = true ; boolean toolBar = true ; boolean ignoreDispose ; static boolean Initialized ; static Callback Callback3 ; static Callback Callback7 ; static final int MIN_SIZE = 16 ; static final int MAX_PROGRESS = 100 ; static final String WebElementLinkURLKey = "WebElementLinkURL" ; static final String URI_FROMMEMORY = "file://////" ; static final String ABOUT_BLANK = "about:blank" ; static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget" ; static final String BROWSER_WINDOW = "org.eclipse.swt.browser.Browser.Window" ; public void create ( Composite parent , int style ) { } static int eventProc3 ( int nextHandler , int theEvent , int userData ) { } static int eventProc7 ( int webview , int userData , int selector , int arg0 , int arg1 , int arg2 , int arg3 ) { } public boolean back ( ) { } public boolean execute ( String script ) { } public boolean forward ( ) { } public String getText ( ) { } public String getUrl ( ) { } int handleCallback ( int nextHandler , int theEvent ) { } int handleCallback ( int selector , int arg0 , int arg1 , int arg2 , int arg3 ) { } 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 didFailProvisionalLoadWithError ( int error , int frame ) { } void didFinishLoadForFrame ( int frame ) { } void didReceiveTitle ( int title , int frame ) { } void didStartProvisionalLoadForFrame ( int frame ) { } void didCommitLoadForFrame ( int frame ) { } void didFinishLoadingFromDataSource ( int identifier , int dataSource ) { } void didFailLoadingWithError ( int identifier , int error , int dataSource ) { } int identifierForInitialRequest ( int request , int dataSource ) { } int willSendRequest ( int identifier , int request , int redirectResponse , int dataSource ) { } void handleNotification ( int notification ) { } int createWebViewWithRequest ( int request ) { } void webViewShow ( int sender ) { } void setFrame ( int frame ) { } void webViewFocus ( ) { } void webViewUnfocus ( ) { } void runJavaScriptAlertPanelWithMessage ( int message ) { } int runJavaScriptConfirmPanelWithMessage ( int message ) { } void runOpenPanelForFileButtonWithResultListener ( int resultListener ) { } void webViewClose ( ) { } int contextMenuItemsForElement ( int element , int defaultMenuItems ) { } void setStatusBarVisible ( int visible ) { } void setStatusText ( int text ) { } void setResizable ( int visible ) { } void setToolbarsVisible ( int visible ) { } void mouseDidMoveOverElement ( int elementInformation , int modifierFlags ) { } void decidePolicyForMIMEType ( int type , int request , int frame , int listener ) { } void decidePolicyForNavigationAction ( int actionInformation , int request , int frame , int listener ) { } void decidePolicyForNewWindowAction ( int actionInformation , int request , int frameName , int listener ) { } void unableToImplementPolicyWithError ( int error , int frame ) { } void decideDestinationWithSuggestedFilename ( int download , int filename ) { int length = OS . CFStringGetLength ( filename ) ; char [ ] buffer = new char [ length ] ; CFRange range = new CFRange ( ) ; range . length = length ; OS . CFStringGetCharacters ( filename , range , buffer ) ; String name = new String ( buffer ) ; FileDialog dialog = new FileDialog ( browser . getShell ( ) , SWT . SAVE ) ; dialog . setText ( SWT . getMessage ( "SWT_FileDownload" ) ) ; dialog . setFileName ( name ) ; String path = dialog . open ( ) ; if ( path == null ) { <START_BUG> Cocoa . objc_msgSend ( download , S_release ) ; <END_BUG> return ; } length = path . length ( ) ; char [ ] chars = new char [ length ] ; path . getChars ( 0 , length , chars , 0 ) ; int result = OS . CFStringCreateWithCharacters ( 0 , chars , length ) ; Cocoa . objc_msgSend ( download , S_setDestinationAllowOverwrite , result , 1 ) ; OS . CFRelease ( result ) ; } }

Fix:
Cocoa . objc_msgSend ( download , S_cancel ) ;