Buggy code:
public class DomainModelControllerService extends AbstractControllerService implements NewDomainController , UnregisteredHostChannelRegistry { public static final ServiceName SERVICE_NAME = SERVICE_NAME_BASE . append ( "model" , "controller" ) ; private final HostControllerConfigurationPersister configurationPersister ; private final HostControllerEnvironment environment ; private final LocalHostControllerInfoImpl hostControllerInfo ; private final FileRepository localFileRepository ; private final RemoteFileRepository remoteFileRepository ; private final InjectedValue < ExecutorService > injectedExecutorService = new InjectedValue < ExecutorService > ( ) ; private final Map < String , NewProxyController > hostProxies ; private final Map < String , NewProxyController > serverProxies ; private final PrepareStepHandler prepareStepHandler ; private ModelNodeRegistration modelNodeRegistration ; private final Map < String , ManagementChannel > unregisteredHostChannels = new HashMap < String , ManagementChannel > ( ) ; private final Map < String , ProxyCreatedCallback > proxyCreatedCallbacks = new HashMap < String , ProxyCreatedCallback > ( ) ; private final ExecutorService proxyExecutor = Executors . newCachedThreadPool ( ) ; private volatile NewServerInventory serverInventory ; public static ServiceController < NewModelController > addService ( final ServiceTarget serviceTarget , final HostControllerEnvironment environment , final ControlledProcessState processState ) { final Map < String , NewProxyController > hostProxies = new ConcurrentHashMap < String , NewProxyController > ( ) ; final Map < String , NewProxyController > serverProxies = new ConcurrentHashMap < String , NewProxyController > ( ) ; final LocalHostControllerInfoImpl hostControllerInfo = new LocalHostControllerInfoImpl ( processState ) ; final PrepareStepHandler prepareStepHandler = new PrepareStepHandler ( hostControllerInfo , hostProxies , serverProxies ) ; <START_BUG> DomainModelControllerService service = new DomainModelControllerService ( environment , processState , hostControllerInfo , new HostControllerConfigurationPersister ( environment ) , hostProxies , serverProxies , prepareStepHandler ) ; <END_BUG> return serviceTarget . addService ( DomainModelControllerService . SERVICE_NAME , service ) . addDependency ( SERVICE_NAME_BASE . append ( "executor" ) , ExecutorService . class , service . injectedExecutorService ) . setInitialMode ( ACTIVE ) . install ( ) ; } private DomainModelControllerService ( final HostControllerEnvironment environment , final ControlledProcessState processState , final LocalHostControllerInfoImpl hostControllerInfo , final HostControllerConfigurationPersister configurationPersister , final Map < String , NewProxyController > hostProxies , final Map < String , NewProxyController > serverProxies , final PrepareStepHandler prepareStepHandler ) { } @ Override public LocalHostControllerInfo getLocalHostInfo ( ) { } @ Override public void registerRemoteHost ( NewProxyController hostControllerClient ) { } @ Override public void unregisterRemoteHost ( String id ) { } @ Override public void registerRunningServer ( NewProxyController serverControllerClient ) { } @ Override public void unregisterRunningServer ( String serverName ) { } @ Override public ModelNode getProfileOperations ( String profileName ) { } @ Override public FileRepository getFileRepository ( ) { } @ Override protected ModelNode createCoreModel ( ) { } @ Override protected void initModel ( ModelNodeRegistration rootRegistration ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override protected void boot ( final BootContext context ) throws ConfigurationPersistenceException { } private void installHttpManagementServices ( final ServiceTarget serviceTarget ) { } private NetworkInterfaceBinding getNativeManagementNetworkInterfaceBinding ( ) { } private < T > T getFuture ( Future < T > future ) { } private void startServers ( ) { } @ Override public void stop ( StopContext context ) { } @ Override public synchronized void registerChannel ( final String hostName , final ManagementChannel channel , final ProxyCreatedCallback callback ) { } @ Override public synchronized NewProxyController popChannelAndCreateProxy ( String hostName ) { } private class DelegatingServerInventory implements NewServerInventory { public void serverRegistered ( String serverProcessName , ManagementChannel channel , ProxyCreatedCallback callback ) { } public void serverStartFailed ( String serverProcessName ) { } public void serverStopped ( String serverProcessName ) { } public String getServerProcessName ( String serverName ) { } public void processInventory ( Map < String , ProcessInfo > processInfos ) { } public Map < String , ProcessInfo > determineRunningProcesses ( ) { } public ServerStatus determineServerStatus ( String serverName ) { } public int hashCode ( ) { } public ServerStatus startServer ( String serverName , ModelNode domainModel ) { } public void reconnectServer ( String serverName , ModelNode domainModel , boolean running ) { } public ServerStatus restartServer ( String serverName , int gracefulTimeout , ModelNode domainModel ) { } public ServerStatus stopServer ( String serverName , int gracefulTimeout ) { } public boolean equals ( Object obj ) { } public String toString ( ) { } @ Override public void stopServers ( int gracefulTimeout ) { } } }

Fix:
DomainModelControllerService service = new DomainModelControllerService ( environment , processState , hostControllerInfo , new HostControllerConfigurationPersister ( environment , hostControllerInfo ) , hostProxies , serverProxies , prepareStepHandler ) ;