Buggy code:
public static final SimpleAttributeDefinition MANAGEMENT_MAJOR_VERSION = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . MANAGEMENT_MAJOR_VERSION , ModelType . INT , false ) . setValidator ( new org . jboss . as . controller . operations . validation . IntRangeValidator ( 1 ) ) . build ( ) ; public static final SimpleAttributeDefinition MANAGEMENT_MINOR_VERSION = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . MANAGEMENT_MINOR_VERSION , ModelType . INT , false ) . setValidator ( new org . jboss . as . controller . operations . validation . IntRangeValidator ( 0 ) ) . build ( ) ; public static final SimpleAttributeDefinition MANAGEMENT_MICRO_VERSION = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . MANAGEMENT_MICRO_VERSION , ModelType . INT , false ) . setValidator ( new org . jboss . as . controller . operations . validation . IntRangeValidator ( 0 ) ) . build ( ) ; public static final SimpleAttributeDefinition PROFILE_NAME = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . PROFILE_NAME , ModelType . STRING , false ) . setValidator ( ServerRootResourceDefinition . NOT_NULL_STRING_LENGTH_ONE_VALIDATOR ) . build ( ) ; public static final SimpleAttributeDefinition NULL_PROFILE_NAME = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . PROFILE_NAME , ModelType . STRING , true ) . build ( ) ; public static final SimpleAttributeDefinition SERVER_STATE = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ServerDescriptionConstants . PROCESS_STATE , ModelType . STRING ) . setStorageRuntime ( ) . setValidator ( ServerRootResourceDefinition . NOT_NULL_STRING_LENGTH_ONE_VALIDATOR ) . build ( ) ; public static final SimpleAttributeDefinition PROCESS_TYPE = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ServerDescriptionConstants . PROCESS_TYPE , ModelType . STRING ) . setStorageRuntime ( ) . setValidator ( ServerRootResourceDefinition . NOT_NULL_STRING_LENGTH_ONE_VALIDATOR ) . build ( ) ; public static final SimpleAttributeDefinition LAUNCH_TYPE = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ServerDescriptionConstants . LAUNCH_TYPE , ModelType . STRING ) . setValidator ( new org . jboss . as . controller . operations . validation . EnumValidator < org . jboss . as . server . ServerEnvironment . LaunchType > ( org . jboss . as . server . ServerEnvironment . LaunchType . class , false , false ) ) . setStorageRuntime ( ) . build ( ) ; private static final EnumSet < Flag > runtimeOnlyFlag = EnumSet . of ( RUNTIME_ONLY ) ; public static final AttributeDefinition RUNNING_MODE = org . jboss . as . controller . SimpleAttributeDefinitionBuilder . create ( ModelDescriptionConstants . RUNNING_MODE , ModelType . STRING ) . setValidator ( new org . jboss . as . controller . operations . validation . EnumValidator < org . jboss . as . controller . RunningMode > ( org . jboss . as . controller . RunningMode . class , false , false ) ) . setStorageRuntime ( ) . build ( ) ; private final boolean isDomain ; private final ContentRepository contentRepository ; private final ExtensibleConfigurationPersister extensibleConfigurationPersister ; private final ServerEnvironment serverEnvironment ; private final ControlledProcessState processState ; private final RunningModeControl runningModeControl ; private final AbstractVaultReader vaultReader ; private final ExtensionRegistry extensionRegistry ; private final boolean parallelBoot ; private final PathManagerService pathManager ; public ServerRootResourceDefinition ( final ContentRepository contentRepository , final ExtensibleConfigurationPersister extensibleConfigurationPersister , final ServerEnvironment serverEnvironment , final ControlledProcessState processState , final RunningModeControl runningModeControl , final AbstractVaultReader vaultReader , final ExtensionRegistry extensionRegistry , final boolean parallelBoot , final PathManagerService pathManager ) { } @ Override public void registerOperations ( ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } @ Override public void registerChildren ( ManagementResourceRegistration resourceRegistration ) { resourceRegistration . registerSubModel ( SystemPropertyResourceDefinition . createForStandaloneServer ( serverEnvironment ) ) ; resourceRegistration . registerSubModel ( new VaultResourceDefinition ( vaultReader ) ) ; ManagementResourceRegistration management = resourceRegistration . registerSubModel ( INSTANCE ) ; management . registerSubModel ( SecurityRealmResourceDefinition . INSTANCE ) ; management . registerSubModel ( LdapConnectionResourceDefinition . INSTANCE ) ; management . registerSubModel ( NativeManagementResourceDefinition . INSTANCE ) ; management . registerSubModel ( NativeRemotingManagementResourceDefinition . INSTANCE ) ; management . registerSubModel ( HttpManagementResourceDefinition . INSTANCE ) ; ManagementResourceRegistration serviceContainer = resourceRegistration . registerSubModel ( new SimpleResourceDefinition ( PathElement . pathElement ( CORE_SERVICE , SERVICE_CONTAINER ) , ControllerResolver . getResolver ( "core" , SERVICE_CONTAINER ) ) ) ; serviceContainer . registerOperationHandler ( DEFINITION , DumpServicesHandler . INSTANCE ) ; PlatformMBeanResourceRegistrar . registerPlatformMBeanResources ( resourceRegistration ) ; resourceRegistration . registerSubModel ( PathResourceDefinition . createSpecified ( pathManager ) ) ; ManagementResourceRegistration interfaces = resourceRegistration . registerSubModel ( new org . jboss . as . controller . resource . InterfaceDefinition ( SpecifiedInterfaceAddHandler . INSTANCE , SpecifiedInterfaceRemoveHandler . INSTANCE , true ) ) ; interfaces . registerReadOnlyAttribute ( RESOLVED_ADDRESS , NetworkInterfaceRuntimeHandler . INSTANCE ) ; interfaces . registerOperationHandler ( SpecifiedInterfaceResolveHandler . DEFINITION , SpecifiedInterfaceResolveHandler . INSTANCE ) ; resourceRegistration . registerSubModel ( new org . jboss . as . controller . resource . SocketBindingGroupResourceDefinition ( BindingGroupAddHandler . INSTANCE , SocketBindingGroupRemoveHandler . INSTANCE , false , SocketBindingResourceDefinition . INSTANCE , RemoteDestinationOutboundSocketBindingResourceDefinition . INSTANCE , LocalDestinationOutboundSocketBindingResourceDefinition . INSTANCE ) ) ; <START_BUG> ManagementResourceRegistration deployments = resourceRegistration . registerSubModel ( ServerDeploymentResourceDescription . create ( contentRepository , vaultReader ) ) ; <END_BUG> resourceRegistration . registerSubModel ( new org . jboss . as . server . deploymentoverlay . DeploymentOverlayDefinition ( DeploymentOverlayPriority . SERVER , contentRepository , null ) ) ; deployments . registerSubModel ( new SimpleResourceDefinition ( PathElement . pathElement ( SUBDEPLOYMENT ) , DeploymentAttributes . DEPLOYMENT_RESOLVER ) ) ; resourceRegistration . registerSubModel ( new org . jboss . as . controller . extension . ExtensionResourceDefinition ( extensionRegistry , parallelBoot , false ) ) ; if ( ( extensionRegistry ) != null ) { extensionRegistry . setSubsystemParentResourceRegistrations ( resourceRegistration , deployments ) ; extensionRegistry . setPathManager ( pathManager ) ; } resourceRegistration . registerOperationHandler ( DeployerChainAddHandler . DEFINITION , DeployerChainAddHandler . INSTANCE , false ) ; } }

Fix:
ManagementResourceRegistration deployments = resourceRegistration . registerSubModel ( ServerDeploymentResourceDefinition . create ( contentRepository , vaultReader ) ) ;