Buggy code:
class JavaProjectElementInfo extends OpenableElementInfo { private Object [ ] nonJavaResources ; public IPackageFragmentRoot [ ] allPkgFragmentRootsCache ; private HashMap allPkgFragmentsCache ; public JavaProjectElementInfo ( ) { } private Object [ ] computeNonJavaResources ( JavaProject project ) { IPath projectPath = project . getProject ( ) . getFullPath ( ) ; boolean srcIsProject = false ; boolean binIsProject = false ; char [ ] [ ] inclusionPatterns = null ; char [ ] [ ] exclusionPatterns = null ; IClasspathEntry [ ] classpath = null ; IPath projectOutput = null ; try { <START_BUG> classpath = project . getResolvedClasspath ( true ) ; <END_BUG> for ( int i = 0 ; i < ( classpath . length ) ; i ++ ) { IClasspathEntry entry = classpath [ i ] ; if ( projectPath . equals ( entry . getPath ( ) ) ) { srcIsProject = true ; inclusionPatterns = ( ( ClasspathEntry ) ( entry ) ) . fullInclusionPatternChars ( ) ; exclusionPatterns = ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) ; break ; } } projectOutput = project . getOutputLocation ( ) ; binIsProject = projectPath . equals ( projectOutput ) ; } catch ( JavaModelException e ) { } Object [ ] resources = new IResource [ 5 ] ; int resourcesCounter = 0 ; try { IResource [ ] members = ( ( IContainer ) ( project . getResource ( ) ) ) . members ( ) ; for ( int i = 0 , max = members . length ; i < max ; i ++ ) { IResource res = members [ i ] ; switch ( res . getType ( ) ) { case IResource . FILE : IPath resFullPath = res . getFullPath ( ) ; String resName = res . getName ( ) ; if ( ( org . eclipse . jdt . internal . compiler . util . Util . isArchiveFileName ( resName ) ) && ( this . isClasspathEntryOrOutputLocation ( resFullPath , classpath , projectOutput ) ) ) { break ; } if ( ( srcIsProject && ( Util . isValidCompilationUnitName ( resName ) ) ) && ( ! ( Util . isExcluded ( res , inclusionPatterns , exclusionPatterns ) ) ) ) { break ; } if ( binIsProject && ( Util . isValidClassFileName ( resName ) ) ) { break ; } if ( ( resources . length ) == resourcesCounter ) { System . arraycopy ( resources , 0 , ( resources = new IResource [ resourcesCounter * 2 ] ) , 0 , resourcesCounter ) ; } resources [ ( resourcesCounter ++ ) ] = res ; break ; case IResource . FOLDER : resFullPath = res . getFullPath ( ) ; if ( ( ( srcIsProject && ( ! ( Util . isExcluded ( res , inclusionPatterns , exclusionPatterns ) ) ) ) && ( Util . isValidFolderNameForPackage ( res . getName ( ) ) ) ) || ( this . isClasspathEntryOrOutputLocation ( resFullPath , classpath , projectOutput ) ) ) { break ; } if ( ( resources . length ) == resourcesCounter ) { System . arraycopy ( resources , 0 , ( resources = new IResource [ resourcesCounter * 2 ] ) , 0 , resourcesCounter ) ; } resources [ ( resourcesCounter ++ ) ] = res ; } } if ( ( resources . length ) != resourcesCounter ) { System . arraycopy ( resources , 0 , ( resources = new IResource [ resourcesCounter ] ) , 0 , resourcesCounter ) ; } } catch ( CoreException e ) { resources = JavaElementInfo . NO_NON_JAVA_RESOURCES ; resourcesCounter = 0 ; } return resources ; } IPackageFragmentRoot [ ] getAllPackageFragmentRoots ( JavaProject project ) { } HashMap getAllPackageFragments ( JavaProject project ) { } Object [ ] getNonJavaResources ( JavaProject project ) { } private IPackageFragment [ ] getPackageFragmentsInRoots ( IPackageFragmentRoot [ ] roots , IJavaProject project ) { } private boolean isClasspathEntryOrOutputLocation ( IPath path , IClasspathEntry [ ] resolvedClasspath , IPath projectOutput ) { } void resetCaches ( ) { } void setNonJavaResources ( Object [ ] resources ) { } }

Fix:
classpath = project . getResolvedClasspath ( true , false , false ) ;