Buggy code:
String entryPathMsg = ( pathStartsWithProject ) ? path . removeFirstSegments ( 1 ) . toString ( ) : path . makeRelative ( ) . toString ( ) ; switch ( entry . getEntryKind ( ) ) { case IClasspathEntry . CPE_CONTAINER : if ( ( path != null ) && ( ( path . segmentCount ( ) ) >= 1 ) ) { try { IClasspathContainer container = JavaCore . getClasspathContainer ( path , project ) ; if ( container == null ) { return new JavaModelStatus ( IJavaModelStatusConstants . CP_CONTAINER_PATH_UNBOUND , project , path ) ; } IClasspathEntry [ ] containerEntries = container . getClasspathEntries ( ) ; if ( containerEntries != null ) { for ( int i = 0 , length = containerEntries . length ; i < length ; i ++ ) { IClasspathEntry containerEntry = containerEntries [ i ] ; int kind = ( containerEntry == null ) ? 0 : containerEntry . getEntryKind ( ) ; if ( ( ( ( containerEntry == null ) || ( kind == ( IClasspathEntry . CPE_SOURCE ) ) ) || ( kind == ( IClasspathEntry . CPE_VARIABLE ) ) ) || ( kind == ( IClasspathEntry . CPE_CONTAINER ) ) ) { String description = container . getDescription ( ) ; if ( description == null ) description = path . makeRelative ( ) . toString ( ) ; return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CP_CONTAINER_ENTRY , project , path ) ; } if ( recurseInContainers ) { IJavaModelStatus containerEntryStatus = ClasspathEntry . validateClasspathEntry ( project , containerEntry , checkSourceAttachment , recurseInContainers ) ; if ( ! ( containerEntryStatus . isOK ( ) ) ) { return containerEntryStatus ; } } } } } catch ( JavaModelException e ) { return new JavaModelStatus ( e ) ; } } else { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.illegalContainerPath" , entryPathMsg , projectName ) ) ; } break ; case IClasspathEntry . CPE_VARIABLE : if ( ( path != null ) && ( ( path . segmentCount ( ) ) >= 1 ) ) { entry = JavaCore . getResolvedClasspathEntry ( entry ) ; if ( entry == null ) { return new JavaModelStatus ( IJavaModelStatusConstants . CP_VARIABLE_PATH_UNBOUND , project , path ) ; } return ClasspathEntry . validateClasspathEntry ( project , entry , checkSourceAttachment , recurseInContainers ) ; } else { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.illegalVariablePath" , path . makeRelative ( ) . toString ( ) , projectName ) ) ; } case IClasspathEntry . CPE_LIBRARY : if ( ( ( path != null ) && ( path . isAbsolute ( ) ) ) && ( ! ( path . isEmpty ( ) ) ) ) { IPath sourceAttachment = entry . getSourceAttachmentPath ( ) ; Object target = JavaModel . getTarget ( workspaceRoot , path , true ) ; if ( ( target != null ) && ( ( project . getOption ( JavaCore . CORE_INCOMPATIBLE_JDK_LEVEL , true ) ) != ( JavaCore . IGNORE ) ) ) { long projectTargetJDK = CompilerOptions . versionToJdkLevel ( project . getOption ( JavaCore . COMPILER_CODEGEN_TARGET_PLATFORM , true ) ) ; long libraryJDK = Util . getJdkLevel ( target ) ; if ( ( libraryJDK != 0 ) && ( libraryJDK > projectTargetJDK ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . INCOMPATIBLE_JDK_LEVEL , project , path , CompilerOptions . versionFromJdkLevel ( libraryJDK ) ) ; } } if ( target instanceof IResource ) { IResource resolvedResource = ( ( IResource ) ( target ) ) ; switch ( resolvedResource . getType ( ) ) { case IResource . FILE : <START_BUG> if ( Util . isArchiveFileName ( resolvedResource . getFileExtension ( ) ) ) { <END_BUG> if ( ( ( checkSourceAttachment && ( sourceAttachment != null ) ) && ( ! ( sourceAttachment . isEmpty ( ) ) ) ) && ( ( JavaModel . getTarget ( workspaceRoot , sourceAttachment , true ) ) == null ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.unboundSourceAttachment" , new String [ ] { sourceAttachment . makeRelative ( ) . toString ( ) , path . makeRelative ( ) . toString ( ) , projectName } ) ) ; } } break ; case IResource . FOLDER : if ( ( ( checkSourceAttachment && ( sourceAttachment != null ) ) && ( ! ( sourceAttachment . isEmpty ( ) ) ) ) && ( ( JavaModel . getTarget ( workspaceRoot , sourceAttachment , true ) ) == null ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.unboundSourceAttachment" , new String [ ] { sourceAttachment . makeRelative ( ) . toString ( ) , path . makeRelative ( ) . toString ( ) , projectName } ) ) ; } } } else if ( target instanceof File ) { if ( ( ( checkSourceAttachment && ( sourceAttachment != null ) ) && ( ! ( sourceAttachment . isEmpty ( ) ) ) ) && ( ( JavaModel . getTarget ( workspaceRoot , sourceAttachment , true ) ) == null ) ) { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.unboundSourceAttachment" , new String [ ] { sourceAttachment . toString ( ) , path . makeRelative ( ) . toString ( ) , projectName } ) ) ; } } else { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.unboundLibrary" , path . makeRelative ( ) . toString ( ) , projectName ) ) ; } } else { return new JavaModelStatus ( IJavaModelStatusConstants . INVALID_CLASSPATH , Util . bind ( "classpath.illegalLibraryPath" , path . makeRelative ( ) . toString ( ) , projectName ) ) ; } break ;

Fix:
if ( org . eclipse . jdt . internal . compiler . util . Util . isArchiveFileName ( resolvedResource . getFileExtension ( ) ) ) {