Buggy code:
} } } return 0 ; } case OS . WM_ACTIVATEAPP : { if ( wParam != 0 ) { if ( ! ( isXMouseActive ( ) ) ) { int hwndActive = OS . GetActiveWindow ( ) ; if ( ( hwndActive != 0 ) && ( OS . IsWindowEnabled ( hwndActive ) ) ) break ; Shell modal = ( ( modalDialog ) != null ) ? modalDialog . parent : getModalShell ( ) ; if ( ( modal != null ) && ( ! ( modal . isDisposed ( ) ) ) ) { int hwndModal = modal . handle ; if ( OS . IsWindowEnabled ( hwndModal ) ) { modal . bringToTop ( ) ; if ( modal . isDisposed ( ) ) break ; } int hwndPopup = OS . GetLastActivePopup ( hwndModal ) ; if ( ( hwndPopup != 0 ) && ( hwndPopup != ( modal . handle ) ) ) { if ( ( getControl ( hwndPopup ) ) == null ) { if ( OS . IsWindowEnabled ( hwndPopup ) ) { OS . SetActiveWindow ( hwndPopup ) ; } } } } } } break ; } case OS . WM_ENDSESSION : { if ( wParam != 0 ) { dispose ( ) ; } break ; } case OS . WM_QUERYENDSESSION : { Event event = new Event ( ) ; sendEvent ( Close , event ) ; if ( ! ( event . doit ) ) return 0 ; break ; } case OS . WM_DWMCOLORIZATIONCOLORCHANGED : { sendSettings = true ; } case OS . WM_SETTINGCHANGE : { if ( ( lastHighContrast ) != ( getHighContrast ( ) ) ) { sendSettings = true ; lastHighContrast = getHighContrast ( ) ; } if ( ( ! ( OS . IsWinCE ) ) && ( ( OS . WIN32_VERSION ) >= ( OS . VERSION ( 6 , 0 ) ) ) ) { sendSettings = true ; } switch ( ( ( int ) ( wParam ) ) ) { case 0 : case 1 : case OS . SPI_SETHIGHCONTRAST : { sendSettings = true ; lastHighContrast = getHighContrast ( ) ; } } if ( sendSettings ) { OS . SetTimer ( hwndMessage , Display . SETTINGS_ID , Display . SETTINGS_DELAY , 0 ) ; } break ; } case OS . WM_THEMECHANGED : { if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { if ( ( hButtonTheme ) != 0 ) OS . CloseThemeData ( hButtonTheme ) ; if ( ( hEditTheme ) != 0 ) OS . CloseThemeData ( hEditTheme ) ; if ( ( hExplorerBarTheme ) != 0 ) OS . CloseThemeData ( hExplorerBarTheme ) ; if ( ( hScrollBarTheme ) != 0 ) OS . CloseThemeData ( hScrollBarTheme ) ; if ( ( hTabTheme ) != 0 ) OS . CloseThemeData ( hTabTheme ) ; hButtonTheme = hEditTheme = hExplorerBarTheme = hScrollBarTheme = hTabTheme = 0 ; } break ; } case OS . WM_TIMER : { if ( wParam == ( Display . SETTINGS_ID ) ) { sendSettings = false ; OS . KillTimer ( hwndMessage , Display . SETTINGS_ID ) ; runSettings ( ) ; } else { runTimer ( wParam ) ; } break ; } default : { if ( ( ( int ) ( msg ) ) == ( Display . SWT_TASKBARCREATED ) ) { if ( ( tray ) != null ) { TrayItem [ ] items = tray . items ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { TrayItem item = items [ i ] ; if ( item != null ) item . recreate ( ) ; } } } if ( ( ( int ) ( msg ) ) == ( Display . SWT_OPENDOC ) ) { String filename = getSharedData ( ( ( int ) ( wParam ) ) , ( ( int ) ( lParam ) ) ) ; if ( filename != null ) { Event event = new Event ( ) ; event . text = filename ; <START_BUG> sendEvent ( OpenDoc , event ) ; <END_BUG> } } } } return OS . DefWindowProc ( hwnd , ( ( int ) ( msg ) ) , wParam , lParam ) ; } String getSharedData ( int pid , int handle ) { } int monitorEnumProc ( int hmonitor , int hdc , int lprcMonitor , int dwData ) { } int msgFilterProc ( int code , int wParam , int lParam ) { } int numpadKey ( int key ) { } public boolean post ( Event event ) { } void postEvent ( Event event ) { } public boolean readAndDispatch ( ) { } static void register ( Display display ) { } protected void release ( ) { } void releaseDisplay ( ) { } void releaseImageList ( ImageList list ) { } void releaseToolImageList ( ImageList list ) { } void releaseToolHotImageList ( ImageList list ) { } void releaseToolDisabledImageList ( ImageList list ) { } public void removeFilter ( int eventType , Listener listener ) { } public void removeListener ( int eventType , Listener listener ) { } void removeBar ( Menu menu ) { } Control removeControl ( int handle ) { } void removeMenuItem ( MenuItem item ) { } void removePopup ( Menu menu ) { } boolean runAsyncMessages ( boolean all ) { } boolean runDeferredEvents ( ) { } boolean runDeferredLayouts ( ) { } boolean runPopups ( ) { } void runSettings ( ) { } boolean runSkin ( ) { } boolean runTimer ( int id ) { } void saveResources ( ) { } void sendEvent ( int eventType , Event event ) { } public void setCursorLocation ( int x , int y ) { } public void setCursorLocation ( Point point ) { }

Fix:
sendEvent ( OpenDocument , event ) ;