Buggy code:
, new int [ ] { OS . Key_OemSemicolon , ';' } , new int [ ] { OS . Key_Oem7 , '\'' } , new int [ ] { OS . Key_OemComma , ',' } , new int [ ] { OS . Key_OemPeriod , '.' } , new int [ ] { OS . Key_Oem2 , '//' } } ; static Display Default ; static Display [ ] Displays = new Display [ 4 ] ; static Monitor [ ] monitors = null ; static int monitorCount = 0 ; Shell [ ] modalShells ; static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets." ; static void setDevice ( Device device ) { } public Display ( ) { } public Display ( DeviceData data ) { } Control _getFocusControl ( ) { } void addWidget ( int handle , Widget widget ) { } public void addFilter ( int eventType , Listener listener ) { } void addInvalidate ( Control control ) { } public void addListener ( int eventType , Listener listener ) { } void addPopup ( Menu menu ) { } void addShell ( Shell shell ) { } public void asyncExec ( Runnable runnable ) { } public void beep ( ) { } protected void checkSubclass ( ) { } protected void checkDevice ( ) { } static void checkDisplay ( Thread thread , boolean multiple ) { } void clearModal ( Shell shell ) { } public void close ( ) { } protected void create ( DeviceData data ) { } void createDisplay ( DeviceData data ) { } static void deregister ( Display display ) { } protected void destroy ( ) { } void destroyDisplay ( ) { } public void disposeExec ( Runnable runnable ) { } void error ( int code ) { } boolean filterEvent ( Event event ) { } boolean filters ( int eventType ) { } public Widget findWidget ( int handle ) { } public Widget findWidget ( int handle , int id ) { } public Widget findWidget ( Widget widget , int id ) { } public static Display findDisplay ( Thread thread ) { } public Shell getActiveShell ( ) { } public Rectangle getBounds ( ) { } public static Display getCurrent ( ) { } public Rectangle getClientArea ( ) { } Widget getWidget ( int handle ) { } public Control getCursorControl ( ) { } public Point getCursorLocation ( ) { } public Point [ ] getCursorSizes ( ) { } public static Display getDefault ( ) { } static boolean isValidClass ( Class clazz ) { } public Object getData ( String key ) { } public Object getData ( ) { } public int getDismissalAlignment ( ) { } public int getDoubleClickTime ( ) { } public Control getFocusControl ( ) { } public boolean getHighContrast ( ) { } public int getIconDepth ( ) { } public Point [ ] getIconSizes ( ) { } int getLastEventTime ( ) { } int getMessageCount ( ) { } Shell getModalShell ( ) { } 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 ) { } public Tray getSystemTray ( ) { } public Thread getThread ( ) { } public int internal_new_GC ( GCData data ) { } protected void init ( ) { } void invalidateHandler ( ) { } void HandleDispatcherInactive ( int sender , int e ) { } void HandleOperationCompleted ( int sender , int e ) { } void HandleOperationPosted ( int sender , int e ) { } public void internal_dispose_GC ( int dc , 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 ) { } public Rectangle map ( Control from , Control to , int x , int y , int width , int height ) { } public boolean post ( Event event ) { } void postEvent ( Event event ) { } void removePopup ( Menu menu ) { } void removeShell ( Shell shell ) { } public boolean readAndDispatch ( ) { checkDevice ( ) ; runPopups ( ) ; idle = false ; int handler = OS . gcnew_NoArgsDelegate ( jniRef , "setIdleHandler" ) ; operation = OS . Dispatcher_BeginInvoke ( dispatcher , 2 , handler ) ; OS . DispatcherOperation_Wait ( operation ) ; OS . GCHandle_Free ( handler ) ; OS . GCHandle_Free ( operation ) ; operation = 0 ; if ( ! ( idle ) ) { runDeferredEvents ( ) ; return true ; } <START_BUG> return runAsyncMessages ( false ) ; <END_BUG> } static void register ( Display display ) { } protected void release ( ) { } void releaseDisplay ( ) { } public void removeFilter ( int eventType , Listener listener ) { } public void removeListener ( int eventType , Listener listener ) { } Widget removeWidget ( int handle ) { } boolean runAsyncMessages ( boolean all ) { } boolean runDeferredEvents ( ) { } boolean runPopups ( ) { } void runSettings ( ) { } void saveResources ( ) { } void sendEvent ( int eventType , Event event ) { } public void setCursorLocation ( int x , int y ) { } public void setCursorLocation ( Point point ) { } public void setData ( String key , Object value ) { } public void setData ( Object data ) { } public static void setAppName ( String name ) { } void setIdleHandler ( ) { } void setModalShell ( Shell shell ) { } public void setSynchronizer ( Synchronizer synchronizer ) { } public boolean sleep ( ) { } void sleep_noop ( ) { }

Fix:
return ( isDisposed ( ) ) || ( runAsyncMessages ( false ) ) ;