Buggy code:
public final class Workbench implements IWorkbench { private final class StartupProgressBundleListener implements SynchronousBundleListener { private final IProgressMonitor progressMonitor ; private final int maximumProgressCount ; private StartupProgressBundleListener ( IProgressMonitor progressMonitor , int maximumProgressCount ) { } public void bundleChanged ( final BundleEvent event ) { } } public static final String EARLY_STARTUP_FAMILY = "earlyStartup" ; 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 = PlatformUI . RETURN_UNSTARTABLE ; private ListenerList windowListeners = new ListenerList ( ) ; private WorkbenchAdvisor advisor ; private WorkbenchConfigurer workbenchConfigurer ; private ExtensionEventHandler extensionEventHandler ; private int largeUpdates = 0 ; final Map services = new HashMap ( ) ; private int progressCount = - 1 ; private WorkbenchWindow [ ] createdWindows ; 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 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 ( Display display ) { } 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 ( ) { } private void runStartupWithProgress ( final int expectedProgressCount , final Runnable runnable ) throws InterruptedException , InvocationTargetException { progressCount = 0 ; final double cutoff = 0.95 ; <START_BUG> Shell shell = new Shell ( Display . getCurrent ( ) , SWT . ON_TOP ) ; <END_BUG> try { final ProgressMonitorDialog progressMonitorDialog = new StartupProgressMonitorDialog ( shell ) ; SynchronousBundleListener bundleListener = new Workbench . StartupProgressBundleListener ( progressMonitorDialog . getProgressMonitor ( ) , ( ( int ) ( expectedProgressCount * cutoff ) ) ) ; WorkbenchPlugin . getDefault ( ) . addBundleListener ( bundleListener ) ; try { progressMonitorDialog . run ( false , false , new IRunnableWithProgress ( ) { public void run ( IProgressMonitor monitor ) { monitor . beginTask ( getProductProgressTitle ( ) , expectedProgressCount ) ; runnable . run ( ) ; monitor . subTask ( Startup_Done ) ; int remainingWork = expectedProgressCount - ( Math . min ( progressCount , ( ( int ) ( expectedProgressCount * cutoff ) ) ) ) ; monitor . worked ( remainingWork ) ; Display . getCurrent ( ) . update ( ) ; monitor . done ( ) ; } } ) ; } finally { WorkbenchPlugin . getDefault ( ) . removeBundleListener ( bundleListener ) ; } } finally { shell . dispose ( ) ; } } private String getProductProgressTitle ( ) { } 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 ) throws InterruptedException , InvocationTargetException { } public String [ ] getEarlyActivatedPlugins ( ) { } public String [ ] getDisabledEarlyActivatedPlugins ( ) { } 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 ( ) { } private void cancelEarlyStartup ( ) { } public IDecoratorManager getDecoratorManager ( ) { } private WorkbenchWindow getActivatedWindow ( ) { } void setActivatedWindow ( WorkbenchWindow window ) { } WorkbenchConfigurer getWorkbenchConfigurer ( ) { } WorkbenchAdvisor getAdvisor ( ) { } public Display getDisplay ( ) { } public String getDefaultPerspectiveId ( ) { }

Fix:
Shell shell = new Shell ( Display . getCurrent ( ) , SWT . NONE ) ;