Buggy code:
public final class ServiceVerificationHandler extends AbstractServiceListener < Object > implements OperationStepHandler , ServiceListener < Object > { private final Set < ServiceController < ? > > set = new HashSet < ServiceController < ? > > ( ) ; private final Set < ServiceController < ? > > failed = new HashSet < ServiceController < ? > > ( ) ; private final Set < ServiceController < ? > > problem = new HashSet < ServiceController < ? > > ( ) ; private int outstanding ; public synchronized void execute ( final OperationContext context , final ModelNode operation ) { long start = 0 ; long settleTime = 100 ; while ( ( ( outstanding ) > 0 ) || ( ( settleTime > 0 ) && ( ! ( problem . isEmpty ( ) ) ) ) ) { try { long wait = ( ( outstanding ) > 0 ) ? 0 : settleTime ; wait ( wait ) ; if ( ( outstanding ) == 0 ) { if ( start == 0 ) { start = System . currentTimeMillis ( ) ; } else { settleTime -= ( System . currentTimeMillis ( ) ) - start ; } } else { start = 0 ; settleTime = 100 ; } } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; context . getFailureDescription ( ) . set ( "Operation<seq2seq4repair_space>cancelled" ) ; context . completeStep ( ) ; return ; } } if ( ( ! ( failed . isEmpty ( ) ) ) || ( ! ( problem . isEmpty ( ) ) ) ) { final ModelNode failureDescription = context . getFailureDescription ( ) ; ModelNode failedList = null ; for ( ServiceController < ? > controller : failed ) { if ( failedList == null ) { failedList = failureDescription . get ( "Failed<seq2seq4repair_space>services" ) ; } failedList . get ( controller . getName ( ) . getCanonicalName ( ) ) . set ( controller . getStartException ( ) . toString ( ) ) ; } ModelNode problemList = null ; for ( ServiceController < ? > controller : problem ) { if ( ! ( controller . getImmediateUnavailableDependencies ( ) . isEmpty ( ) ) ) { if ( problemList == null ) { problemList = failureDescription . get ( "Services<seq2seq4repair_space>with<seq2seq4repair_space>missing//unavailable<seq2seq4repair_space>dependencies" ) ; } final StringBuilder problem = new StringBuilder ( ) ; problem . append ( controller . getName ( ) . getCanonicalName ( ) ) ; problem . append ( "<seq2seq4repair_space>missing<seq2seq4repair_space>[<seq2seq4repair_space>" ) ; for ( Iterator < ServiceName > i = controller . getImmediateUnavailableDependencies ( ) . iterator ( ) ; i . hasNext ( ) ; ) { ServiceName missing = i . next ( ) ; problem . append ( missing . getCanonicalName ( ) ) ; if ( i . hasNext ( ) ) { problem . append ( ",<seq2seq4repair_space>" ) ; } } problem . append ( "<seq2seq4repair_space>]" ) ; problemList . add ( problem . toString ( ) ) ; } } <START_BUG> if ( ( RB_ON_RT_FAILURE . get ( ) ) == ( Boolean . TRUE ) ) { <END_BUG> context . setRollbackOnly ( ) ; } } for ( ServiceController < ? > controller : set ) { controller . removeListener ( this ) ; } context . completeStep ( ) ; } public synchronized void listenerAdded ( final ServiceController < ? > controller ) { } public synchronized void transition ( final ServiceController < ? > controller , final ServiceController . Transition transition ) { } }

Fix:
if ( context . isRollbackOnRuntimeFailure ( ) ) {