Buggy code:
public int getDoubleClickTime ( ) { } public Control getFocusControl ( ) { } public boolean getHighContrast ( ) { } public int getDepth ( ) { } public int getIconDepth ( ) { } public Point [ ] getIconSizes ( ) { } int getLastEventTime ( ) { } int getMessageCount ( ) { } Dialog getModalDialog ( ) { } Rectangle getWorkArea ( ) { } public Monitor [ ] getMonitors ( ) { } public Monitor getPrimaryMonitor ( ) { } public Shell [ ] getShells ( ) { } public Synchronizer getSynchronizer ( ) { } public Thread getSyncThread ( ) { } public Color getSystemColor ( int id ) { } public Cursor getSystemCursor ( int id ) { } public Image getSystemImage ( int id ) { } void initializeSystemColors ( ) { } public Font getSystemFont ( ) { } public Tray getSystemTray ( ) { } public Thread getThread ( ) { } Widget getWidget ( int handle ) { } int idleProc ( int data ) { } protected void init ( ) { } void initializeCallbacks ( ) { } void initializeSubclasses ( ) { } void initializeSystemSettings ( ) { } void initializeWidgetTable ( ) { } void initializeWindowManager ( ) { } public void internal_dispose_GC ( int gdkGC , GCData data ) { } public int internal_new_GC ( GCData data ) { } boolean isValidThread ( ) { } public Point map ( Control from , Control to , Point point ) { } public Point map ( Control from , Control to , int x , int y ) { } public Rectangle map ( Control from , Control to , Rectangle rectangle ) { } static char mbcsToWcs ( char ch ) { } int menuPositionProc ( int menu , int x , int y , int push_in , int user_data ) { } public Rectangle map ( Control from , Control to , int x , int y , int width , int height ) { } int mouseHoverProc ( int handle ) { } int pangoLayoutNewProc ( int type , int n_construct_properties , int construct_properties ) { } public boolean post ( Event event ) { } void postEvent ( Event event ) { } void putGdkEvents ( ) { } public boolean readAndDispatch ( ) { } static void register ( Display display ) { } protected void release ( ) { } void releaseDisplay ( ) { } public void removeFilter ( int eventType , Listener listener ) { } int removeGdkEvent ( ) { } void removeIdleProc ( ) { } public void removeListener ( int eventType , Listener listener ) { } void removeMouseHoverTimeout ( int handle ) { } void removePopup ( Menu menu ) { } Widget removeWidget ( int handle ) { } boolean runAsyncMessages ( boolean all ) { } boolean runDeferredEvents ( ) { } boolean runPopups ( ) { } boolean runSettings ( ) { } public static void setAppName ( String name ) { } public void setCursorLocation ( int x , int y ) { } public void setCursorLocation ( Point point ) { } public void setData ( String key , Object value ) { checkDevice ( ) ; if ( key == null ) error ( ERROR_NULL_ARGUMENT ) ; if ( key . equals ( Display . DISPATCH_EVENT_KEY ) ) { if ( ( value == null ) || ( value instanceof int [ ] ) ) { dispatchEvents = ( ( int [ ] ) ( value ) ) ; if ( value == null ) putGdkEvents ( ) ; return ; } } if ( key . equals ( Display . SET_MODAL_DIALOG ) ) { <START_BUG> setModalDialog ( ( ( Dialog ) ( data ) ) ) ; <END_BUG> return ; } if ( key . equals ( Display . ADD_WIDGET_KEY ) ) { Object [ ] data = ( ( Object [ ] ) ( value ) ) ; int handle = ( ( LONG ) ( data [ 0 ] ) ) . value ; Widget widget = ( ( Widget ) ( data [ 1 ] ) ) ; if ( widget != null ) { addWidget ( handle , widget ) ; } else { removeWidget ( handle ) ; } } if ( key . equals ( Display . ADD_IDLE_PROC_KEY ) ) { addIdleProc ( ) ; return ; } if ( key . equals ( Display . REMOVE_IDLE_PROC_KEY ) ) { removeIdleProc ( ) ; return ; } if ( value == null ) { if ( ( keys ) == null ) return ; int index = 0 ; while ( ( index < ( keys . length ) ) && ( ! ( keys [ index ] . equals ( key ) ) ) ) index ++ ; if ( index == ( keys . length ) ) return ; if ( ( keys . length ) == 1 ) { keys = null ; values = null ; } else { String [ ] newKeys = new String [ ( keys . length ) - 1 ] ; Object [ ] newValues = new Object [ ( values . length ) - 1 ] ; System . arraycopy ( keys , 0 , newKeys , 0 , index ) ; System . arraycopy ( keys , ( index + 1 ) , newKeys , index , ( ( newKeys . length ) - index ) ) ; System . arraycopy ( values , 0 , newValues , 0 , index ) ; System . arraycopy ( values , ( index + 1 ) , newValues , index , ( ( newValues . length ) - index ) ) ; keys = newKeys ; values = newValues ; } return ; } if ( ( keys ) == null ) { keys = new String [ ] { key }

Fix:
setModalDialog ( ( ( Dialog ) ( value ) ) ) ;