Buggy code:
class JavaProjectElementInfo extends OpenableElementInfo { protected NameLookup fNameLookup = null ; protected SearchableEnvironment fSearchableEnvironment = null ; private Object [ ] fNonJavaResources ; public JavaProjectElementInfo ( ) { } private Object [ ] computeNonJavaResources ( JavaProject project ) { IPath projectPath = project . getProject ( ) . getFullPath ( ) ; boolean srcIsProject = false ; boolean binIsProject = false ; char [ ] [ ] exclusionPatterns = null ; 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 ; <START_BUG> exclusionPatterns = ( ( ClasspathEntry ) ( entry ) ) . fulExclusionPatternChars ( ) ; <END_BUG> break ; } } binIsProject = projectPath . equals ( project . getOutputLocation ( ) ) ; } catch ( JavaModelException e ) { } Object [ ] nonJavaResources = new IResource [ 5 ] ; int nonJavaResourcesCounter = 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 ( ( project . findPackageFragmentRoot0 ( resFullPath ) ) == null ) { if ( ( srcIsProject && ( Util . isValidCompilationUnitName ( resName ) ) ) && ( ! ( Util . isExcluded ( res , exclusionPatterns ) ) ) ) { 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 SearchableEnvironment getSearchableEnvironment ( ) { } protected void setNameLookup ( NameLookup newNameLookup ) { } synchronized void setNonJavaResources ( Object [ ] resources ) { } protected void setSearchableEnvironment ( SearchableEnvironment newSearchableEnvironment ) { } }

Fix:
exclusionPatterns = ( ( ClasspathEntry ) ( entry ) ) . fullExclusionPatternChars ( ) ;