Buggy code:
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 static void initializeImages ( ) { } private void uninitializeImages ( ) { } private void initializeColors ( ) { } public boolean isClosing ( ) { } private final void initializeDefaultServices ( ) { Command . DEBUG_COMMAND_EXECUTION = Policy . DEBUG_COMMANDS ; commandManager = new CommandManager ( ) ; final CommandService commandService = new CommandService ( commandManager ) ; commandService . readRegistry ( ) ; serviceLocator . registerService ( ICommandService . class , commandService ) ; ContextManager . DEBUG = Policy . DEBUG_CONTEXTS ; contextManager = new ContextManager ( ) ; final IContextService contextService = new ContextService ( contextManager ) ; contextService . readRegistry ( ) ; serviceLocator . registerService ( IContextService . class , contextService ) ; final IHandlerService handlerService = new org . eclipse . ui . internal . handlers . HandlerService ( commandService ) ; handlerService . readRegistry ( ) ; serviceLocator . registerService ( IHandlerService . class , handlerService ) ; BindingManager . DEBUG = Policy . DEBUG_KEY_BINDINGS ; bindingManager = new BindingManager ( contextManager , commandManager ) ; final IBindingService bindingService = new org . eclipse . ui . internal . keys . BindingService ( bindingManager , commandService , this ) ; bindingService . readRegistryAndPreferences ( commandService ) ; serviceLocator . registerService ( IBindingService . class , bindingService ) ; final CommandImageManager commandImageManager = new CommandImageManager ( ) ; final CommandImageService commandImageService = new CommandImageService ( commandImageManager , commandService ) ; commandImageService . readRegistry ( ) ; serviceLocator . registerService ( ICommandImageService . class , commandImageService ) ; final SMenuManager menuManager = new SMenuManager ( ) ; final IMenuService menuService = new org . eclipse . ui . internal . menus . WorkbenchMenuService ( menuManager , commandService ) ; menuService . readRegistry ( ) ; serviceLocator . registerService ( IMenuService . class , menuService ) ; final ISourceProviderService sourceProviderService = new SourceProviderService ( ) ; serviceLocator . registerService ( ISourceProviderService . class , sourceProviderService ) ; final ActiveShellSourceProvider activeShellSourceProvider = new ActiveShellSourceProvider ( this ) ; handlerService . addSourceProvider ( activeShellSourceProvider ) ; contextService . addSourceProvider ( activeShellSourceProvider ) ; menuService . addSourceProvider ( activeShellSourceProvider ) ; sourceProviderService . registerProvider ( activeShellSourceProvider ) ; final ActivePartSourceProvider activePartSourceProvider = new ActivePartSourceProvider ( this ) ; handlerService . addSourceProvider ( activePartSourceProvider ) ; contextService . addSourceProvider ( activePartSourceProvider ) ; menuService . addSourceProvider ( activePartSourceProvider ) ; sourceProviderService . registerProvider ( activePartSourceProvider ) ; final ActiveContextSourceProvider activeContextSourceProvider = new ActiveContextSourceProvider ( contextService ) ; handlerService . addSourceProvider ( activeContextSourceProvider ) ; menuService . addSourceProvider ( activeContextSourceProvider ) ; sourceProviderService . registerProvider ( activeContextSourceProvider ) ; final CurrentSelectionSourceProvider currentSelectionSourceProvider = new CurrentSelectionSourceProvider ( this ) ; handlerService . addSourceProvider ( currentSelectionSourceProvider ) ; contextService . addSourceProvider ( currentSelectionSourceProvider ) ; menuService . addSourceProvider ( currentSelectionSourceProvider ) ; sourceProviderService . registerProvider ( currentSelectionSourceProvider ) ; actionSetSourceProvider = new ActionSetSourceProvider ( ) ; handlerService . addSourceProvider ( actionSetSourceProvider ) ; contextService . addSourceProvider ( actionSetSourceProvider ) ; menuService . addSourceProvider ( actionSetSourceProvider ) ; sourceProviderService . registerProvider ( actionSetSourceProvider ) ; menuSourceProvider = new MenuSourceProvider ( ) ; handlerService . addSourceProvider ( menuSourceProvider ) ; contextService . addSourceProvider ( menuSourceProvider ) ; menuService . addSourceProvider ( menuSourceProvider ) ; sourceProviderService . registerProvider ( menuSourceProvider ) ; <START_BUG> final LegacyActionPersistence deprecatedSupport = new LegacyActionPersistence ( commandManager , bindingManager , commandImageManager , menuService ) ; <END_BUG> serviceLocator . registerService ( LegacyActionPersistence . class , deprecatedSupport ) ; deprecatedSupport . read ( ) ; workbenchContextSupport = new WorkbenchContextSupport ( this , contextManager ) ; workbenchCommandSupport = new WorkbenchCommandSupport ( bindingManager , commandManager , contextManager , handlerService ) ; initializeCommandResolver ( ) ; addWindowListener ( windowListener ) ; bindingManager . addBindingManagerListener ( bindingManagerListener ) ; } 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 ) { } 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 ( ) { }

Fix:
final LegacyActionPersistence deprecatedSupport = new LegacyActionPersistence ( commandService , bindingManager , commandImageManager , menuService ) ;