Buggy code:
class NewModelControllerImpl implements NewModelController { private static final ModelNode EMPTY ; private final ServiceRegistry serviceRegistry ; private final ServiceTarget serviceTarget ; private final ModelNodeRegistration rootRegistration ; private final Lock writeLock = new ReentrantLock ( ) ; private final ContainerStateMonitor stateMonitor ; private final AtomicReference < ModelNode > modelReference = new AtomicReference < ModelNode > ( NewModelControllerImpl . EMPTY ) ; private final ConfigurationPersister persister ; private final Type controllerType ; private final AtomicBoolean bootingFlag = new AtomicBoolean ( true ) ; private final NewStepHandler prepareStep ; private final ControlledProcessState processState ; NewModelControllerImpl ( final ModelNode model , final ServiceRegistry serviceRegistry , final ServiceTarget serviceTarget , final ModelNodeRegistration rootRegistration , final ContainerStateMonitor stateMonitor , final ConfigurationPersister persister , final NewOperationContext . Type controllerType , final NewStepHandler prepareStep , final ControlledProcessState processState ) { } static final ThreadLocal < Boolean > RB_ON_RT_FAILURE = new ThreadLocal < Boolean > ( ) ; public ModelNode execute ( final ModelNode operation , final OperationMessageHandler handler , final OperationTransactionControl control , final OperationAttachments attachments ) { final ModelNode headers = ( operation . has ( OPERATION_HEADERS ) ) ? operation . get ( OPERATION_HEADERS ) : null ; <START_BUG> final boolean rollbackOnFailure = ( ( headers == null ) || ( ! ( headers . hasDefined ( ROLLBACK_ON_RUNTIME_FAILURE ) ) ) ) || ( operation . get ( ROLLBACK_ON_RUNTIME_FAILURE ) . asBoolean ( ) ) ; <END_BUG> final EnumSet < NewOperationContextImpl . ContextFlag > contextFlags = ( rollbackOnFailure ) ? EnumSet . of ( ROLLBACK_ON_FAIL ) : EnumSet . noneOf ( ContextFlag . class ) ; NewOperationContextImpl context = new NewOperationContextImpl ( this , controllerType , contextFlags , handler , attachments , modelReference . get ( ) , control , processState , bootingFlag . get ( ) ) ; ModelNode response = new ModelNode ( ) ; context . addStep ( response , operation , prepareStep , MODEL ) ; NewModelControllerImpl . RB_ON_RT_FAILURE . set ( Boolean . valueOf ( rollbackOnFailure ) ) ; try { context . completeStep ( ) ; } finally { NewModelControllerImpl . RB_ON_RT_FAILURE . set ( null ) ; } ControlledProcessState . State state = processState . getState ( ) ; switch ( state ) { case RELOAD_REQUIRED : case RESTART_REQUIRED : response . get ( RESPONSE_HEADERS , PROCESS_STATE ) . set ( state . toString ( ) ) ; break ; default : break ; } return response ; } void boot ( final List < ModelNode > bootList , final OperationMessageHandler handler , final OperationTransactionControl control ) { } void finshBoot ( ) { } ModelNodeRegistration getRootRegistration ( ) { } class BootStepHandler implements NewStepHandler { private final ModelNode operation ; private final ModelNode response ; BootStepHandler ( final ModelNode operation , final ModelNode response ) { } public void execute ( final NewOperationContext context , final ModelNode operation ) throws OperationFailedException { } } public NewModelControllerClient createClient ( final Executor executor ) { } PersistenceResource writeModel ( final ModelNode newModel , Set < PathAddress > affectedAddresses ) throws ConfigurationPersistenceException { } void acquireLock ( final boolean interruptibly ) throws InterruptedException { } void releaseLock ( ) { } void acquireContainerMonitor ( ) { } void releaseContainerMonitor ( ) { } void awaitContainerMonitor ( final boolean interruptibly , final int count ) throws InterruptedException { } ServiceRegistry getServiceRegistry ( ) { } ServiceTarget getServiceTarget ( ) { } State getState ( ) { } Object setReloadRequired ( ) { } Object setRestartRequired ( ) { } void revertReloadRequired ( Object stamp ) { } void revertRestartRequired ( Object stamp ) { } private class DefaultPrepareStepHandler implements NewStepHandler { @ Override public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { } } }

Fix:
final boolean rollbackOnFailure = ( ( headers == null ) || ( ! ( headers . hasDefined ( ROLLBACK_ON_RUNTIME_FAILURE ) ) ) ) || ( headers . get ( ROLLBACK_ON_RUNTIME_FAILURE ) . asBoolean ( ) ) ;