Buggy code:
public class JavaProject extends Openable implements IProjectNature , IJavaProject { protected static final String [ ] NO_PREREQUISITES = new String [ 0 ] ; protected IProject fProject ; public JavaProject ( ) { } public JavaProject ( IProject project , IJavaElement parent ) { } protected void addToBuildSpec ( String builderID ) throws CoreException { } public static IPath canonicalizedPath ( IPath externalPath ) { } public String computeSharedPropertyFileName ( QualifiedName qName ) { } public void configure ( ) throws CoreException { } protected IClasspathEntry createClasspathEntry ( IPath path , int kind , IPath sourceAttachmentPath , IPath sourceAttachmentRootPath ) { } protected OpenableElementInfo createElementInfo ( ) { } public void deconfigure ( ) throws CoreException { } protected IClasspathEntry [ ] defaultClasspath ( ) throws JavaModelException { } protected IPath defaultOutputLocation ( ) throws JavaModelException { } public boolean equals ( Object o ) { } public IJavaElement findElement ( IPath path ) throws JavaModelException { } public IPackageFragment findPackageFragment ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot findPackageFragmentRoot ( IPath path ) throws JavaModelException { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Hashtable newElements , IResource underlyingResource ) throws JavaModelException { } public IPackageFragmentRoot [ ] getAllPackageFragmentRoots ( ) throws JavaModelException { } public IPackageFragment [ ] getAllPackageFragments ( ) throws JavaModelException { } public IPackageFragmentRoot [ ] getBuilderRoots ( IResourceDelta delta ) throws JavaModelException { } public IJavaElement [ ] getChildren ( ) throws JavaModelException { } protected String getClasspathAsXMLString ( IClasspathEntry [ ] classpath , IPath outputLocation ) throws JavaModelException { } public IClasspathEntry getClasspathEntryFor ( IPath path ) throws JavaModelException { } public QualifiedName getClasspathPropertyName ( ) { } protected static Element getEntryAsXMLElement ( Document document , IClasspathEntry entry , IPath prefixPath ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } private ICommand getJavaCommand ( IProjectDescription description ) throws CoreException { } public IJavaProject getJavaProject ( ) { } protected JavaProjectElementInfo getJavaProjectElementInfo ( ) throws JavaModelException { } public INameLookup getNameLookup ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public IPath getOutputLocation ( ) throws JavaModelException { } public IPackageFragmentRoot getPackageFragmentRoot ( String jarPath ) { } public IPackageFragmentRoot getPackageFragmentRoot ( IResource resource ) { } public IPackageFragmentRoot getPackageFragmentRoot ( IPath path ) { IResource resource = null ; if ( ( ! ( path . isAbsolute ( ) ) ) || ( ( resource = getProject ( ) . getWorkspace ( ) . getRoot ( ) . findMember ( path ) ) != null ) ) { if ( resource != null ) { return getPackageFragmentRoot ( resource ) ; } if ( ( path . segmentCount ( ) ) > 0 ) { String ext = path . getFileExtension ( ) ; if ( ext == null ) { return getPackageFragmentRoot ( getProject ( ) . getFolder ( path ) ) ; } else { return getPackageFragmentRoot ( getProject ( ) . getFile ( path ) ) ; } } else { return getPackageFragmentRoot ( getProject ( ) ) ; } } else { String ext = path . getFileExtension ( ) ; <START_BUG> if ( ( "jar" . equalsIgnoreCase ( ext ) ) || ( "class" . equalsIgnoreCase ( ext ) ) ) { <END_BUG> return getPackageFragmentRoot ( path . toString ( ) ) ; } else { return null ; } } } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( ) throws JavaModelException { } protected IPackageFragmentRoot [ ] getPackageFragmentRoots ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( IClasspathEntry entry ) { } public IPackageFragment [ ] getPackageFragments ( ) throws JavaModelException { } protected IPackageFragment [ ] getPackageFragmentsInRoots ( IPackageFragmentRoot [ ] roots ) { } public IProject getProject ( ) { } public IClasspathEntry [ ] getRawClasspath ( ) throws JavaModelException { } public String [ ] getRequiredProjectNames ( ) throws JavaModelException { } public IClasspathEntry [ ] getResolvedClasspath ( boolean ignoreUnresolvedVariable ) throws JavaModelException { } public ISearchableNameEnvironment getSearchableNameEnvironment ( ) throws JavaModelException { } public String getSharedProperty ( QualifiedName key ) throws CoreException { } public SourceMapper getSourceMapper ( ) { } public IResource getUnderlyingResource ( ) throws JavaModelException { } public boolean hasBuildState ( ) { } public boolean hasClasspathCycle ( IClasspathEntry [ ] entries ) { } public int hashCode ( ) { } public boolean hasSource ( ) { } public boolean isClasspathEqualsTo ( IClasspathEntry [ ] otherClasspathWithOutput ) throws JavaModelException { } static int kindFromString ( String kindStr ) { } static String kindToString ( int kind ) { } public String loadClasspath ( ) throws JavaModelException { } public IEvaluationContext newEvaluationContext ( ) { } public ITypeHierarchy newTypeHierarchy ( IRegion region , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IType type , IRegion region , IProgressMonitor monitor ) throws JavaModelException { } public void open ( IProgressMonitor pm ) throws JavaModelException { } protected void openWhenClosed ( IProgressMonitor pm ) throws JavaModelException { } private String [ ] projectPrerequisites ( IClasspathEntry [ ] entries ) throws JavaModelException { } protected IClasspathEntry [ ] readPaths ( String xmlClasspath ) throws IOException { } protected void removeFromBuildSpec ( String builderID ) throws CoreException { } protected void resetNonJavaResourcesForPackageFragmentRoots ( ) throws JavaModelException { } private IResource retrieveResource ( IPath path , IResourceDelta delta ) throws JavaModelException { } public void saveClasspath ( ) throws JavaModelException { } public void saveClasspath ( boolean force ) throws JavaModelException { } private void setJavaCommand ( IProjectDescription description , ICommand newCommand ) throws CoreException { } public void setOutputLocation ( IPath outputLocation , IProgressMonitor monitor ) throws JavaModelException { } protected void setOutputLocation0 ( IPath outputLocation ) throws JavaModelException { } public void setProject ( IProject project ) { } public void setRawClasspath ( IClasspathEntry [ ] entries , IProgressMonitor monitor ) throws JavaModelException { }

Fix:
if ( ( "jar" . equalsIgnoreCase ( ext ) ) || ( "zip" . equalsIgnoreCase ( ext ) ) ) {