Buggy code:
root . registerOperationHandler ( READ_CHILDREN_NAMES_OPERATION , READ_CHILDREN_NAMES , READ_CHILDREN_NAMES_PROVIDER , true ) ; root . registerOperationHandler ( READ_CHILDREN_TYPES_OPERATION , READ_CHILDREN_TYPES , READ_CHILDREN_TYPES_PROVIDER , true ) ; root . registerOperationHandler ( READ_CHILDREN_RESOURCES_OPERATION , READ_CHILDREN_RESOURCES , READ_CHILDREN_RESOURCES_PROVIDER , true ) ; root . registerOperationHandler ( READ_OPERATION_NAMES_OPERATION , READ_OPERATION_NAMES , READ_OPERATION_NAMES_PROVIDER , true ) ; root . registerOperationHandler ( READ_OPERATION_DESCRIPTION_OPERATION , READ_OPERATION_DESCRIPTION , READ_OPERATION_PROVIDER , true ) ; root . registerOperationHandler ( WRITE_ATTRIBUTE_OPERATION , WRITE_ATTRIBUTE , WRITE_ATTRIBUTE_PROVIDER , true ) ; root . registerOperationHandler ( NamespaceAddHandler . OPERATION_NAME , INSTANCE , INSTANCE , false ) ; root . registerOperationHandler ( NamespaceRemoveHandler . OPERATION_NAME , NamespaceRemoveHandler . INSTANCE , NamespaceRemoveHandler . INSTANCE , false ) ; root . registerOperationHandler ( SchemaLocationAddHandler . OPERATION_NAME , SchemaLocationAddHandler . INSTANCE , SchemaLocationAddHandler . INSTANCE , false ) ; root . registerOperationHandler ( SchemaLocationRemoveHandler . OPERATION_NAME , SchemaLocationRemoveHandler . INSTANCE , SchemaLocationRemoveHandler . INSTANCE , false ) ; root . registerOperationHandler ( SystemPropertyAddHandler . OPERATION_NAME , SystemPropertyAddHandler . INSTANCE , SystemPropertyAddHandler . INSTANCE , false ) ; root . registerOperationHandler ( SystemPropertyRemoveHandler . OPERATION_NAME , SystemPropertyRemoveHandler . INSTANCE , SystemPropertyRemoveHandler . INSTANCE , false ) ; root . registerReadWriteAttribute ( NAME , null , new WriteAttributeHandlers . StringLengthValidatingHandler ( 1 ) , CONFIGURATION ) ; ModelNodeRegistration managementNative = root . registerSubModel ( PathElement . pathElement ( MANAGEMENT_INTERFACES , NATIVE_INTERFACE ) , NATIVE_MANAGEMENT_PROVIDER ) ; managementNative . registerOperationHandler ( NativeManagementAddHandler . OPERATION_NAME , NativeManagementAddHandler . INSTANCE , NativeManagementAddHandler . INSTANCE , false ) ; ModelNodeRegistration managementHttp = root . registerSubModel ( PathElement . pathElement ( MANAGEMENT_INTERFACES , HTTP_INTERFACE ) , HTTP_MANAGEMENT_PROVIDER ) ; HttpManagementAddHandler httpAddHandler = HttpManagementAddHandler . getInstance ( environment ) ; managementHttp . registerOperationHandler ( HttpManagementAddHandler . OPERATION_NAME , httpAddHandler , httpAddHandler , false ) ; LocalDomainControllerAddHandler localDcAddHandler = LocalDomainControllerAddHandler . getInstance ( domainModelProxy , environment ) ; root . registerOperationHandler ( LocalDomainControllerAddHandler . OPERATION_NAME , localDcAddHandler , localDcAddHandler , false ) ; root . registerOperationHandler ( LocalDomainControllerRemoveHandler . OPERATION_NAME , LocalDomainControllerRemoveHandler . INSTANCE , LocalDomainControllerRemoveHandler . INSTANCE , false ) ; RemoteDomainControllerAddHandler remoteDcAddHandler = RemoteDomainControllerAddHandler . getInstance ( domainModelProxy , environment ) ; root . registerOperationHandler ( RemoteDomainControllerAddHandler . OPERATION_NAME , remoteDcAddHandler , remoteDcAddHandler , false ) ; root . registerOperationHandler ( RemoteDomainControllerRemoveHandler . OPERATION_NAME , RemoteDomainControllerRemoveHandler . INSTANCE , RemoteDomainControllerRemoveHandler . INSTANCE , false ) ; SnapshotDeleteHandler snapshotDelete = new SnapshotDeleteHandler ( configurationPersister ) ; root . registerOperationHandler ( SnapshotDeleteHandler . OPERATION_NAME , snapshotDelete , snapshotDelete , false ) ; SnapshotListHandler snapshotList = new SnapshotListHandler ( configurationPersister ) ; root . registerOperationHandler ( SnapshotListHandler . OPERATION_NAME , snapshotList , snapshotList , false ) ; SnapshotTakeHandler snapshotTake = new SnapshotTakeHandler ( configurationPersister ) ; root . registerOperationHandler ( SnapshotTakeHandler . OPERATION_NAME , snapshotTake , snapshotTake , false ) ; ModelNodeRegistration extensions = root . registerSubModel ( PathElement . pathElement ( EXTENSION ) , EXTENSION_PROVIDER ) ; ExtensionContext extensionContext = new org . jboss . as . controller . ExtensionContextImpl ( root , null , configurationPersister ) ; ExtensionAddHandler addExtensionHandler = new ExtensionAddHandler ( extensionContext ) ; extensions . registerOperationHandler ( ExtensionAddHandler . OPERATION_NAME , addExtensionHandler , addExtensionHandler , false ) ; extensions . registerOperationHandler ( ExtensionRemoveHandler . OPERATION_NAME , ExtensionRemoveHandler . INSTANCE , ExtensionRemoveHandler . INSTANCE , false ) ; final ModelNodeRegistration jvms = root . registerSubModel ( PathElement . pathElement ( JVM ) , JVM_PROVIDER ) ; JVMHandlers . register ( jvms ) ; ModelNodeRegistration paths = root . registerSubModel ( PathElement . pathElement ( PATH ) , SPECIFIED_PATH_PROVIDER ) ; paths . registerOperationHandler ( PathAddHandler . OPERATION_NAME , SPECIFIED_INSTANCE , SPECIFIED_INSTANCE , false ) ; paths . registerOperationHandler ( PathRemoveHandler . OPERATION_NAME , PathRemoveHandler . INSTANCE , PathRemoveHandler . INSTANCE , false ) ; ModelNodeRegistration interfaces = root . registerSubModel ( PathElement . pathElement ( INTERFACE ) , SPECIFIED_INTERFACE_PROVIDER ) ; interfaces . registerOperationHandler ( InterfaceAddHandler . OPERATION_NAME , SpecifiedInterfaceAddHandler . INSTANCE , SpecifiedInterfaceAddHandler . INSTANCE , false ) ; interfaces . registerOperationHandler ( InterfaceRemoveHandler . OPERATION_NAME , SpecifiedInterfaceRemoveHandler . INSTANCE , SpecifiedInterfaceRemoveHandler . INSTANCE , false ) ; ModelNodeRegistration servers = root . registerSubModel ( PathElement . pathElement ( SERVER_CONFIG ) , SERVER_PROVIDER ) ; servers . registerOperationHandler ( ServerAddHandler . OPERATION_NAME , ServerAddHandler . INSTANCE , ServerAddHandler . INSTANCE , false ) ; servers . registerOperationHandler ( ServerRemoveHandler . OPERATION_NAME , ServerRemoveHandler . INSTANCE , ServerRemoveHandler . INSTANCE , false ) ; servers . registerOperationHandler ( SystemPropertyAddHandler . OPERATION_NAME , SystemPropertyAddHandler . INSTANCE , SystemPropertyAddHandler . INSTANCE , false ) ; servers . registerOperationHandler ( SystemPropertyRemoveHandler . OPERATION_NAME , SystemPropertyRemoveHandler . INSTANCE , SystemPropertyRemoveHandler . INSTANCE , false ) ; servers . registerReadWriteAttribute ( AUTO_START , null , new WriteAttributeHandlers . ModelTypeValidatingHandler ( ModelType . BOOLEAN ) , CONFIGURATION ) ; servers . registerReadWriteAttribute ( SOCKET_BINDING_GROUP , null , WriteAttributeHandlers . WriteAttributeOperationHandler . INSTANCE , CONFIGURATION ) ; <START_BUG> servers . registerReadWriteAttribute ( SOCKET_BINDING_PORT_OFFSET , null , new WriteAttributeHandlers . IntRangeValidatingHandler ( 1 ) , CONFIGURATION ) ; <END_BUG> servers . registerReadWriteAttribute ( PRIORITY , null , new WriteAttributeHandlers . IntRangeValidatingHandler ( 0 ) , CONFIGURATION ) ; servers . registerReadWriteAttribute ( CPU_AFFINITY , null , new WriteAttributeHandlers . StringLengthValidatingHandler ( 1 ) , CONFIGURATION ) ; ModelNodeRegistration serverPaths = servers . registerSubModel ( PathElement . pathElement ( PATH ) , SPECIFIED_INTERFACE_PROVIDER ) ; serverPaths . registerOperationHandler ( PathAddHandler . OPERATION_NAME , SPECIFIED_INSTANCE , SPECIFIED_INSTANCE , false ) ; serverPaths . registerOperationHandler ( PathRemoveHandler . OPERATION_NAME , PathRemoveHandler . INSTANCE , PathRemoveHandler . INSTANCE , false ) ; ModelNodeRegistration serverInterfaces = servers . registerSubModel ( PathElement . pathElement ( INTERFACE ) , SPECIFIED_INTERFACE_PROVIDER ) ; serverInterfaces . registerOperationHandler ( InterfaceAddHandler . OPERATION_NAME , SpecifiedInterfaceAddHandler . INSTANCE , SpecifiedInterfaceAddHandler . INSTANCE , false ) ; serverInterfaces . registerOperationHandler ( InterfaceRemoveHandler . OPERATION_NAME , SpecifiedInterfaceRemoveHandler . INSTANCE , SpecifiedInterfaceRemoveHandler . INSTANCE , false ) ; final ModelNodeRegistration serverVMs = servers . registerSubModel ( PathElement . pathElement ( JVM ) , JVM_PROVIDER ) ; JVMHandlers . register ( serverVMs ) ; return root ; } }

Fix:
servers . registerReadWriteAttribute ( SOCKET_BINDING_PORT_OFFSET , null , new WriteAttributeHandlers . IntRangeValidatingHandler ( 0 ) , CONFIGURATION ) ;