Buggy code:
public class RemoteDomainConnectionService implements MasterDomainControllerClient , Service < MasterDomainControllerClient > { private static final ModelNode APPLY_DOMAIN_MODEL = new ModelNode ( ) ; private final ModelController controller ; private final ProductConfig productConfig ; private final LocalHostControllerInfo localHostInfo ; private final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ; private volatile ModelControllerClient masterProxy ; private final RemoteDomainConnectionService . FutureClient futureClient = new RemoteDomainConnectionService . FutureClient ( ) ; private final InjectedValue < Endpoint > endpointInjector = new InjectedValue < Endpoint > ( ) ; private final InjectedValue < SecurityRealm > securityRealmInjector = new InjectedValue < SecurityRealm > ( ) ; private final ThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "domain-connection-threads" ) , Boolean . FALSE , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . getContext ( ) ) ; private final ExecutorService executor = Executors . newCachedThreadPool ( threadFactory ) ; private RemoteDomainConnection connection ; private ManagementChannelHandler handler ; private RemoteDomainConnectionService ( final ModelController controller , final LocalHostControllerInfo localHostControllerInfo , final ProductConfig productConfig , final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ) { } public static Future < MasterDomainControllerClient > install ( final ServiceTarget serviceTarget , final ModelController controller , final LocalHostControllerInfo localHostControllerInfo , final ProductConfig productConfig , final String securityRealm , final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ) { } public synchronized void register ( ) throws IOException { } public synchronized void unregister ( ) { } public synchronized HostFileRepository getRemoteFileRepository ( ) { } @ Override public ModelNode execute ( ModelNode operation ) throws IOException { } @ Override public ModelNode execute ( Operation operation ) throws IOException { } @ Override public ModelNode execute ( ModelNode operation , OperationMessageHandler messageHandler ) throws IOException { } @ Override public ModelNode execute ( Operation operation , OperationMessageHandler messageHandler ) throws IOException { } @ Override public AsyncFuture < ModelNode > executeAsync ( ModelNode operation , OperationMessageHandler messageHandler ) { } @ Override public AsyncFuture < ModelNode > executeAsync ( Operation operation , OperationMessageHandler messageHandler ) { } @ Override public void close ( ) throws IOException { } @ Override public synchronized void start ( StartContext context ) throws StartException { final RemoteDomainConnection connection ; final ManagementChannelHandler handler ; try { final ModelNode hostInfo = RemoteDomainConnectionService . createLocalHostHostInfo ( localHostInfo , productConfig ) ; final ProtocolChannelClient . Configuration configuration = new ProtocolChannelClient . Configuration ( ) ; configuration . setUri ( new URI ( ( ( ( "remote:////" + ( ProtocolUtils . formatPossibleIpv6Address ( localHostInfo . getRemoteDomainControllerHost ( ) ) ) ) + ":" ) + ( localHostInfo . getRemoteDomainControllertPort ( ) ) ) ) ) ; configuration . setEndpoint ( endpointInjector . getValue ( ) ) ; final SecurityRealm realm = securityRealmInjector . getOptionalValue ( ) ; connection = new RemoteDomainConnection ( localHostInfo . getLocalHostName ( ) , hostInfo , configuration , realm , executor , new RemoteDomainConnection . HostRegistrationCallback ( ) { @ Override public boolean applyDomainModel ( final List < ModelNode > bootOperations ) { return applyRemoteDomainModel ( bootOperations ) ; } @ Override <START_BUG> public void registrationComplete ( ModelNode result , ManagementChannelHandler handler ) { <END_BUG> } } ) ; handler = connection . getHandler ( ) ; } catch ( Exception e ) { throw new StartException ( e ) ; } finally { futureClient . setClient ( this ) ; } this . connection = connection ; this . handler = handler ; } private boolean applyRemoteDomainModel ( final List < ModelNode > bootOperations ) { } @ Override public synchronized void stop ( StopContext context ) { } @ Override public synchronized MasterDomainControllerClient getValue ( ) throws IllegalArgumentException , IllegalStateException { } private class GetFileRequest extends AbstractManagementRequest < File , Void > { private final byte rootId ; private final String filePath ; private final HostFileRepository localFileRepository ; private GetFileRequest ( final byte rootId , final String filePath , final HostFileRepository localFileRepository ) { } @ Override public byte getOperationType ( ) { } @ Override protected void sendRequest ( ActiveOperation . ResultHandler < File > resultHandler , ManagementRequestContext < Void > context , FlushableDataOutput output ) throws IOException { } @ Override public void handleRequest ( DataInput input , ActiveOperation . ResultHandler < File > resultHandler , ManagementRequestContext < Void > context ) throws IOException { } } static class RemoteFileRepository implements HostFileRepository { private final HostFileRepository localFileRepository ; private volatile RemoteDomainConnectionService . RemoteFileRepositoryExecutor remoteFileRepositoryExecutor ; RemoteFileRepository ( final HostFileRepository localFileRepository ) { } @ Override public final File getFile ( String relativePath ) { } @ Override public final File getConfigurationFile ( String relativePath ) { } @ Override public final File [ ] getDeploymentFiles ( byte [ ] deploymentHash ) { } @ Override public File getDeploymentRoot ( byte [ ] deploymentHash ) { } private File getFile ( final String relativePath , final byte repoId ) { } private void setRemoteFileRepositoryExecutor ( RemoteDomainConnectionService . RemoteFileRepositoryExecutor remoteFileRepositoryExecutor ) { } @ Override public void deleteDeployment ( byte [ ] deploymentHash ) { } } private static interface RemoteFileRepositoryExecutor { File getFile ( final String relativePath , final byte repoId , HostFileRepository localFileRepository ) { } } private RemoteDomainConnectionService . RemoteFileRepositoryExecutor remoteFileRepositoryExecutor = new RemoteDomainConnectionService . RemoteFileRepositoryExecutor ( ) { public File getFile ( final String relativePath , final byte repoId , HostFileRepository localFileRepository ) { } } ; private class FutureClient extends AsyncFutureTask < MasterDomainControllerClient > { protected FutureClient ( ) { } private void setClient ( MasterDomainControllerClient client ) { } } private static class HostAlreadyExistsException extends IOException { private static final long serialVersionUID = 1L ; public HostAlreadyExistsException ( String msg ) { } } static ModelNode createLocalHostHostInfo ( final LocalHostControllerInfo hostInfo , final ProductConfig productConfig ) { } }

Fix:
public void registrationComplete ( ManagementChannelHandler handler ) {