Buggy code:
public class DomainModelControllerService extends AbstractControllerService implements DomainController , HostModelUtil . HostModelRegistrar { public static final ServiceName SERVICE_NAME = HC_SERVICE_NAME . append ( "model" , "controller" ) ; private static final int PINGER_POOL_SIZE ; private volatile HostControllerConfigurationPersister hostControllerConfigurationPersister ; private final HostControllerEnvironment environment ; private final HostRunningModeControl runningModeControl ; private final LocalHostControllerInfoImpl hostControllerInfo ; private final HostFileRepository localFileRepository ; private final RemoteFileRepository remoteFileRepository ; private final InjectedValue < ProcessControllerConnectionService > injectedProcessControllerConnection = new InjectedValue < ProcessControllerConnectionService > ( ) ; private final ConcurrentMap < String , ProxyController > hostProxies ; private final ConcurrentMap < String , DomainModelControllerService . HostRegistration > hostRegistrationMap = new ConcurrentHashMap < String , DomainModelControllerService . HostRegistration > ( ) ; private final Map < String , ProxyController > serverProxies ; private final PrepareStepHandler prepareStepHandler ; private final BootstrapListener bootstrapListener ; private ManagementResourceRegistration modelNodeRegistration ; private final AbstractVaultReader vaultReader ; private final ContentRepository contentRepository ; private final ExtensionRegistry extensionRegistry ; private final ControlledProcessState processState ; private final IgnoredDomainResourceRegistry ignoredRegistry ; private final PathManagerService pathManager ; private final ExpressionResolver expressionResolver ; private final DomainModelControllerService . DelegatingResourceDefinition rootResourceDefinition ; private volatile ServerInventory serverInventory ; private volatile ExecutorService proxyExecutor ; private volatile ScheduledExecutorService pingScheduler ; private volatile DomainRootDefinition domainRootDefinition ; public static ServiceController < ModelController > addService ( final ServiceTarget serviceTarget , final HostControllerEnvironment environment , final HostRunningModeControl runningModeControl , final ControlledProcessState processState , final BootstrapListener bootstrapListener , final PathManagerService pathManager ) { } private DomainModelControllerService ( final HostControllerEnvironment environment , final HostRunningModeControl runningModeControl , final ControlledProcessState processState , final LocalHostControllerInfoImpl hostControllerInfo , final ContentRepository contentRepository , final ConcurrentMap < String , ProxyController > hostProxies , final Map < String , ProxyController > serverProxies , final PrepareStepHandler prepareStepHandler , final AbstractVaultReader vaultReader , final IgnoredDomainResourceRegistry ignoredRegistry , final BootstrapListener bootstrapListener , final PathManagerService pathManager , final ExpressionResolver expressionResolver , final DomainModelControllerService . DelegatingResourceDefinition rootResourceDefinition ) { } @ Override public RunningMode getCurrentRunningMode ( ) { } @ Override public LocalHostControllerInfo getLocalHostInfo ( ) { } @ Override public void registerRemoteHost ( final String hostName , final ManagementChannelHandler handler , final Transformers transformers , Long remoteConnectionId ) throws SlaveRegistrationException { } @ Override public boolean isHostRegistered ( String id ) { } @ Override public void unregisterRemoteHost ( String id , Long remoteConnectionId ) { } @ Override public void pingRemoteHost ( String id ) { } @ Override public void registerRunningServer ( final ProxyController serverControllerClient ) { } @ Override public void unregisterRunningServer ( String serverName ) { } @ Override public ModelNode getProfileOperations ( String profileName ) { } @ Override public HostFileRepository getLocalFileRepository ( ) { } @ Override public HostFileRepository getRemoteFileRepository ( ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { <START_BUG> HostModelUtil . createRootRegistry ( rootRegistration , environment , ignoredRegistry , this ) ; <END_BUG> this . modelNodeRegistration = rootRegistration ; } @ Override protected void boot ( final BootContext context ) throws ConfigurationPersistenceException { } private < T > T getFuture ( Future < T > future ) { } private void startServers ( ) { } @ Override public void stop ( final StopContext context ) { } @ Override public void stopLocalHost ( ) { } @ Override public void stopLocalHost ( int exitCode ) { } @ Override public void registerHostModel ( String hostName , ManagementResourceRegistration root ) { } public void initializeMasterDomainRegistry ( final ManagementResourceRegistration root , final ExtensibleConfigurationPersister configurationPersister , final ContentRepository contentRepository , final HostFileRepository fileRepository , final ExtensionRegistry extensionRegistry , final PathManagerService pathManager ) { } public void initializeSlaveDomainRegistry ( final ManagementResourceRegistration root , final ExtensibleConfigurationPersister configurationPersister , final ContentRepository contentRepository , final HostFileRepository fileRepository , final LocalHostControllerInfo hostControllerInfo , final ExtensionRegistry extensionRegistry , final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry , final PathManagerService pathManager ) { } private void initializeDomainResource ( final ManagementResourceRegistration root , final ExtensibleConfigurationPersister configurationPersister , final ContentRepository contentRepo , final HostFileRepository fileRepository , final boolean isMaster , final LocalHostControllerInfo hostControllerInfo , final ExtensionRegistry extensionRegistry , final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry , final PathManagerService pathManager ) { } private static class HostRegistration { private final Long remoteConnectionId ; private final ManagementChannelHandler channelHandler ; private final SlaveHostPinger pinger ; private HostRegistration ( Long remoteConnectionId , ManagementChannelHandler channelHandler , SlaveHostPinger pinger ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } private static boolean safeEquals ( Object a , Object b ) { } } private class DelegatingServerInventory implements ServerInventory { public ProxyController serverCommunicationRegistered ( String serverProcessName , ManagementChannelHandler channelHandler ) { } public boolean serverReconnected ( String serverProcessName , ManagementChannelHandler channelHandler ) { } public void serverProcessAdded ( String serverProcessName ) { } public void serverStartFailed ( String serverProcessName ) { } @ Override public void serverStarted ( String serverProcessName ) { } public void serverProcessStopped ( String serverProcessName ) { } public String getServerProcessName ( String serverName ) { } public String getProcessServerName ( String processName ) { } public void processInventory ( Map < String , ProcessInfo > processInfos ) { } public Map < String , ProcessInfo > determineRunningProcesses ( ) { } public Map < String , ProcessInfo > determineRunningProcesses ( boolean serversOnly ) { } public ServerStatus determineServerStatus ( String serverName ) { } public ServerStatus startServer ( String serverName , ModelNode domainModel ) { } @ Override public ServerStatus startServer ( String serverName , ModelNode domainModel , boolean blocking ) { } public void reconnectServer ( String serverName , ModelNode domainModel , boolean running ) { } public ServerStatus restartServer ( String serverName , int gracefulTimeout , ModelNode domainModel ) { } @ Override public ServerStatus restartServer ( String serverName , int gracefulTimeout , ModelNode domainModel , boolean blocking ) { } public ServerStatus stopServer ( String serverName , int gracefulTimeout ) { } @ Override public ServerStatus stopServer ( String serverName , int gracefulTimeout , boolean blocking ) { } public CallbackHandler getServerCallbackHandler ( ) { }

Fix:
HostModelUtil . createRootRegistry ( rootRegistration , environment , ignoredRegistry , this , processType ) ;