Buggy code:
private WorkbenchAdvisor advisor ; private WorkbenchConfigurer workbenchConfigurer ; private ExtensionEventHandler extensionEventHandler ; private int largeUpdates = 0 ; private final ServiceLocator serviceLocator = new ServiceLocator ( ) ; private int progressCount = - 1 ; private WorkbenchWindow [ ] createdWindows ; private ListenerList workbenchListeners = new ListenerList ( ListenerList . IDENTITY ) ; private Workbench ( Display display , WorkbenchAdvisor advisor ) { } public static final Workbench getInstance ( ) { } public static final int createAndRunWorkbench ( Display display , WorkbenchAdvisor advisor ) { } public static Display createDisplay ( ) { } public static WorkbenchTestable getWorkbenchTestable ( ) { } public void addWorkbenchListener ( IWorkbenchListener listener ) { } public void removeWorkbenchListener ( IWorkbenchListener listener ) { } boolean firePreShutdown ( final boolean forced ) { } void firePostShutdown ( ) { } public void addWindowListener ( IWindowListener l ) { } public void removeWindowListener ( IWindowListener l ) { } protected void fireWindowOpened ( final IWorkbenchWindow window ) { } protected void fireWindowClosed ( final IWorkbenchWindow window ) { } protected void fireWindowActivated ( final IWorkbenchWindow window ) { } protected void fireWindowDeactivated ( final IWorkbenchWindow window ) { } private boolean busyClose ( final boolean force ) { } public boolean saveAllEditors ( boolean confirm ) { } private IWorkbenchWindow busyOpenWorkbenchWindow ( String perspID , IAdaptable input ) throws WorkbenchException { } public boolean close ( ) { } boolean close ( int returnCode , final boolean force ) { } public IWorkbenchWindow getActiveWorkbenchWindow ( ) { } protected EditorHistory getEditorHistory ( ) { } public IEditorRegistry getEditorRegistry ( ) { } private int getNewWindowNumber ( ) { } public IWorkbenchOperationSupport getOperationSupport ( ) { } public IPerspectiveRegistry getPerspectiveRegistry ( ) { } public PreferenceManager getPreferenceManager ( ) { } public IPreferenceStore getPreferenceStore ( ) { } public ISharedImages getSharedImages ( ) { } WindowManager getWindowManager ( ) { } private File getWorkbenchStateFile ( ) { } public int getWorkbenchWindowCount ( ) { } public IWorkbenchWindow [ ] getWorkbenchWindows ( ) { } public IWorkingSetManager getWorkingSetManager ( ) { } public ILocalWorkingSetManager createLocalWorkingSetManager ( ) { } private boolean init ( ) { } private void initializeCommandResolver ( ) { } private void initializeApplicationColors ( ) { } private void initializeSingleClickOption ( ) { } private void initializeFonts ( ) { } private static void initializeImages ( ) { } private void uninitializeImages ( ) { } private void initializeColors ( ) { } public boolean isClosing ( ) { } private final void initializeDefaultServices ( ) { } public boolean isStarting ( ) { } private WorkbenchWindow newWorkbenchWindow ( ) { } private void forceOpenPerspective ( ) { } void openFirstTimeWindow ( ) { } private void runStartupWithProgress ( final int expectedProgressCount , final Runnable runnable ) { } private void doOpenFirstTimeWindow ( ) { } IStatus restoreState ( ) { } public IWorkbenchWindow openWorkbenchWindow ( IAdaptable input ) throws WorkbenchException { } public IWorkbenchWindow openWorkbenchWindow ( final String perspID , final IAdaptable input ) throws WorkbenchException { } IWorkbenchWindow restoreWorkbenchWindow ( IMemento memento ) throws WorkbenchException { } private XMLMemento recordWorkbenchState ( ) { } public boolean restart ( ) { } private IStatus restoreState ( final IMemento memento ) { } public String [ ] getEarlyActivatedPlugins ( ) { } public String [ ] getDisabledEarlyActivatedPlugins ( ) { } private void startPlugins ( ) { } private int runUI ( ) { UIStats . start ( START_WORKBENCH , "Workbench" ) ; boolean avoidDeadlock = true ; String [ ] commandLineArgs = Platform . getCommandLineArgs ( ) ; for ( int i = 0 ; i < ( commandLineArgs . length ) ; i ++ ) { if ( commandLineArgs [ i ] . equalsIgnoreCase ( "-allowDeadlock" ) ) { avoidDeadlock = false ; } } if ( avoidDeadlock ) { UILockListener uiLockListener = new UILockListener ( display ) ; Platform . getJobManager ( ) . setLockListener ( uiLockListener ) ; display . setSynchronizer ( new UISynchronizer ( display , uiLockListener ) ) ; } ModalContext . setAllowReadAndDispatch ( false ) ; <START_BUG> if ( WorkbenchPlugin . DEBUG ) { <END_BUG> display . asyncExec ( new Runnable ( ) { public void run ( ) { if ( isStarting ( ) ) { WorkbenchPlugin . log ( StatusUtil . newStatus ( IStatus . WARNING , "Event<seq2seq4repair_space>loop<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>run<seq2seq4repair_space>while<seq2seq4repair_space>the<seq2seq4repair_space>Workbench<seq2seq4repair_space>is<seq2seq4repair_space>starting." , new RuntimeException ( ) ) ) ; } } } ) ; } Listener closeListener = new Listener ( ) { public void handleEvent ( Event event ) { event . doit = close ( ) ; } } ; Window . IExceptionHandler handler = ExceptionHandler . getInstance ( ) ; try { display . addListener ( Close , closeListener ) ; Window . setExceptionHandler ( handler ) ; boolean initOK = init ( ) ; Platform . endSplash ( ) ; if ( initOK ) { advisor . postStartup ( ) ; } if ( initOK && ( runEventLoop ) ) { startPlugins ( ) ; addStartupRegistryListener ( ) ; display . asyncExec ( new Runnable ( ) { public void run ( ) { UIStats . end ( START_WORKBENCH , this , "Workbench" ) ; UIStats . startupComplete ( ) ; } } ) ; Workbench . getWorkbenchTestable ( ) . init ( display , this ) ; ModalContext . setAllowReadAndDispatch ( true ) ; isStarting = false ; runEventLoop ( handler , display ) ; } } catch ( final Exception e ) { if ( ! ( display . isDisposed ( ) ) ) { handler . handleException ( e ) ; } else { String msg = "Exception<seq2seq4repair_space>in<seq2seq4repair_space>Workbench.runUI<seq2seq4repair_space>after<seq2seq4repair_space>display<seq2seq4repair_space>was<seq2seq4repair_space>disposed" ; WorkbenchPlugin . log ( msg , new Status ( IStatus . ERROR , WorkbenchPlugin . PI_WORKBENCH , 1 , msg , e ) ) ; } } finally { runEventLoop = false ; if ( ! ( display . isDisposed ( ) ) ) { display . removeListener ( Close , closeListener ) ; } } return returnCode ;

Fix:
if ( WorkbenchPlugin . getDefault ( ) . isDebugging ( ) ) {