Buggy code:
class JavaProjectElementInfo extends OpenableElementInfo { protected IClasspathEntry [ ] fClasspath ; protected NameLookup fNameLookup = null ; protected SearchableEnvironment fSearchableEnvironment = null ; protected IPath fOutputLocation = null ; private Object [ ] fNonJavaResources ; public JavaProjectElementInfo ( ) { } private Object [ ] computeNonJavaResources ( JavaProject project ) { IPath projectPath = project . getProject ( ) . getFullPath ( ) ; boolean srcIsProject = false ; boolean binIsProject = false ; try { <START_BUG> IClasspathEntry [ ] 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 ; break ; } } binIsProject = projectPath . equals ( project . getOutputLocation ( ) ) ; } catch ( JavaModelException e ) { } Object [ ] nonJavaResources = new IResource [ 5 ] ; int nonJavaResourcesCounter = 0 ; try { IResource [ ] members = ( ( IContainer ) ( project . getUnderlyingResource ( ) ) ) . 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 ( ) ; if ( ( project . findPackageFragmentRoot ( resFullPath ) ) == null ) { String resName = res . getName ( ) ; if ( srcIsProject && ( Util . isValidCompilationUnitName ( resName ) ) ) { break ; } if ( binIsProject && ( Util . isValidClassFileName ( resName ) ) ) { break ; } if ( ( nonJavaResources . length ) == nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter * 2 ] ) , 0 , nonJavaResourcesCounter ) ; } nonJavaResources [ ( nonJavaResourcesCounter ++ ) ] = res ; } break ; case IResource . FOLDER : resFullPath = res . getFullPath ( ) ; if ( ( ( ! ( resFullPath . equals ( project . getOutputLocation ( ) ) ) ) && ( ( project . findPackageFragmentRoot ( resFullPath ) ) == null ) ) && ( ( project . findPackageFragment ( resFullPath ) ) == null ) ) { if ( ( nonJavaResources . length ) == nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter * 2 ] ) , 0 , nonJavaResourcesCounter ) ; } nonJavaResources [ ( nonJavaResourcesCounter ++ ) ] = res ; } } } if ( ( nonJavaResources . length ) != nonJavaResourcesCounter ) { System . arraycopy ( nonJavaResources , 0 , ( nonJavaResources = new IResource [ nonJavaResourcesCounter ] ) , 0 , nonJavaResourcesCounter ) ; } } catch ( CoreException e ) { nonJavaResources = JavaElementInfo . NO_NON_JAVA_RESOURCES ; nonJavaResourcesCounter = 0 ; } return nonJavaResources ; } protected NameLookup getNameLookup ( ) { } Object [ ] getNonJavaResources ( JavaProject project ) { } protected IPath getOutputLocation ( ) { } protected IClasspathEntry [ ] getRawClasspath ( ) { } protected SearchableEnvironment getSearchableEnvironment ( ) { } protected void setNameLookup ( NameLookup newNameLookup ) { } synchronized void setNonJavaResources ( Object [ ] resources ) { } protected void setOutputLocation ( IPath newOutputLocation ) { } protected void setRawClasspath ( IClasspathEntry [ ] newClasspath ) { } protected void setSearchableEnvironment ( SearchableEnvironment newSearchableEnvironment ) { } }

Fix:
IClasspathEntry [ ] classpath = project . getExpandedClasspath ( true ) ;