Buggy code:
public class RemoteDomainConnectionService implements MasterDomainControllerClient , ClosedCallback , Service < MasterDomainControllerClient > { private static final Logger log = Logger . getLogger ( "org.jboss.as.domain.controller" ) ; private final ModelController controller ; private final InetAddress host ; private final int port ; private final String name ; private final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ; private final Provider saslProvider = new JBossSaslProvider ( ) ; private volatile ProtocolChannelClient < ManagementChannel > channelClient ; private volatile ModelControllerClient masterProxy ; private volatile TransactionalModelControllerOperationHandler txOperationHandler ; private final AtomicBoolean shutdown = new AtomicBoolean ( ) ; private volatile ManagementChannel channel ; private final ExecutorService executor = Executors . newCachedThreadPool ( ) ; private final AtomicBoolean connected = new AtomicBoolean ( false ) ; private final RemoteDomainConnectionService . FutureClient futureClient = new RemoteDomainConnectionService . FutureClient ( ) ; private final InjectedValue < Endpoint > endpointInjector = new InjectedValue < Endpoint > ( ) ; private final InjectedValue < CallbackHandlerFactory > callbackFactoryInjector = new InjectedValue < CallbackHandlerFactory > ( ) ; private RemoteDomainConnectionService ( final ModelController controller , final String name , final InetAddress host , final int port , final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ) { } public static Future < MasterDomainControllerClient > install ( final ServiceTarget serviceTarget , final ModelController controller , final String localHostName , final String remoteDcHost , final int remoteDcPort , final String securityRealm , final RemoteDomainConnectionService . RemoteFileRepository remoteFileRepository ) { } public void register ( ) { } private synchronized void connect ( ) { } public synchronized void unregister ( ) { } public synchronized FileRepository 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 { } @ Override public synchronized void stop ( StopContext context ) { } @ Override public void connectionClosed ( ) { if ( ! ( connected . get ( ) ) ) { RemoteDomainConnectionService . log . error ( "Null<seq2seq4repair_space>reconnect<seq2seq4repair_space>info,<seq2seq4repair_space>cannot<seq2seq4repair_space>try<seq2seq4repair_space>to<seq2seq4repair_space>reconnect" ) ; return ; } if ( ! ( shutdown . get ( ) ) ) { new Thread ( new Runnable ( ) { @ Override public void run ( ) { try { Thread . sleep ( 3000 ) ; } catch ( InterruptedException e ) { } while ( ! ( shutdown . get ( ) ) ) { RemoteDomainConnectionService . log . debug ( "Attempting<seq2seq4repair_space>reconnection<seq2seq4repair_space>to<seq2seq4repair_space>master..." ) ; try { connect ( ) ; <START_BUG> RemoteDomainConnectionService . log . info ( "Connected<seq2seq4repair_space>to<seq2seq4repair_space>master" ) ; <END_BUG> break ; } catch ( Exception e ) { } try { Thread . sleep ( 3000 ) ; } catch ( InterruptedException e ) { } } } } ) . start ( ) ; } } @ Override public synchronized MasterDomainControllerClient getValue ( ) throws IllegalArgumentException , IllegalStateException { } private abstract class RegistryRequest < T > extends ManagementRequest < T > { } private class RegisterModelControllerRequest extends RemoteDomainConnectionService . RegistryRequest < String > { RegisterModelControllerRequest ( ) { } @ Override protected byte getRequestCode ( ) { } @ Override protected void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } protected ManagementResponseHandler < String > getResponseHandler ( ) { } } private class UnregisterModelControllerRequest extends RemoteDomainConnectionService . RegistryRequest < Void > { @ Override protected byte getRequestCode ( ) { } @ Override protected void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } protected ManagementResponseHandler < Void > getResponseHandler ( ) { } } private class GetFileRequest extends RemoteDomainConnectionService . RegistryRequest < File > { private final byte rootId ; private final String filePath ; private final FileRepository localFileRepository ; private GetFileRequest ( final byte rootId , final String filePath , final FileRepository localFileRepository ) { } @ Override public final byte getRequestCode ( ) { } @ Override protected final void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } protected ManagementResponseHandler < File > getResponseHandler ( ) { } } static class RemoteFileRepository implements FileRepository { private final FileRepository localFileRepository ; private volatile RemoteDomainConnectionService . RemoteFileRepositoryExecutor remoteFileRepositoryExecutor ; RemoteFileRepository ( final FileRepository 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 ) { } } private static interface RemoteFileRepositoryExecutor { File getFile ( final String relativePath , final byte repoId , FileRepository localFileRepository ) { } } private RemoteDomainConnectionService . RemoteFileRepositoryExecutor remoteFileRepositoryExecutor = new RemoteDomainConnectionService . RemoteFileRepositoryExecutor ( ) { public File getFile ( final String relativePath , final byte repoId , FileRepository localFileRepository ) { } } ; private class FutureClient extends AsyncFutureTask < MasterDomainControllerClient > { protected FutureClient ( ) { } private void setClient ( MasterDomainControllerClient client ) { } } }

Fix:
RemoteDomainConnectionService . log . info ( "Reconnected<seq2seq4repair_space>to<seq2seq4repair_space>master" ) ;