Buggy code:
class JavaProjectElementInfo extends OpenableElementInfo { 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 { IClasspathEntry [ ] classpath = project . getExpandedClasspath ( true ) ; 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 { <START_BUG> IResource [ ] members = ( ( IContainer ) ( project . getUnderlyingResource ( ) ) ) . members ( ) ; <END_BUG> 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 . findPackageFragmentRoot0 ( 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 . findPackageFragmentRoot0 ( resFullPath ) ) == null ) ) && ( ( project . findPackageFragment0 ( 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 SearchableEnvironment getSearchableEnvironment ( ) { } protected void setNameLookup ( NameLookup newNameLookup ) { } synchronized void setNonJavaResources ( Object [ ] resources ) { } protected void setOutputLocation ( IPath newOutputLocation ) { } protected void setSearchableEnvironment ( SearchableEnvironment newSearchableEnvironment ) { } }

Fix:
IResource [ ] members = ( ( IContainer ) ( project . getResource ( ) ) ) . members ( ) ;