Buggy code:
public class EarStructureProcessor implements DeploymentUnitProcessor { private static final String JAR_EXTENSION = ".jar" ; private static final String WAR_EXTENSION = ".war" ; private static final List < String > CHILD_ARCHIVE_EXTENSIONS = new ArrayList < String > ( ) ; private static final SuffixMatchFilter CHILD_ARCHIVE_FILTER = new SuffixMatchFilter ( EarStructureProcessor . CHILD_ARCHIVE_EXTENSIONS , new VisitorAttributes ( ) { public boolean isLeavesOnly ( ) { } } ) ; private static final String DEFAULT_LIB_DIR = "lib" ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( EAR , deploymentUnit ) ) ) { return ; } final ResourceRoot resourceRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) ; final VirtualFile virtualFile = resourceRoot . getRoot ( ) ; resourceRoot . putAttachment ( INDEX_RESOURCE_ROOT , false ) ; ModuleRootMarker . mark ( resourceRoot , false ) ; String libDirName = EarStructureProcessor . DEFAULT_LIB_DIR ; final JBossAppMetaData appMetaData = deploymentUnit . getAttachment ( JBOSS_APP_METADATA ) ; final EarMetaData earMetaData = deploymentUnit . getAttachment ( EAR_METADATA ) ; if ( appMetaData != null ) { final String xmlLibDirName = appMetaData . getLibraryDirectory ( ) ; if ( xmlLibDirName != null ) { libDirName = xmlLibDirName ; } } else { if ( earMetaData != null ) { if ( earMetaData instanceof Ear5xMetaData ) { final String xmlLibDirName = Ear5xMetaData . class . cast ( earMetaData ) . getLibraryDirectory ( ) ; if ( xmlLibDirName != null ) { libDirName = xmlLibDirName ; } } } } try { final VirtualFile libDir ; if ( ! ( libDirName . isEmpty ( ) ) ) { libDir = virtualFile . getChild ( libDirName ) ; if ( libDir . exists ( ) ) { List < VirtualFile > libArchives = libDir . getChildren ( EarStructureProcessor . CHILD_ARCHIVE_FILTER ) ; for ( final VirtualFile child : libArchives ) { final Closeable closable = ( child . isFile ( ) ) ? VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) : null ; final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ; if ( child . getName ( ) . toLowerCase ( ) . endsWith ( EarStructureProcessor . JAR_EXTENSION ) ) { ModuleRootMarker . mark ( childResource ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; } } } } else { libDir = null ; } final List < VirtualFile > childArchives = new ArrayList < VirtualFile > ( virtualFile . getChildren ( new SuffixMatchFilter ( EarStructureProcessor . CHILD_ARCHIVE_EXTENSIONS , new VisitorAttributes ( ) { @ Override public boolean isLeavesOnly ( ) { return false ; } @ Override public boolean isRecurse ( VirtualFile file ) { if ( file . equals ( libDir ) ) { return false ; } for ( String suffix : EarStructureProcessor . CHILD_ARCHIVE_EXTENSIONS ) { if ( file . getName ( ) . endsWith ( suffix ) ) { return false ; } } return true ; } } ) ) ) ; if ( earMetaData == null ) { for ( final VirtualFile child : childArchives ) { final Closeable closable = ( child . isFile ( ) ) ? VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) : null ; final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; if ( child . getName ( ) . toLowerCase ( ) . endsWith ( EarStructureProcessor . WAR_EXTENSION ) ) { SubDeploymentMarker . mark ( childResource ) ; childResource . putAttachment ( INDEX_RESOURCE_ROOT , false ) ; } } } else { Set < VirtualFile > subDeploymentFiles = new HashSet < VirtualFile > ( ) ; for ( ModuleMetaData module : earMetaData . getModules ( ) ) { VirtualFile moduleFile = virtualFile . getChild ( module . getFileName ( ) ) ; if ( ! ( moduleFile . exists ( ) ) ) { throw new DeploymentUnitProcessingException ( ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>modules<seq2seq4repair_space>in<seq2seq4repair_space>application.xml<seq2seq4repair_space>for<seq2seq4repair_space>EAR<seq2seq4repair_space>[" + virtualFile ) + "],<seq2seq4repair_space>module<seq2seq4repair_space>file<seq2seq4repair_space>" ) + ( module . getFileName ( ) ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } final Closeable closable = ( moduleFile . isFile ( ) ) ? VFS . mountZip ( moduleFile , moduleFile , TempFileProviderService . provider ( ) ) : null ; final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( moduleFile , mountHandle ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; childResource . putAttachment ( MODULE_META_DATA , module ) ; subDeploymentFiles . add ( moduleFile ) ; SubDeploymentMarker . mark ( childResource ) ; if ( ( module . getType ( ) ) == ( ModuleType . Web ) ) { childResource . putAttachment ( INDEX_RESOURCE_ROOT , false ) ; } } for ( final VirtualFile child : childArchives ) { if ( subDeploymentFiles . contains ( child ) ) { continue ; } <START_BUG> if ( child . getName ( ) . toLowerCase ( ) . endsWith ( EarStructureProcessor . JAR_EXTENSION ) ) { <END_BUG> final Closeable closable = ( child . isFile ( ) ) ? VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) : null ; final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; } } } } catch ( IOException e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>children<seq2seq4repair_space>for<seq2seq4repair_space>EAR<seq2seq4repair_space>[" + virtualFile ) + "]" ) , e ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( child . getLowerCaseName ( ) . toLowerCase ( ) . endsWith ( EarStructureProcessor . JAR_EXTENSION ) ) {