Buggy code:
public class WeldDeploymentProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.weld" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; <START_BUG> if ( ! ( WeldDeploymentMarker . isWeldDeployment ( deploymentUnit ) ) ) { <END_BUG> return ; } if ( ( deploymentUnit . getParent ( ) ) != null ) { return ; } WeldDeploymentProcessor . log . info ( ( "Starting<seq2seq4repair_space>Services<seq2seq4repair_space>for<seq2seq4repair_space>CDI<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( phaseContext . getDeploymentUnit ( ) . getName ( ) ) ) ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final Set < BeanDeploymentModule > beanDeploymentModules = new HashSet < BeanDeploymentModule > ( ) ; final Set < BeanDeploymentModule > globalBeanDeploymentModules = new HashSet < BeanDeploymentModule > ( ) ; final Set < BeanDeploymentArchiveImpl > beanDeploymentArchives = new HashSet < BeanDeploymentArchiveImpl > ( ) ; final BeanDeploymentModule rootBeanDeploymentModule = deploymentUnit . getAttachment ( BEAN_DEPLOYMENT_MODULE ) ; final EEModuleDescription eeModuleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; globalBeanDeploymentModules . add ( rootBeanDeploymentModule ) ; beanDeploymentArchives . addAll ( rootBeanDeploymentModule . getBeanDeploymentArchives ( ) ) ; final List < DeploymentUnit > subDeployments = deploymentUnit . getAttachmentList ( SUB_DEPLOYMENTS ) ; final Set < ClassLoader > subDeploymentLoaders = new HashSet < ClassLoader > ( ) ; for ( DeploymentUnit subDeployment : subDeployments ) { final Module subDeploymentModule = subDeployment . getAttachment ( MODULE ) ; if ( module != null ) { subDeploymentLoaders . add ( subDeploymentModule . getClassLoader ( ) ) ; } final BeanDeploymentModule bdm = subDeployment . getAttachment ( BEAN_DEPLOYMENT_MODULE ) ; if ( bdm == null ) { continue ; } beanDeploymentArchives . addAll ( bdm . getBeanDeploymentArchives ( ) ) ; if ( bdm != null ) { beanDeploymentModules . add ( bdm ) ; if ( ! ( PrivateSubDeploymentMarker . isPrivate ( subDeployment ) ) ) { globalBeanDeploymentModules . add ( bdm ) ; } } } for ( BeanDeploymentModule bdm : beanDeploymentModules ) { if ( bdm == rootBeanDeploymentModule ) { continue ; } bdm . addBeanDeploymentModules ( globalBeanDeploymentModules ) ; } final List < Metadata < Extension > > extensions = deploymentUnit . getAttachmentList ( PORTABLE_EXTENSIONS ) ; final WeldDeployment deployment = new WeldDeployment ( beanDeploymentArchives , extensions , module , subDeploymentLoaders ) ; final WeldContainer weldContainer = new WeldContainer ( deployment , Environments . EE_INJECT ) ; final ValidatorFactory factory = deploymentUnit . getAttachment ( VALIDATOR_FACTORY ) ; weldContainer . addWeldService ( ValidationServices . class , new org . jboss . as . weld . services . bootstrap . WeldValidationServices ( factory ) ) ; final EjbInjectionServices ejbInjectionServices = new org . jboss . as . weld . services . bootstrap . WeldEjbInjectionServices ( deploymentUnit . getServiceRegistry ( ) , eeModuleDescription ) ; weldContainer . addWeldService ( EjbInjectionServices . class , ejbInjectionServices ) ; weldContainer . addWeldService ( EjbServices . class , new org . jboss . as . weld . services . bootstrap . WeldEjbServices ( deploymentUnit . getServiceRegistry ( ) ) ) ; final JpaInjectionServices rootJpaInjectionServices = new org . jboss . as . weld . services . bootstrap . WeldJpaInjectionServices ( deploymentUnit , deploymentUnit . getServiceRegistry ( ) ) ; weldContainer . addWeldService ( JpaInjectionServices . class , rootJpaInjectionServices ) ; final WeldService weldService = new WeldService ( weldContainer ) ; final ServiceName weldServiceName = deploymentUnit . getServiceName ( ) . append ( SERVICE_NAME ) ; final ServiceBuilder < WeldContainer > weldServiceBuilder = serviceTarget . addService ( weldServiceName , weldService ) ; weldServiceBuilder . addDependencies ( TCCLSingletonService . SERVICE_NAME ) ; installResourceInjectionService ( serviceTarget , deploymentUnit , weldService , weldServiceBuilder ) ; installSecurityService ( serviceTarget , deploymentUnit , weldService , weldServiceBuilder ) ; installTransactionService ( serviceTarget , deploymentUnit , weldService , weldServiceBuilder ) ; weldServiceBuilder . install ( ) ; } private ServiceName installSecurityService ( ServiceTarget serviceTarget , DeploymentUnit deploymentUnit , WeldService weldService , ServiceBuilder < WeldContainer > weldServiceBuilder ) { } private ServiceName installResourceInjectionService ( ServiceTarget serviceTarget , DeploymentUnit deploymentUnit , WeldService weldService , ServiceBuilder < WeldContainer > weldServiceBuilder ) { } private ServiceName installTransactionService ( final ServiceTarget serviceTarget , final DeploymentUnit deploymentUnit , WeldService weldService , ServiceBuilder < WeldContainer > weldServiceBuilder ) { } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( ! ( WeldDeploymentMarker . isPartOfWeldDeployment ( deploymentUnit ) ) ) {