Buggy code:
public class HostControllerBootstrap { private static final Logger log = Logger . getLogger ( "org.jboss.as.host.controller" ) ; static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "host" , "controller" ) ; static final int DEFAULT_POOL_SIZE = 20 ; private final ServiceContainer serviceContainer = Factory . create ( ) ; private final HostControllerEnvironment environment ; private final byte [ ] authCode ; public HostControllerBootstrap ( final HostControllerEnvironment environment , final byte [ ] authCode ) { } public void start ( ) throws Exception { final File configDir = environment . getDomainConfigurationDir ( ) ; final ExtensibleConfigurationPersister configurationPersister = HostControllerBootstrap . createHostConfigurationPersister ( configDir ) ; final HostModel hostModel = new HostModel ( configurationPersister ) ; final List < ModelNode > operations = configurationPersister . load ( ) ; final AtomicInteger count = new AtomicInteger ( 1 ) ; final ResultHandler resultHandler = new ResultHandler ( ) { @ Override public void handleResultFragment ( final String [ ] location , final ModelNode result ) { } @ Override <START_BUG> public void handleResultComplete ( final ModelNode compensatingOperation ) { <END_BUG> if ( ( count . decrementAndGet ( ) ) == 0 ) { } } @ Override public void handleFailed ( final ModelNode failureDescription ) { if ( ( count . decrementAndGet ( ) ) == 0 ) { } } @ Override public void handleCancellation ( ) { if ( ( count . decrementAndGet ( ) ) == 0 ) { } } } ; for ( final ModelNode operation : operations ) { count . incrementAndGet ( ) ; hostModel . execute ( operation , resultHandler ) ; } if ( ( count . decrementAndGet ( ) ) == 0 ) { } final ServiceTarget serviceTarget = serviceContainer ; serviceTarget . addListener ( new org . jboss . msc . service . AbstractServiceListener < Object > ( ) { public void serviceFailed ( final ServiceController < ? > serviceController , final StartException reason ) { HostControllerBootstrap . log . errorf ( reason , "Service<seq2seq4repair_space>[%s]<seq2seq4repair_space>failed." , serviceController . getName ( ) ) ; } } ) ; final ModelNode rawModel = hostModel . getHostModel ( ) ; final String mgmtNetwork = rawModel . get ( MANAGEMENT , NATIVE_API , INTERFACE ) . asString ( ) ; final int mgmtPort = rawModel . get ( MANAGEMENT , NATIVE_API , PORT ) . asInt ( ) ; final ProcessControllerConnectionService processControllerClient = new ProcessControllerConnectionService ( environment , authCode ) ; serviceTarget . addService ( SERVICE_NAME , processControllerClient ) . install ( ) ; HostControllerBootstrap . activateNetworkInterfaces ( rawModel , serviceTarget ) ; HostControllerBootstrap . activateDomainControllerConnection ( environment , rawModel , serviceTarget ) ; final ServerInventoryService inventory = new ServerInventoryService ( environment , mgmtPort ) ; serviceTarget . addService ( ServerInventoryService . SERVICE_NAME , inventory ) . addDependency ( SERVICE_NAME , ProcessControllerClient . class , inventory . getClient ( ) ) . addDependency ( JBOSS_NETWORK_INTERFACE . append ( mgmtNetwork ) , NetworkInterfaceBinding . class , inventory . getInterface ( ) ) . addDependency ( DomainControllerConnection . SERVICE_NAME , DomainControllerConnection . class , inventory . getDomainControllerConnection ( ) ) . install ( ) ; final String name = rawModel . get ( NAME ) . asString ( ) ; final FileRepository repository = new LocalFileRepository ( environment ) ; final HostControllerService hc = new HostControllerService ( name , hostModel , repository ) ; serviceTarget . addService ( HostController . SERVICE_NAME , hc ) . addDependency ( DomainControllerConnection . SERVICE_NAME , DomainControllerConnection . class , hc . getConnection ( ) ) . addDependency ( ServerInventoryService . SERVICE_NAME , ServerInventory . class , hc . getServerInventory ( ) ) . addDependency ( ServerToHostOperationHandler . SERVICE_NAME ) . setInitialMode ( ACTIVE ) . install ( ) ; final ServiceName threadFactoryServiceName = HostControllerBootstrap . SERVICE_NAME_BASE . append ( "thread-factory" ) ; final ServiceName executorServiceName = HostControllerBootstrap . SERVICE_NAME_BASE . append ( "executor" ) ; serviceTarget . addService ( threadFactoryServiceName , new ThreadFactoryService ( ) ) . install ( ) ; final HostControllerBootstrap . HostControllerExecutorService executorService = new HostControllerBootstrap . HostControllerExecutorService ( ) ; serviceTarget . addService ( executorServiceName , executorService ) . addDependency ( threadFactoryServiceName , ThreadFactory . class , executorService . threadFactoryValue ) . install ( ) ; final ManagementCommunicationService managementCommunicationService = new ManagementCommunicationService ( ) ; serviceTarget . addService ( ManagementCommunicationService . SERVICE_NAME , managementCommunicationService ) . addDependency ( JBOSS_NETWORK_INTERFACE . append ( mgmtNetwork ) , NetworkInterfaceBinding . class , managementCommunicationService . getInterfaceInjector ( ) ) . addInjection ( managementCommunicationService . getPortInjector ( ) , mgmtPort ) . addDependency ( executorServiceName , ExecutorService . class , managementCommunicationService . getExecutorServiceInjector ( ) ) . addDependency ( threadFactoryServiceName , ThreadFactory . class , managementCommunicationService . getThreadFactoryInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; final ServerToHostOperationHandler serverToHost = new ServerToHostOperationHandler ( ) ; serviceTarget . addService ( ServerToHostOperationHandler . SERVICE_NAME , serverToHost ) . addDependency ( ServerInventoryService . SERVICE_NAME , ManagedServerLifecycleCallback . class , serverToHost . getCallback ( ) ) . addDependency ( ManagementCommunicationService . SERVICE_NAME , ManagementCommunicationService . class , new org . jboss . as . host . controller . mgmt . ManagementCommunicationServiceInjector ( serverToHost ) ) . install ( ) ; } static void activateDomainControllerConnection ( final HostControllerEnvironment environment , final ModelNode host , final ServiceTarget serviceTarget ) { } static void installLocalDomainController ( final HostControllerEnvironment environment , final ModelNode host , final ServiceTarget serviceTarget ) { } static void installRemoteDomainControllerConnection ( final HostControllerEnvironment environment , final ModelNode host , final ServiceTarget serviceTarget ) { } static void activateNetworkInterfaces ( final ModelNode host , final ServiceTarget serviceTarget ) { } static ExtensibleConfigurationPersister createHostConfigurationPersister ( final File configDir ) { } static ExtensibleConfigurationPersister createDomainConfigurationPersister ( final File configDir ) { } static final class HostControllerExecutorService implements Service < Executor > { final InjectedValue < ThreadFactory > threadFactoryValue = new InjectedValue < ThreadFactory > ( ) ; private ScheduledExecutorService executorService ; @ Override public synchronized void start ( final StartContext context ) throws StartException { }

Fix:
public void handleResultComplete ( ) {