Buggy code:
public abstract class AbstractWorkingSetManager extends EventManager implements IExtensionChangeHandler , IWorkingSetManager , BundleListener { abstract static class WorkingSetRunnable implements ISafeRunnable { public void handleException ( Throwable exception ) { } } private SortedSet workingSets = new TreeSet ( WorkingSetComparator . INSTANCE ) ; private static final int MRU_SIZE = 5 ; private List recentWorkingSets = new ArrayList ( ) ; private BundleContext bundleContext ; private Map updaters = new HashMap ( ) ; private Map elementAdapters = new HashMap ( ) ; private static final IWorkingSetUpdater NULL_UPDATER = new IWorkingSetUpdater ( ) { public void add ( IWorkingSet workingSet ) { } public boolean remove ( IWorkingSet workingSet ) { } public boolean contains ( IWorkingSet workingSet ) { } public void dispose ( ) { } } ; private static final IWorkingSetElementAdapter IDENTITY_ADAPTER = new IWorkingSetElementAdapter ( ) { public IAdaptable [ ] adaptElements ( IWorkingSet ws , IAdaptable [ ] elements ) { } public void dispose ( ) { } } ; private static WorkingSetDescriptor [ ] getSupportedEditableDescriptors ( String [ ] supportedWorkingSetIds ) { } protected AbstractWorkingSetManager ( BundleContext context ) { } private IExtensionPoint getExtensionPointFilter ( ) { } public void dispose ( ) { } public IWorkingSet createWorkingSet ( String name , IAdaptable [ ] elements ) { } public IWorkingSet createAggregateWorkingSet ( String name , String label , IWorkingSet [ ] components ) { } public IWorkingSet createWorkingSet ( IMemento memento ) { } public void addWorkingSet ( IWorkingSet workingSet ) { } private void internalAddWorkingSet ( IWorkingSet workingSet ) { } protected boolean internalRemoveWorkingSet ( IWorkingSet workingSet ) { } public IWorkingSet [ ] getWorkingSets ( ) { } public IWorkingSet [ ] getAllWorkingSets ( ) { } public IWorkingSet getWorkingSet ( String name ) { } public IWorkingSet [ ] getRecentWorkingSets ( ) { } protected void internalAddRecentWorkingSet ( IWorkingSet workingSet ) { } public boolean equals ( Object object ) { } public int hashCode ( ) { } public void addPropertyChangeListener ( IPropertyChangeListener listener ) { } public void removePropertyChangeListener ( IPropertyChangeListener listener ) { } protected void firePropertyChange ( String changeId , Object oldValue , Object newValue ) { } public void workingSetChanged ( IWorkingSet changedWorkingSet , String propertyChangeId , Object oldValue ) { } public void saveWorkingSetState ( IMemento memento ) { } private void saveWorkingSetState ( final IMemento memento , List list ) { } protected void restoreWorkingSetState ( IMemento memento ) { } protected IWorkingSet restoreWorkingSet ( final IMemento memento ) { } protected void saveMruList ( IMemento memento ) { } protected void restoreMruList ( IMemento memento ) { } public IWorkingSetEditWizard createWorkingSetEditWizard ( IWorkingSet workingSet ) { } public IWorkingSetSelectionDialog createWorkingSetSelectionDialog ( Shell parent ) { } public IWorkingSetSelectionDialog createWorkingSetSelectionDialog ( Shell parent , boolean multi ) { } public IWorkingSetNewWizard createWorkingSetNewWizard ( String [ ] workingSetIds ) { } public void bundleChanged ( BundleEvent event ) { String symbolicName = event . getBundle ( ) . getSymbolicName ( ) ; if ( symbolicName == null ) return ; <START_BUG> if ( ! ( Workbench . getInstance ( ) . isRunning ( ) ) ) { <END_BUG> return ; } if ( ( event . getBundle ( ) . getState ( ) ) == ( Bundle . ACTIVE ) ) { final WorkingSetDescriptor [ ] descriptors = WorkbenchPlugin . getDefault ( ) . getWorkingSetRegistry ( ) . getUpdaterDescriptorsForNamespace ( symbolicName ) ; Job job = new WorkbenchJob ( NLS . bind ( AbstractWorkingSetManager_updatersActivating , symbolicName ) ) { public IStatus runInUIThread ( IProgressMonitor monitor ) { synchronized ( updaters ) { for ( int i = 0 ; i < ( descriptors . length ) ; i ++ ) { WorkingSetDescriptor descriptor = descriptors [ i ] ; List workingSets = getWorkingSetsForId ( descriptor . getId ( ) ) ; if ( ( workingSets . size ( ) ) == 0 ) { continue ; } final IWorkingSetUpdater updater = getUpdater ( descriptor ) ; for ( Iterator iter = workingSets . iterator ( ) ; iter . hasNext ( ) ; ) { final IWorkingSet workingSet = ( ( IWorkingSet ) ( iter . next ( ) ) ) ; SafeRunner . run ( new AbstractWorkingSetManager . WorkingSetRunnable ( ) { public void run ( ) throws Exception { if ( ! ( updater . contains ( workingSet ) ) ) { updater . add ( workingSet ) ; } } } ) ; } } } return Status . OK_STATUS ; } } ; job . setSystem ( true ) ; job . schedule ( ) ; } } private List getWorkingSetsForId ( String id ) { } private void addToUpdater ( final IWorkingSet workingSet ) { } private IWorkingSetUpdater getUpdater ( WorkingSetDescriptor descriptor ) { } IWorkingSetElementAdapter getElementAdapter ( WorkingSetDescriptor descriptor ) { } private void removeFromUpdater ( final IWorkingSet workingSet ) { } public IWorkingSetSelectionDialog createWorkingSetSelectionDialog ( Shell parent , boolean multi , String [ ] workingsSetIds ) { } public void saveState ( File stateFile ) throws IOException { } public void addExtension ( IExtensionTracker tracker , IExtension extension ) { } public void removeExtension ( IExtension extension , Object [ ] objects ) { } private void removeElementAdapter ( final IWorkingSetElementAdapter elementAdapter ) { } private void removeUpdater ( final IWorkingSetUpdater updater ) { } public void addToWorkingSets ( final IAdaptable element , IWorkingSet [ ] workingSets ) { } }

Fix:
if ( ! ( PlatformUI . isWorkbenchRunning ( ) ) ) {