Buggy code:
public class ParallelBootOperationStepHandler implements OperationStepHandler { private final Executor executor ; private final ImmutableManagementResourceRegistration rootRegistration ; private final ControlledProcessState processState ; private final Map < String , List < ParsedBootOp > > opsBySubsystem = new LinkedHashMap < String , List < ParsedBootOp > > ( ) ; ParallelBootOperationStepHandler ( final ExecutorService executorService , final ImmutableManagementResourceRegistration rootRegistration , final ControlledProcessState processState ) { } boolean addSubsystemOperation ( final ParsedBootOp parsedOp ) { } private String getSubsystemName ( final PathAddress address ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) != ( Type . SERVER ) ) { <END_BUG> throw ControllerMessages . MESSAGES . fullServerBootRequired ( getClass ( ) ) ; } long start = System . currentTimeMillis ( ) ; context . getResourceRegistrationForUpdate ( ) ; final Resource rootResource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; context . acquireControllerLock ( ) ; final Map < String , List < ParsedBootOp > > runtimeOpsBySubsystem = new LinkedHashMap < String , List < ParsedBootOp > > ( ) ; final Map < String , ParallelBootOperationStepHandler . ParallelBootTransactionControl > transactionControls = new LinkedHashMap < String , ParallelBootOperationStepHandler . ParallelBootTransactionControl > ( ) ; final CountDownLatch preparedLatch = new CountDownLatch ( opsBySubsystem . size ( ) ) ; final CountDownLatch committedLatch = new CountDownLatch ( 1 ) ; final CountDownLatch completeLatch = new CountDownLatch ( opsBySubsystem . size ( ) ) ; final Thread controllingThread = Thread . currentThread ( ) ; for ( Map . Entry < String , List < ParsedBootOp > > entry : opsBySubsystem . entrySet ( ) ) { String subsystemName = entry . getKey ( ) ; List < ParsedBootOp > subsystemRuntimeOps = new ArrayList < ParsedBootOp > ( ) ; runtimeOpsBySubsystem . put ( subsystemName , subsystemRuntimeOps ) ; final ParallelBootOperationStepHandler . ParallelBootTransactionControl txControl = new ParallelBootOperationStepHandler . ParallelBootTransactionControl ( subsystemName , preparedLatch , committedLatch , completeLatch ) ; transactionControls . put ( entry . getKey ( ) , txControl ) ; ParallelBootOperationStepHandler . ParallelBootTask subsystemTask = new ParallelBootOperationStepHandler . ParallelBootTask ( subsystemName , entry . getValue ( ) , context , txControl , subsystemRuntimeOps , controllingThread ) ; executor . execute ( subsystemTask ) ; } try { preparedLatch . await ( ) ; checkForSubsystemFailures ( context , transactionControls , MODEL ) ; List < ParsedBootOp > loggingOps = runtimeOpsBySubsystem . remove ( "logging" ) ; if ( loggingOps != null ) { for ( ParsedBootOp loggingOp : loggingOps ) { context . addStep ( loggingOp . response , loggingOp . operation , loggingOp . handler , RUNTIME ) ; } } final Map < String , Resource > subsystemResources = new LinkedHashMap < String , Resource > ( ) ; for ( String subsystemName : opsBySubsystem . keySet ( ) ) { final Resource resource = rootResource . removeChild ( PathElement . pathElement ( SUBSYSTEM , subsystemName ) ) ; if ( resource != null ) { subsystemResources . put ( subsystemName , resource ) ; } } for ( Map . Entry < String , Resource > entry : subsystemResources . entrySet ( ) ) { rootResource . registerChild ( PathElement . pathElement ( SUBSYSTEM , entry . getKey ( ) ) , entry . getValue ( ) ) ; } context . addStep ( getRuntimeStep ( runtimeOpsBySubsystem ) , RUNTIME ) ; } catch ( InterruptedException e ) { context . getFailureDescription ( ) . set ( new ModelNode ( ) . set ( ControllerMessages . MESSAGES . subsystemBootInterrupted ( ) ) ) ; Thread . currentThread ( ) . interrupt ( ) ; } if ( ControllerLogger . MGMT_OP_LOGGER . isDebugEnabled ( ) ) { long elapsed = ( System . currentTimeMillis ( ) ) - start ; ControllerLogger . MGMT_OP_LOGGER . debugf ( "Ran<seq2seq4repair_space>subsystem<seq2seq4repair_space>model<seq2seq4repair_space>operations<seq2seq4repair_space>in<seq2seq4repair_space>[%d]<seq2seq4repair_space>ms" , elapsed ) ; } OperationContext . ResultAction resultAction = context . completeStep ( ) ; notifySubsystemTransactions ( transactionControls , resultAction , committedLatch , RUNTIME ) ; try { completeLatch . await ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } } private void checkForSubsystemFailures ( OperationContext context , Map < String , ParallelBootOperationStepHandler . ParallelBootTransactionControl > transactionControls , OperationContext . Stage stage ) { } private void notifySubsystemTransactions ( final Map < String , ParallelBootOperationStepHandler . ParallelBootTransactionControl > transactionControls , final OperationContext . ResultAction resultAction , final CountDownLatch committedLatch , final OperationContext . Stage stage ) { } private OperationStepHandler getRuntimeStep ( final Map < String , List < ParsedBootOp > > runtimeOpsBySubsystem ) { } private class ParallelBootTask implements Runnable { private final String subsystemName ; private final List < ParsedBootOp > bootOperations ; private final OperationContext primaryContext ; private final Stage executionStage ; private final ParallelBootOperationStepHandler . ParallelBootTransactionControl transactionControl ; private final List < ParsedBootOp > runtimeOps ; private final Thread controllingThread ; public ParallelBootTask ( final String subsystemName , final List < ParsedBootOp > bootOperations , final OperationContext primaryContext , final ParallelBootOperationStepHandler . ParallelBootTransactionControl transactionControl , final List < ParsedBootOp > runtimeOps , final Thread controllingThread ) { } @ Override public void run ( ) { } } private static class ParallelBootTransactionControl implements ProxyController . ProxyOperationControl { private final String subsystemName ; private final CountDownLatch preparedLatch ; private final CountDownLatch committedLatch ; private final CountDownLatch completeLatch ; private ModelNode response ; private OperationTransaction transaction ; private boolean signalled ; public ParallelBootTransactionControl ( String subsystemName , CountDownLatch preparedLatch , CountDownLatch committedLatch , CountDownLatch completeLatch ) { } @ Override public void operationFailed ( ModelNode response ) { } @ Override public void operationPrepared ( ModelController . OperationTransaction transaction , ModelNode result ) { } @ Override public void operationCompleted ( ModelNode response ) { } } }

Fix:
if ( ! ( context . isNormalServer ( ) ) ) {