Buggy code:
public class DomainSlaveHandler implements OperationStepHandler { private final ExecutorService executorService ; private final DomainOperationContext domainOperationContext ; private final Map < String , ProxyController > hostProxies ; public DomainSlaveHandler ( final Map < String , ProxyController > hostProxies , final DomainOperationContext domainOperationContext , final ExecutorService executorService ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { if ( context . hasFailureDescription ( ) ) { context . setRollbackOnly ( ) ; context . completeStep ( ) ; return ; } final Map < String , ProxyTask > tasks = new HashMap < String , ProxyTask > ( ) ; final Map < String , Future < ModelNode > > futures = new HashMap < String , Future < ModelNode > > ( ) ; for ( Map . Entry < String , ProxyController > entry : hostProxies . entrySet ( ) ) { String host = entry . getKey ( ) ; ProxyTask task = new ProxyTask ( host , operation . clone ( ) , context , entry . getValue ( ) ) ; tasks . put ( host , task ) ; futures . put ( host , executorService . submit ( task ) ) ; } boolean interrupted = false ; try { for ( Map . Entry < String , ProxyTask > entry : tasks . entrySet ( ) ) { ProxyTask task = entry . getValue ( ) ; ModelNode result = null ; try { result = entry . getValue ( ) . getUncommittedResult ( ) ; } catch ( Exception e ) { result = new ModelNode ( ) ; result . get ( OUTCOME ) . set ( FAILED ) ; if ( e instanceof InterruptedException ) { result . get ( FAILURE_DESCRIPTION ) . set ( DomainControllerMessages . MESSAGES . interruptedAwaitingResultFromHost ( entry . getKey ( ) ) ) ; interrupted = true ; } else { result . get ( FAILURE_DESCRIPTION ) . set ( DomainControllerMessages . MESSAGES . exceptionAwaitingResultFromHost ( entry . getKey ( ) , e . getMessage ( ) ) ) ; } task . cancel ( ) ; futures . get ( entry . getKey ( ) ) . cancel ( true ) ; } if ( DomainControllerLogger . HOST_CONTROLLER_LOGGER . isTraceEnabled ( ) ) { <START_BUG> DomainControllerLogger . HOST_CONTROLLER_LOGGER . tracef ( "Result<seq2seq4repair_space>for<seq2seq4repair_space>remote<seq2seq4repair_space>host<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>%s" , entry . getKey ( ) , result ) ; <END_BUG> } domainOperationContext . addHostControllerResult ( entry . getKey ( ) , result ) ; } context . completeStep ( ) ; } finally { try { boolean rollback = domainOperationContext . isCompleteRollback ( ) ; for ( ProxyTask task : tasks . values ( ) ) { task . finalizeTransaction ( ( ! rollback ) ) ; } final short timeout = 10 ; for ( Map . Entry < String , Future < ModelNode > > entry : futures . entrySet ( ) ) { Future < ModelNode > future = entry . getValue ( ) ; try { ModelNode finalResult = ( future . isCancelled ( ) ) ? getCancelledResult ( ) : future . get ( ) ; domainOperationContext . addHostControllerResult ( entry . getKey ( ) , finalResult ) ; } catch ( InterruptedException e ) { interrupted = true ; DomainControllerLogger . CONTROLLER_LOGGER . interruptedAwaitingFinalResponse ( entry . getKey ( ) ) ; } catch ( ExecutionException e ) { DomainControllerLogger . CONTROLLER_LOGGER . caughtExceptionAwaitingFinalResponse ( e . getCause ( ) , entry . getKey ( ) ) ; } } } finally { if ( interrupted ) { Thread . currentThread ( ) . interrupt ( ) ; } } } } private ModelNode getCancelledResult ( ) { } }

Fix:
DomainControllerLogger . HOST_CONTROLLER_LOGGER . tracef ( "ParsedResult<seq2seq4repair_space>for<seq2seq4repair_space>remote<seq2seq4repair_space>host<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>%s" , entry . getKey ( ) , result ) ;