Buggy code:
public class DeltaProcessingState implements IResourceChangeListener { public IElementChangedListener [ ] elementChangedListeners = new IElementChangedListener [ 5 ] ; public int [ ] elementChangedListenerMasks = new int [ 5 ] ; public int elementChangedListenerCount = 0 ; public IResourceChangeListener [ ] preResourceChangeListeners = new IResourceChangeListener [ 1 ] ; public int [ ] preResourceChangeEventMasks = new int [ 1 ] ; public int preResourceChangeListenerCount = 0 ; private ThreadLocal deltaProcessors = new ThreadLocal ( ) ; public HashMap roots = new HashMap ( ) ; public HashMap otherRoots = new HashMap ( ) ; public HashMap oldRoots = new HashMap ( ) ; public HashMap oldOtherRoots = new HashMap ( ) ; public HashMap sourceAttachments = new HashMap ( ) ; public HashMap projectDependencies = new HashMap ( ) ; public boolean rootsAreStale = true ; private Set initializingThreads = Collections . synchronizedSet ( new HashSet ( ) ) ; public Hashtable externalTimeStamps ; public HashMap projectUpdates = new HashMap ( ) ; public static class ProjectUpdateInfo { JavaProject project ; IClasspathEntry [ ] oldResolvedPath ; IClasspathEntry [ ] newResolvedPath ; IClasspathEntry [ ] newRawPath ; public void updateProjectReferencesIfNecessary ( ) throws JavaModelException { } } public IJavaProject [ ] modelProjectsCache ; public void addElementChangedListener ( IElementChangedListener listener , int eventMask ) { } public void addPreResourceChangedListener ( IResourceChangeListener listener , int eventMask ) { } public DeltaProcessor getDeltaProcessor ( ) { } public void performClasspathResourceChange ( JavaProject project , IClasspathEntry [ ] oldResolvedPath , IClasspathEntry [ ] newResolvedPath , IClasspathEntry [ ] newRawPath , boolean canChangeResources ) throws JavaModelException { } public void initializeRoots ( ) { } public synchronized void recordProjectUpdate ( DeltaProcessingState . ProjectUpdateInfo newInfo ) { } public synchronized DeltaProcessingState . ProjectUpdateInfo [ ] removeAllProjectUpdates ( ) { } public void removeElementChangedListener ( IElementChangedListener listener ) { } public void removePreResourceChangedListener ( IResourceChangeListener listener ) { } public void resourceChanged ( final IResourceChangeEvent event ) { for ( int i = 0 ; i < ( this . preResourceChangeListenerCount ) ; i ++ ) { final IResourceChangeListener listener = this . preResourceChangeListeners [ i ] ; if ( ( ( this . preResourceChangeEventMasks [ i ] ) & ( event . getType ( ) ) ) != 0 ) <START_BUG> Platform . run ( new ISafeRunnable ( ) { <END_BUG> public void handleException ( Throwable exception ) { Util . log ( exception , "Exception<seq2seq4repair_space>occurred<seq2seq4repair_space>in<seq2seq4repair_space>listener<seq2seq4repair_space>of<seq2seq4repair_space>pre<seq2seq4repair_space>Java<seq2seq4repair_space>resource<seq2seq4repair_space>change<seq2seq4repair_space>notification" ) ; } public void run ( ) throws Exception { listener . resourceChanged ( event ) ; } } ) ; } try { getDeltaProcessor ( ) . resourceChanged ( event ) ; } finally { if ( ( event . getType ( ) ) == ( IResourceChangeEvent . POST_CHANGE ) ) { this . deltaProcessors . set ( null ) ; } } } public Hashtable getExternalLibTimeStamps ( ) { } private File getTimeStampsFile ( ) { } public void saveExternalLibTimeStamps ( ) throws CoreException { } public synchronized void updateRoots ( IPath containerPath , IResourceDelta containerDelta , DeltaProcessor deltaProcessor ) { } }

Fix:
SafeRunner . run ( new ISafeRunnable ( ) {