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 void doNotUse ( ) { } 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 ; private HashMap classpathChanges = new HashMap ( ) ; private HashMap classpathValidations = new HashMap ( ) ; private HashMap projectReferenceChanges = new HashMap ( ) ; private HashMap externalFolderChanges = new HashMap ( ) ; private HashSet javaProjectNamesCache ; private HashSet externalElementsToRefresh ; public synchronized void addElementChangedListener ( IElementChangedListener listener , int eventMask ) { } public synchronized void addForRefresh ( IJavaElement externalElement ) { } public synchronized void addPreResourceChangedListener ( IResourceChangeListener listener , int eventMask ) { } public DeltaProcessor getDeltaProcessor ( ) { } public synchronized ClasspathChange addClasspathChange ( IProject project , IClasspathEntry [ ] oldRawClasspath , IPath oldOutputLocation , IClasspathEntry [ ] oldResolvedClasspath ) { } public synchronized ClasspathChange getClasspathChange ( IProject project ) { } public synchronized HashMap removeAllClasspathChanges ( ) { } public synchronized ClasspathValidation addClasspathValidation ( JavaProject project ) { } public synchronized void addExternalFolderChange ( JavaProject project , IClasspathEntry [ ] oldResolvedClasspath ) { } public synchronized void addProjectReferenceChange ( JavaProject project , IClasspathEntry [ ] oldResolvedClasspath ) { } public void initializeRoots ( boolean initAfterLoad ) { } synchronized void initializeRootsWithPreviousSession ( ) { } private HashMap [ ] getRootInfos ( boolean usePreviousSession ) { HashMap newRoots = new HashMap ( ) ; HashMap newOtherRoots = new HashMap ( ) ; HashMap newSourceAttachments = new HashMap ( ) ; HashMap newProjectDependencies = new HashMap ( ) ; IJavaModel model = JavaModelManager . getJavaModelManager ( ) . getJavaModel ( ) ; IJavaProject [ ] projects ; try { projects = model . getJavaProjects ( ) ; } catch ( JavaModelException e ) { return null ; } for ( int i = 0 , length = projects . length ; i < length ; i ++ ) { JavaProject project = ( ( JavaProject ) ( projects [ i ] ) ) ; IClasspathEntry [ ] classpath ; try { if ( usePreviousSession ) { JavaModelManager . PerProjectInfo perProjectInfo = project . getPerProjectInfo ( ) ; <START_BUG> project . resolveClasspath ( perProjectInfo , true ) ; <END_BUG> classpath = perProjectInfo . resolvedClasspath ; } else { classpath = project . getResolvedClasspath ( ) ; } } catch ( JavaModelException e ) { continue ; } for ( int j = 0 , classpathLength = classpath . length ; j < classpathLength ; j ++ ) { IClasspathEntry entry = classpath [ j ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_PROJECT ) ) { IJavaProject key = model . getJavaProject ( entry . getPath ( ) . segment ( 0 ) ) ; IJavaProject [ ] dependents = ( ( IJavaProject [ ] ) ( newProjectDependencies . get ( key ) ) ) ; if ( dependents == null ) { dependents = new IJavaProject [ ] { project } ; } else { int dependentsLength = dependents . length ; System . arraycopy ( dependents , 0 , ( dependents = new IJavaProject [ dependentsLength + 1 ] ) , 0 , dependentsLength ) ; dependents [ dependentsLength ] = project ; } newProjectDependencies . put ( key , dependents ) ; continue ; } IPath path = entry . getPath ( ) ; if ( ( newRoots . get ( path ) ) == null ) { newRoots . put ( path , new DeltaProcessor . RootInfo ( project , path , ( ( ClasspathEntry ) ( entry ) ) . fullInclusionPatternChars ( ) , ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) , entry . getEntryKind ( ) ) ) ; } else { ArrayList rootList = ( ( ArrayList ) ( newOtherRoots . get ( path ) ) ) ; if ( rootList == null ) { rootList = new ArrayList ( ) ; newOtherRoots . put ( path , rootList ) ; } rootList . add ( new DeltaProcessor . RootInfo ( project , path , ( ( ClasspathEntry ) ( entry ) ) . fullInclusionPatternChars ( ) , ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) , entry . getEntryKind ( ) ) ) ; } if ( ( entry . getEntryKind ( ) ) != ( IClasspathEntry . CPE_LIBRARY ) ) continue ; String propertyString = null ; try { propertyString = Util . getSourceAttachmentProperty ( path ) ; } catch ( JavaModelException e ) { e . printStackTrace ( ) ; } IPath sourceAttachmentPath ; if ( propertyString != null ) { int index = propertyString . lastIndexOf ( PackageFragmentRoot . ATTACHMENT_PROPERTY_DELIMITER ) ; sourceAttachmentPath = ( index < 0 ) ? new Path ( propertyString ) : new Path ( propertyString . substring ( 0 , index ) ) ; } else { sourceAttachmentPath = entry . getSourceAttachmentPath ( ) ; } if ( sourceAttachmentPath != null ) { newSourceAttachments . put ( sourceAttachmentPath , path ) ; } } } return new HashMap [ ] { newRoots , newOtherRoots , newSourceAttachments , newProjectDependencies } ; } public synchronized ClasspathValidation [ ] removeClasspathValidations ( ) { }

Fix:
project . resolveClasspath ( perProjectInfo , true , false ) ;