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 , JavaElement parent ) { } protected void addToBuildSpec ( String builderID ) throws CoreException { } protected boolean buildStructure ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } protected void closing ( Object info ) throws JavaModelException { } public void computeChildren ( JavaProjectElementInfo info ) throws JavaModelException { } private void computeExpandedClasspath ( JavaProject initialProject , boolean ignoreUnresolvedVariable , boolean generateMarkerOnError , HashSet visitedProjects , ObjectVector accumulatedEntries ) throws JavaModelException { if ( visitedProjects . contains ( this ) ) { return ; } visitedProjects . add ( this ) ; if ( generateMarkerOnError && ( ! ( this . equals ( initialProject ) ) ) ) { generateMarkerOnError = false ; } IClasspathEntry [ ] immediateClasspath = getResolvedClasspath ( ignoreUnresolvedVariable , generateMarkerOnError ) ; IWorkspaceRoot workspaceRoot = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 , length = immediateClasspath . length ; i < length ; i ++ ) { IClasspathEntry entry = immediateClasspath [ i ] ; boolean isInitialProject = this . equals ( initialProject ) ; if ( isInitialProject || ( entry . isExported ( ) ) ) { accumulatedEntries . add ( entry ) ; <START_BUG> if ( ( entry . getEntryKind ( ) ) == ( ClasspathEntry . CPE_PROJECT ) ) { <END_BUG> IResource member = workspaceRoot . findMember ( entry . getPath ( ) ) ; if ( ( member != null ) && ( ( member . getType ( ) ) == ( IResource . PROJECT ) ) ) { IProject projRsc = ( ( IProject ) ( member ) ) ; if ( JavaProject . hasJavaNature ( projRsc ) ) { JavaProject project = ( ( JavaProject ) ( JavaCore . create ( projRsc ) ) ) ; project . computeExpandedClasspath ( initialProject , ignoreUnresolvedVariable , generateMarkerOnError , visitedProjects , accumulatedEntries ) ; } } } } } } 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 Object 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 IJavaElement findElement ( IPath path , WorkingCopyOwner owner ) 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 fullyQualifiedName , WorkingCopyOwner owner ) throws JavaModelException { } public IType findType ( String packageName , String typeQualifiedName ) throws JavaModelException { } public IType findType ( String packageName , String typeQualifiedName , WorkingCopyOwner owner ) throws JavaModelException { } protected void flushClasspathProblemMarkers ( boolean flushCycleMarkers , boolean flushClasspathFormatMarkers ) { } public void forceClasspathReload ( IProgressMonitor monitor ) throws JavaModelException { } 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 { }

Fix:
if ( ( entry . getEntryKind ( ) ) == ( IClasspathEntry . CPE_PROJECT ) ) {