Buggy code:
public class JavaProject extends Openable implements IProjectNature , IJavaProject , SuffixConstants { protected static final boolean IS_CASE_SENSITIVE = ! ( new File ( "Temp" ) . equals ( new File ( "temp" ) ) ) ; protected static final String [ ] NO_PREREQUISITES = new String [ 0 ] ; protected IProject fProject ; public static final String CLASSPATH_FILENAME = ".classpath" ; public static final String PREF_FILENAME = ".jprefs" ; public static final IClasspathEntry [ ] INVALID_CLASSPATH = new IClasspathEntry [ 0 ] ; private static final String CUSTOM_DEFAULT_OPTION_VALUE = "#\r\n\r#custom-non-empty-default-value#\r\n\r#" ; public static IPath canonicalizedPath ( IPath externalPath ) { } public JavaProject ( ) { } public JavaProject ( IProject project , IJavaElement parent ) { } protected void addToBuildSpec ( String builderID ) throws CoreException { } protected void closing ( Object info ) throws JavaModelException { } private void computeExpandedClasspath ( JavaProject initialProject , boolean ignoreUnresolvedVariable , boolean generateMarkerOnError , HashSet visitedProjects , ObjectVector accumulatedEntries ) throws JavaModelException { } public IPackageFragmentRoot [ ] computePackageFragmentRoots ( IClasspathEntry [ ] resolvedClasspath , boolean retrieveExportedRoots ) throws JavaModelException { } public IPackageFragmentRoot [ ] computePackageFragmentRoots ( IClasspathEntry resolvedEntry ) { } public void computePackageFragmentRoots ( IClasspathEntry resolvedEntry , ObjectVector accumulatedRoots , HashSet rootIDs , boolean insideOriginalProject , boolean checkExistency , boolean retrieveExportedRoots ) throws JavaModelException { } public void computePackageFragmentRoots ( IClasspathEntry [ ] resolvedClasspath , ObjectVector accumulatedRoots , HashSet rootIDs , boolean insideOriginalProject , boolean checkExistency , boolean retrieveExportedRoots ) throws JavaModelException { } public String computeSharedPropertyFileName ( QualifiedName qName ) { } public void configure ( ) throws CoreException { } public boolean contains ( IResource resource ) { } IMarker createClasspathProblemMarker ( IJavaModelStatus status ) { } protected OpenableElementInfo createElementInfo ( ) { } protected IClasspathEntry [ ] decodeClasspath ( String xmlClasspath , boolean createMarker , boolean logProblems ) { } public void deconfigure ( ) throws CoreException { } protected IClasspathEntry [ ] defaultClasspath ( ) throws JavaModelException { } protected IPath defaultOutputLocation ( ) throws JavaModelException { } protected String encodeClasspath ( IClasspathEntry [ ] classpath , IPath outputLocation , boolean useLineSeparator ) throws JavaModelException { } public boolean equals ( Object o ) { } public boolean exists ( ) { } public IJavaElement findElement ( IPath path ) throws JavaModelException { } public IPackageFragment findPackageFragment ( IPath path ) throws JavaModelException { } public IPackageFragment findPackageFragment0 ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot findPackageFragmentRoot ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot findPackageFragmentRoot0 ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot [ ] findPackageFragmentRoots ( IClasspathEntry entry ) { } public IType findType ( String fullyQualifiedName ) throws JavaModelException { } public IType findType ( String packageName , String typeQualifiedName ) throws JavaModelException { } protected void flushClasspathProblemMarkers ( boolean flushCycleMarkers , boolean flushClasspathFormatMarkers ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { boolean validInfo = false ; try { if ( getProject ( ) . isOpen ( ) ) { JavaModelManager . getJavaModelManager ( ) . putInfo ( this , info ) ; IWorkspace workspace = ResourcesPlugin . getWorkspace ( ) ; IWorkspaceRoot wRoot = workspace . getRoot ( ) ; <START_BUG> IClasspathEntry [ ] resolvedClasspath = getResolvedClasspath ( true , ( ! ( workspace . isTreeLocked ( ) ) ) ) ; <END_BUG> updatePackageFragmentRoots ( ) ; for ( int i = 0 , length = resolvedClasspath . length ; i < length ; i ++ ) { IClasspathEntry entry = resolvedClasspath [ i ] ; if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_LIBRARY ) ) { IPath path = entry . getPath ( ) ; Object target = JavaModel . getTarget ( wRoot , path , true ) ; if ( target instanceof File ) { Map externalTimeStamps = JavaModelManager . getJavaModelManager ( ) . deltaProcessor . externalTimeStamps ; if ( ( externalTimeStamps . get ( path ) ) == null ) { long timestamp = DeltaProcessor . getTimeStamp ( ( ( File ) ( target ) ) ) ; externalTimeStamps . put ( path , new Long ( timestamp ) ) ; } } } } validInfo = true ; } } finally { if ( ! validInfo ) JavaModelManager . getJavaModelManager ( ) . removeInfo ( this ) ; } return validInfo ; } public IPackageFragmentRoot [ ] getAllPackageFragmentRoots ( ) throws JavaModelException { } public IClasspathEntry getClasspathEntryFor ( IPath path ) throws JavaModelException { } public IMarker getCycleMarker ( ) { } public IClasspathEntry [ ] getExpandedClasspath ( boolean ignoreUnresolvedVariable ) throws JavaModelException { } public IClasspathEntry [ ] getExpandedClasspath ( boolean ignoreUnresolvedVariable , boolean generateMarkerOnError ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } private ICommand getJavaCommand ( IProjectDescription description ) throws CoreException { } protected JavaProjectElementInfo getJavaProjectElementInfo ( ) throws JavaModelException { } public NameLookup getNameLookup ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public String getOption ( String optionName , boolean inheritJavaCoreOptions ) { } public Map getOptions ( boolean inheritJavaCoreOptions ) { } public IPath getOutputLocation ( ) throws JavaModelException { } public IPackageFragmentRoot getPackageFragmentRoot ( IPath path ) { } public IPackageFragmentRoot getFolderPackageFragmentRoot ( IPath path ) { } public IPackageFragmentRoot getPackageFragmentRoot ( IResource resource ) { } public IPackageFragmentRoot getPackageFragmentRoot ( String jarPath ) { } public IPackageFragmentRoot getPackageFragmentRoot0 ( IPath jarPath ) { } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( ) throws JavaModelException { } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( IClasspathEntry entry ) { } protected IPackageFragmentRoot [ ] getPackageFragmentRoots ( IPath path ) throws JavaModelException { } public IPackageFragment [ ] getPackageFragments ( ) throws JavaModelException { } public IPackageFragment [ ] getPackageFragmentsInRoots ( IPackageFragmentRoot [ ] roots ) { } public IPath getPath ( ) { } public IProject getProject ( ) { } public Preferences getPreferences ( ) { }

Fix:
IClasspathEntry [ ] resolvedClasspath = getResolvedClasspath ( true , false ) ;