Buggy code:
public class CoreEnvironmentAdd extends AbstractAddStepHandler implements DescriptionProvider { public static final CoreEnvironmentAdd INSTANCE = new CoreEnvironmentAdd ( ) ; private static final ServiceName INTERNAL_CORE_ENV_VAR_PATH = JBOSS_TXN_PATHS . append ( "core-var-dir" ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode coreEnvModel ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode recoveryEnvModel , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > controllers ) throws OperationFailedException { final String nodeIdentifier = ( operation . hasDefined ( CommonAttributes . NODE_IDENTIFIER ) ) ? operation . get ( CommonAttributes . NODE_IDENTIFIER ) . asString ( ) : "1" ; <START_BUG> final ModelNode processId = operation . require ( CommonAttributes . PROCESS_ID ) ; <END_BUG> final String varDirPathRef = ( operation . hasDefined ( RELATIVE_TO ) ) ? operation . get ( RELATIVE_TO ) . asString ( ) : "jboss.server.data.dir" ; final String varDirPath = ( operation . hasDefined ( PATH ) ) ? operation . get ( PATH ) . asString ( ) : "var" ; final int maxPorts = 10 ; if ( TransactionLogger . ROOT_LOGGER . isDebugEnabled ( ) ) { TransactionLogger . ROOT_LOGGER . debugf ( "nodeIdentifier=%s\n" , nodeIdentifier ) ; TransactionLogger . ROOT_LOGGER . debugf ( "varDirPathRef=%s,<seq2seq4repair_space>varDirPath=%s\n" , varDirPathRef , varDirPath ) ; } String socketBindingName = null ; final CoreEnvironmentService coreEnvironmentService = new CoreEnvironmentService ( nodeIdentifier , varDirPath ) ; if ( processId . hasDefined ( UUID . getName ( ) ) ) { UuidProcessId id = new UuidProcessId ( ) ; coreEnvironmentService . setProcessImplementation ( id ) ; } else if ( processId . hasDefined ( SOCKET . getName ( ) ) ) { coreEnvironmentService . setProcessImplementationClassName ( SOCKET . getClazz ( ) ) ; ModelNode socket = processId . get ( SOCKET . getName ( ) ) ; socketBindingName = socket . require ( CommonAttributes . BINDING ) . asString ( ) ; if ( socket . hasDefined ( CommonAttributes . SOCKET_PROCESS_ID_MAX_PORTS ) ) { int ports = socket . get ( CommonAttributes . SOCKET_PROCESS_ID_MAX_PORTS ) . asInt ( maxPorts ) ; coreEnvironmentService . setSocketProcessIdMaxPorts ( ports ) ; } } else { UuidProcessId id = new UuidProcessId ( ) ; coreEnvironmentService . setProcessImplementation ( id ) ; } ServiceBuilder < ? > coreEnvBuilder = context . getServiceTarget ( ) . addService ( JBOSS_TXN_CORE_ENVIRONMENT , coreEnvironmentService ) ; if ( socketBindingName != null ) { ServiceName bindingName = JBOSS_BINDING_NAME . append ( socketBindingName ) ; coreEnvBuilder . addDependency ( bindingName , SocketBinding . class , coreEnvironmentService . getSocketProcessBindingInjector ( ) ) ; } ServiceController < String > varDirRPS = RelativePathService . addService ( CoreEnvironmentAdd . INTERNAL_CORE_ENV_VAR_PATH , varDirPath , varDirPathRef , context . getServiceTarget ( ) ) ; controllers . add ( varDirRPS ) ; controllers . add ( coreEnvBuilder . addDependency ( varDirRPS . getName ( ) , String . class , coreEnvironmentService . getPathInjector ( ) ) . addListener ( verificationHandler ) . setInitialMode ( ACTIVE ) . install ( ) ) ; } }

Fix:
final ModelNode processId = ( operation . hasDefined ( CommonAttributes . PROCESS_ID ) ) ? operation . get ( CommonAttributes . PROCESS_ID ) : new ModelNode ( ) ;