Buggy code:
public final class Workbench implements IWorkbench { private static final String [ ] VERSION_STRING = new String [ ] { "0.046" , "2.0" } ; private static final String DEFAULT_WORKBENCH_STATE_FILENAME = "workbench.xml" ; private static Workbench instance ; private static WorkbenchTestable testableObject ; private Display display ; private WindowManager windowManager ; private WorkbenchWindow activatedWindow ; private EditorHistory editorHistory ; private boolean runEventLoop = true ; private boolean isStarting = true ; private boolean isClosing = false ; private int returnCode ; private ListenerList windowListeners = new ListenerList ( ) ; private WorkbenchAdvisor advisor ; private WorkbenchConfigurer workbenchConfigurer ; private ExtensionEventHandler extensionEventHandler ; 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 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 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 ( ) { } private boolean init ( Display display ) { if ( WorkbenchPlugin . getDefault ( ) . isDebugging ( ) ) { WorkbenchPlugin . DEBUG = true ; ModalContext . setDebugMode ( true ) ; } windowManager = new WindowManager ( ) ; IIntroRegistry introRegistry = WorkbenchPlugin . getDefault ( ) . getIntroRegistry ( ) ; if ( ( introRegistry . getIntroCount ( ) ) > 0 ) { IProduct product = Platform . getProduct ( ) ; if ( product != null ) { introDescriptor = ( ( IntroDescriptor ) ( introRegistry . getIntroForProduct ( product . getId ( ) ) ) ) ; } } workbenchActivitySupport = new WorkbenchActivitySupport ( ) ; activityHelper = ActivityPersistanceHelper . getInstance ( ) ; workbenchCommandSupport = new WorkbenchCommandSupport ( this ) ; workbenchContextSupport = new WorkbenchContextSupport ( this ) ; workbenchCommandSupport . getCommandManager ( ) . addCommandManagerListener ( commandManagerListener ) ; workbenchContextSupport . getContextManager ( ) . addContextManagerListener ( contextManagerListener ) ; initializeCommandResolver ( ) ; addWindowListener ( windowListener ) ; initializeImages ( ) ; initializeFonts ( ) ; initializeColors ( ) ; initializeApplicationColors ( ) ; <START_BUG> advisor . basicInitialize ( getWorkbenchConfigurer ( ) ) ; <END_BUG> boolean useColorIcons = getPreferenceStore ( ) . getBoolean ( COLOR_ICONS ) ; ActionContributionItem . setUseColorIconsInToolbars ( useColorIcons ) ; initializeSingleClickOption ( ) ; 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 ) ) ; } try { UIStats . start ( RESTORE_WORKBENCH , "Workbench" ) ; advisor . preStartup ( ) ; if ( ! ( advisor . openWindows ( ) ) ) { return false ; } } finally { UIStats . end ( RESTORE_WORKBENCH , "Workbench" ) ; } forceOpenPerspective ( ) ; isStarting = false ; return true ; } private void initializeCommandResolver ( ) { } private void initializeApplicationColors ( ) { } private void initializeSingleClickOption ( ) { } private void initializeFonts ( ) { } private void initializeImages ( ) { } private void uninitializeImages ( ) { } private void initializeColors ( ) { } public boolean isClosing ( ) { } boolean isStarting ( ) { } private WorkbenchWindow newWorkbenchWindow ( ) { } private void forceOpenPerspective ( ) { } void openFirstTimeWindow ( ) { } IStatus restoreState ( ) { } public IWorkbenchWindow openWorkbenchWindow ( IAdaptable input ) throws WorkbenchException { } public IWorkbenchWindow openWorkbenchWindow ( final String perspID , final IAdaptable input ) throws WorkbenchException { } private XMLMemento recordWorkbenchState ( ) { } public boolean restart ( ) { } private IStatus restoreState ( IMemento memento ) { } public String [ ] getEarlyActivatedPlugins ( ) { } private void startPlugins ( ) { } private int runUI ( ) { } private void runEventLoop ( Window . IExceptionHandler handler , Display display ) { } private IStatus saveState ( IMemento memento ) { } private boolean saveMementoToFile ( XMLMemento memento ) { } public IWorkbenchPage showPerspective ( String perspectiveId , IWorkbenchWindow window ) throws WorkbenchException { } public IWorkbenchPage showPerspective ( String perspectiveId , IWorkbenchWindow window , IAdaptable input ) throws WorkbenchException { } private void shutdown ( ) { } public IDecoratorManager getDecoratorManager ( ) { } private WorkbenchWindow getActivatedWindow ( ) { } void setActivatedWindow ( WorkbenchWindow window ) { } WorkbenchConfigurer getWorkbenchConfigurer ( ) { } WorkbenchAdvisor getAdvisor ( ) { } public Display getDisplay ( ) { } public String getDefaultPerspectiveId ( ) { }

Fix:
advisor . internalBasicInitialize ( getWorkbenchConfigurer ( ) ) ;