Buggy code:
public final class ManifestClassPathProcessor implements DeploymentUnitProcessor { private static final String [ ] EMPTY_STRING_ARRAY = new String [ ] { } ; public synchronized void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final DeploymentUnit parent = deploymentUnit . getParent ( ) ; final DeploymentUnit topLevelDeployment = ( parent == null ) ? deploymentUnit : parent ; final VirtualFile topLevelRoot = topLevelDeployment . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; final ExternalModuleService externalModuleService = topLevelDeployment . getAttachment ( EXTERNAL_MODULE_SERVICE ) ; final ResourceRoot deploymentRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; final Set < VirtualFile > existingAccessibleRoots = new HashSet < VirtualFile > ( ) ; final Map < VirtualFile , ResourceRoot > subDeployments = new HashMap < VirtualFile , ResourceRoot > ( ) ; for ( ResourceRoot root : DeploymentUtils . allResourceRoots ( topLevelDeployment ) ) { if ( SubDeploymentMarker . isSubDeployment ( root ) ) { subDeployments . put ( root . getRoot ( ) , root ) ; } else if ( ModuleRootMarker . isModuleRoot ( root ) ) { existingAccessibleRoots . add ( root . getRoot ( ) ) ; } } final ArrayDeque < ManifestClassPathProcessor . RootEntry > resourceRoots = new ArrayDeque < ManifestClassPathProcessor . RootEntry > ( ) ; if ( ( deploymentUnit . getParent ( ) ) != null ) { for ( ResourceRoot root : DeploymentUtils . allResourceRoots ( deploymentUnit ) ) { if ( ModuleRootMarker . isModuleRoot ( root ) ) { existingAccessibleRoots . add ( root . getRoot ( ) ) ; } } } for ( ResourceRoot root : DeploymentUtils . allResourceRoots ( deploymentUnit ) ) { resourceRoots . add ( new ManifestClassPathProcessor . RootEntry ( deploymentUnit , root ) ) ; } final Map < VirtualFile , AdditionalModuleSpecification > additionalModules = new HashMap < VirtualFile , AdditionalModuleSpecification > ( ) ; for ( AdditionalModuleSpecification module : topLevelDeployment . getAttachmentList ( ADDITIONAL_MODULES ) ) { for ( ResourceRoot additionalModuleResourceRoot : module . getResourceRoots ( ) ) { additionalModules . put ( additionalModuleResourceRoot . getRoot ( ) , module ) ; } } while ( ! ( resourceRoots . isEmpty ( ) ) ) { final ManifestClassPathProcessor . RootEntry entry = resourceRoots . pop ( ) ; final ResourceRoot resourceRoot = entry . resourceRoot ; final Attachable target = entry . target ; if ( ( SubDeploymentMarker . isSubDeployment ( resourceRoot ) ) && ( resourceRoot != deploymentRoot ) ) { continue ; } final String [ ] items = ManifestClassPathProcessor . getClassPathEntries ( resourceRoot ) ; for ( final String item : items ) { <START_BUG> if ( item . isEmpty ( ) ) { <END_BUG> continue ; } final VirtualFile classPathFile = resourceRoot . getRoot ( ) . getParent ( ) . getChild ( item ) ; final VirtualFile topLevelClassPathFile = deploymentRoot . getRoot ( ) . getParent ( ) . getChild ( item ) ; if ( item . startsWith ( "//" ) ) { if ( externalModuleService . isValid ( item ) ) { final ModuleIdentifier moduleIdentifier = externalModuleService . addExternalModule ( item ) ; target . addToAttachmentList ( CLASS_PATH_ENTRIES , moduleIdentifier ) ; DEPLOYMENT_LOGGER . debugf ( "Resource<seq2seq4repair_space>%s<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>external<seq2seq4repair_space>jar<seq2seq4repair_space>%s" , classPathFile , resourceRoot . getRoot ( ) ) ; } else { DEPLOYMENT_LOGGER . classPathEntryNotValid ( item , resourceRoot . getRoot ( ) . getPathName ( ) ) ; } } else { if ( classPathFile . exists ( ) ) { boolean found = false ; VirtualFile file = classPathFile . getParent ( ) ; while ( file != null ) { if ( file . equals ( topLevelRoot ) ) { found = true ; } file = file . getParent ( ) ; } if ( ! found ) { DEPLOYMENT_LOGGER . classPathEntryNotValid ( item , resourceRoot . getRoot ( ) . getPathName ( ) ) ; } else { handlingExistingClassPathEntry ( resourceRoots , topLevelDeployment , topLevelRoot , subDeployments , additionalModules , existingAccessibleRoots , resourceRoot , target , classPathFile ) ; } } else if ( topLevelClassPathFile . exists ( ) ) { boolean found = false ; VirtualFile file = topLevelClassPathFile . getParent ( ) ; while ( file != null ) { if ( file . equals ( topLevelRoot ) ) { found = true ; } file = file . getParent ( ) ; } if ( ! found ) { DEPLOYMENT_LOGGER . classPathEntryNotValid ( item , resourceRoot . getRoot ( ) . getPathName ( ) ) ; } else { handlingExistingClassPathEntry ( resourceRoots , topLevelDeployment , topLevelRoot , subDeployments , additionalModules , existingAccessibleRoots , resourceRoot , target , topLevelClassPathFile ) ; } } else { DEPLOYMENT_LOGGER . classPathEntryNotValid ( item , resourceRoot . getRoot ( ) . getPathName ( ) ) ; } } } } } private void handlingExistingClassPathEntry ( final ArrayDeque < ManifestClassPathProcessor . RootEntry > resourceRoots , final DeploymentUnit topLevelDeployment , final VirtualFile topLevelRoot , final Map < VirtualFile , ResourceRoot > subDeployments , final Map < VirtualFile , AdditionalModuleSpecification > additionalModules , final Set < VirtualFile > existingAccessibleRoots , final ResourceRoot resourceRoot , final Attachable target , final VirtualFile classPathFile ) throws DeploymentUnitProcessingException { } private ModuleIdentifier createAdditionalModule ( final ResourceRoot resourceRoot , final DeploymentUnit topLevelDeployment , final VirtualFile topLevelRoot , final Map < VirtualFile , AdditionalModuleSpecification > additionalModules , final VirtualFile classPathFile , final ArrayDeque < ManifestClassPathProcessor . RootEntry > resourceRoots ) throws DeploymentUnitProcessingException { } private static String [ ] getClassPathEntries ( final ResourceRoot resourceRoot ) { } private synchronized ResourceRoot createResourceRoot ( final VirtualFile file ) throws DeploymentUnitProcessingException { } public void undeploy ( final DeploymentUnit context ) { } private class RootEntry { private final ResourceRoot resourceRoot ; private final Attachable target ; private RootEntry ( final Attachable target , final ResourceRoot resourceRoot ) { } } }

Fix:
if ( ( item . isEmpty ( ) ) || ( item . equals ( "." ) ) ) {