Buggy code:
StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { commandService [ 0 ] = new CommandService ( commandManager ) ; commandService [ 0 ] . readRegistry ( ) ; serviceLocator . registerService ( ICommandService . class , commandService [ 0 ] ) ; } } ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { ContextManager . DEBUG = Policy . DEBUG_CONTEXTS ; contextManager = new ContextManager ( ) ; } } ) ; final IContextService contextService = new ContextService ( contextManager ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { contextService . readRegistry ( ) ; } } ) ; serviceLocator . registerService ( IContextService . class , contextService ) ; final IHandlerService [ ] handlerService = new IHandlerService [ 1 ] ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { handlerService [ 0 ] = new org . eclipse . ui . internal . handlers . HandlerService ( commandService [ 0 ] , evaluationService ) ; handlerService [ 0 ] . readRegistry ( ) ; } } ) ; serviceLocator . registerService ( IHandlerService . class , handlerService [ 0 ] ) ; final IBindingService [ ] bindingService = new BindingService [ 1 ] ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { BindingManager . DEBUG = Policy . DEBUG_KEY_BINDINGS ; bindingManager = new BindingManager ( contextManager , commandManager ) ; bindingService [ 0 ] = new BindingService ( bindingManager , commandService [ 0 ] , Workbench . this ) ; } } ) ; bindingService [ 0 ] . readRegistryAndPreferences ( commandService [ 0 ] ) ; serviceLocator . registerService ( IBindingService . class , bindingService [ 0 ] ) ; final CommandImageManager commandImageManager = new CommandImageManager ( ) ; final CommandImageService commandImageService = new CommandImageService ( commandImageManager , commandService [ 0 ] ) ; commandImageService . readRegistry ( ) ; serviceLocator . registerService ( ICommandImageService . class , commandImageService ) ; final WorkbenchMenuService menuService = new WorkbenchMenuService ( serviceLocator ) ; serviceLocator . registerService ( IMenuService . class , menuService ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { menuService . readRegistry ( ) ; } } ) ; final ISourceProviderService sourceProviderService = new SourceProviderService ( ) ; serviceLocator . registerService ( ISourceProviderService . class , sourceProviderService ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { final ActiveShellSourceProvider activeShellSourceProvider = new ActiveShellSourceProvider ( Workbench . this ) ; evaluationService . addSourceProvider ( activeShellSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( activeShellSourceProvider ) ; contextService . addSourceProvider ( activeShellSourceProvider ) ; menuService . addSourceProvider ( activeShellSourceProvider ) ; sourceProviderService . registerProvider ( activeShellSourceProvider ) ; } } ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { final ActivePartSourceProvider activePartSourceProvider = new ActivePartSourceProvider ( Workbench . this ) ; evaluationService . addSourceProvider ( activePartSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( activePartSourceProvider ) ; contextService . addSourceProvider ( activePartSourceProvider ) ; menuService . addSourceProvider ( activePartSourceProvider ) ; sourceProviderService . registerProvider ( activePartSourceProvider ) ; } } ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { final ActiveContextSourceProvider activeContextSourceProvider = new ActiveContextSourceProvider ( contextService ) ; evaluationService . addSourceProvider ( activeContextSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( activeContextSourceProvider ) ; menuService . addSourceProvider ( activeContextSourceProvider ) ; sourceProviderService . registerProvider ( activeContextSourceProvider ) ; } } ) ; StartupThreading . runWithoutExceptions ( new StartupRunnable ( ) { public void runWithException ( ) { final CurrentSelectionSourceProvider currentSelectionSourceProvider = new CurrentSelectionSourceProvider ( Workbench . this ) ; evaluationService . addSourceProvider ( currentSelectionSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( currentSelectionSourceProvider ) ; contextService . addSourceProvider ( currentSelectionSourceProvider ) ; menuService . addSourceProvider ( currentSelectionSourceProvider ) ; sourceProviderService . registerProvider ( currentSelectionSourceProvider ) ; <START_BUG> actionSetSourceProvider = new ActionSetSourceProvider ( contextService ) ; <END_BUG> evaluationService . addSourceProvider ( actionSetSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( actionSetSourceProvider ) ; contextService . addSourceProvider ( actionSetSourceProvider ) ; menuService . addSourceProvider ( actionSetSourceProvider ) ; sourceProviderService . registerProvider ( actionSetSourceProvider ) ; menuSourceProvider = new MenuSourceProvider ( ) ; evaluationService . addSourceProvider ( menuSourceProvider ) ; handlerService [ 0 ] . addSourceProvider ( menuSourceProvider ) ; contextService . addSourceProvider ( menuSourceProvider ) ; menuService . addSourceProvider ( menuSourceProvider ) ; sourceProviderService . registerProvider ( menuSourceProvider ) ; } } ) ; workbenchContextSupport = new WorkbenchContextSupport ( this , contextManager ) ; workbenchCommandSupport = new WorkbenchCommandSupport ( bindingManager , commandManager , contextManager , handlerService [ 0 ] ) ; initializeCommandResolver ( ) ; addWindowListener ( windowListener ) ; bindingManager . addBindingManagerListener ( bindingManagerListener ) ; serviceLocator . registerService ( ISelectionConversionService . class , new SelectionConversionService ( ) ) ; } 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 ( ) { } private void runEventLoop ( Window . IExceptionHandler handler , Display display ) { }

Fix:
actionSetSourceProvider = new ActionSetSourceProvider ( ) ;