Buggy code:
public class EeSubsystemAdd extends AbstractBoottimeAddStepHandler { private final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor ; private final GlobalModuleDependencyProcessor moduleDependencyProcessor ; private final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor ; private final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor ; public EeSubsystemAdd ( final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor , final GlobalModuleDependencyProcessor moduleDependencyProcessor , final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor , final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor ) { } protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } protected void performBoottime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { final EEJndiViewExtension extension = new EEJndiViewExtension ( ) ; context . getServiceTarget ( ) . addService ( SERVICE_NAME , extension ) . addDependency ( JndiViewExtensionRegistry . SERVICE_NAME , JndiViewExtensionRegistry . class , extension . getRegistryInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; final boolean appclient = ( context . getProcessType ( ) ) == ( ProcessType . APPLICATION_CLIENT ) ; final ModelNode globalModules = INSTANCE . resolveModelAttribute ( context , model ) ; final boolean earSubDeploymentsIsolated = EAR_SUBDEPLOYMENTS_ISOLATED . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final boolean specDescriptorPropertyReplacement = SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final boolean jbossDescriptorPropertyReplacement = JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT . resolveModelAttribute ( context , model ) . asBoolean ( ) ; moduleDependencyProcessor . setGlobalModules ( GlobalModulesDefinition . createModuleList ( context , globalModules ) ) ; isolationProcessor . setEarSubDeploymentsIsolated ( earSubDeploymentsIsolated ) ; specDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( specDescriptorPropertyReplacement ) ; jbossDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( jbossDescriptorPropertyReplacement ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { EeLogger . ROOT_LOGGER . debug ( "Activating<seq2seq4repair_space>EE<seq2seq4repair_space>subsystem" ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_DEPLOYMENT_PROPERTIES , new DeploymentPropertiesProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_DEPLOYMENT_PROPERTY_RESOLVER , new DeploymentPropertyResolverProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_VAULT_PROPERTY_RESOLVER , new VaultPropertyResolverProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_SYSTEM_PROPERTY_RESOLVER , new SystemPropertyResolverProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_PROPERTY_RESOLVER , new PropertyResolverProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_EE_APP , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < org . jboss . metadata . ear . jboss . JBossAppMetaData > ( AppJBossAllParser . ROOT_ELEMENT , AppJBossAllParser . ATTACHMENT_KEY , new AppJBossAllParser ( ) ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_SPEC_DESC_PROPERTY_REPLACEMENT , specDescriptorPropertyReplacementProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_JBOSS_DESC_PROPERTY_REPLACEMENT , jbossDescriptorPropertyReplacementProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EAR_DEPLOYMENT_INIT , new EarInitializationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EAR_APP_XML_PARSE , new EarMetaDataParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_JBOSS_EJB_CLIENT_XML_PARSE , new EJBClientDescriptorParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EJB_EAR_APPLICATION_NAME , new EarApplicationNameProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EAR , new EarStructureProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EJB_JAR_IN_EAR , new EjbJarDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_APPLICATION_CLIENT_IN_EAR , new ApplicationClientDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_MANAGED_BEAN_JAR_IN_EAR , new ManagedBeanSubDeploymentMarkingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_MODULE_INIT , new org . jboss . as . ee . component . deployers . EEModuleInitialProcessor ( ( ( context . getProcessType ( ) ) == ( ProcessType . APPLICATION_CLIENT ) ) ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_EE_RESOURCE_INJECTION_REGISTRY , new ResourceReferenceRegistrySetupProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_GLOBAL_MODULES , moduleDependencyProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EE_MODULE_NAME , new EEModuleNameProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EE_ANNOTATIONS , new EEAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_LIFECYCLE_ANNOTATION , new LifecycleAnnotationParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_AROUNDINVOKE_ANNOTATION , new AroundInvokeAnnotationParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EAR_SUBDEPLOYMENTS_ISOLATION_DEFAULT , isolationProcessor ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_DISTINCT_NAME , new EEDistinctNameProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_EAR_MESSAGE_DESTINATIONS , new EarMessageDestinationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_MANAGED_BEAN_ANNOTATION , new ManagedBeanAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_DESCRIPTOR_LIFECYCLE_METHOD_RESOLUTION , new DescriptorEnvironmentLifecycleMethodProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_EE_PERMISSIONS , new EEDefaultPermissionsProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_MANAGED_BEAN , new JavaEEDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_EE_CLASS_DESCRIPTIONS , new ApplicationClassesAggregationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_VALIDATOR_FACTORY , new BeanValidationFactoryDeployer ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EAR_DEPENDENCY , new EarDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_INITIALIZE_IN_ORDER , new InitializeInOrderProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_INJECTION_ANNOTATION , new ResourceInjectionAnnotationParsingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_ENV_ENTRY , new ResourceReferenceProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_INTERCEPTOR_ANNOTATIONS , new InterceptorAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_NAMING_CONTEXT , new ModuleContextProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_IN_APP_CLIENT , new InApplicationClientBindingProcessor ( appclient ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_EE_INSTANCE_NAME , new InstanceNameBindingProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_APP_NAMING_CONTEXT , new ApplicationContextProcessor ( ) ) ;

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < org . jboss . metadata . ear . jboss . JBossAppMetaData > ( AppJBossAllParser . ROOT_ELEMENT , AppJBossAllParser . ATTACHMENT_KEY , new AppJBossAllParser ( ) ) ) ;