Buggy code:
public abstract class AbstractModelControllerClient implements ModelControllerClient , ManagementOperationHandler { private final Map < Integer , AbstractModelControllerClient . ExecuteRequestContext > activeRequests = Collections . synchronizedMap ( new HashMap < Integer , AbstractModelControllerClient . ExecuteRequestContext > ( ) ) ; protected final ExecutorService executor = Executors . newCachedThreadPool ( ) ; final Logger log = Logger . getLogger ( "org.jboss.as.controller.client" ) ; @ Override public void close ( ) throws IOException { } @ 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 ManagementRequestHandler getRequestHandler ( final byte id ) { } protected abstract ManagementClientChannelStrategy getClientChannelStrategy ( ) throws IOException , URISyntaxException { } private ModelNode executeSynch ( ModelNode operation , OperationAttachments attachments , OperationMessageHandler messageHandler ) { } private AsyncFuture < ModelNode > executeAsync ( ModelNode operation , OperationAttachments attachments , OperationMessageHandler messageHandler ) { } private class ExecuteRequest extends ManagementRequest < ModelNode > { private final AbstractModelControllerClient . ExecuteRequestContext executeRequestContext ; private final ModelNode operation ; private final boolean async ; ExecuteRequest ( final int batchId , final boolean async , final ModelNode operation , final OperationMessageHandler messageHandler , final OperationAttachments attachments ) { } @ Override protected byte getRequestCode ( ) { } protected CloseHandler < Channel > getRequestCloseHandler ( ) { return executeRequestContext . getRequestCloseHandler ( ) ; } @ Override protected void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } protected ManagementResponseHandler < ModelNode > getResponseHandler ( ) { } @ Override protected void setError ( Exception e ) { } } private class HandleReportRequestHandler extends ManagementRequestHandler { @ Override protected void readRequest ( final DataInput input ) throws IOException { } protected void processRequest ( ) { } } private class ReadAttachmentInputStreamRequestHandler extends ManagementRequestHandler { InputStream attachmentInput ; byte [ ] bytes ; @ Override protected void readRequest ( final DataInput input ) throws IOException { } protected void processRequest ( ) throws RequestProcessingException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { } } private static class ExecuteRequestContext { final AbstractModelControllerClient . ExecuteRequest executeRequest ; final OperationMessageHandler messageHandler ; final OperationAttachments attachments ; volatile boolean done ; ExecuteRequestContext ( final AbstractModelControllerClient . ExecuteRequest executeRequest , final OperationMessageHandler messageHandler , final OperationAttachments attachments ) { } CloseHandler < Channel > getRequestCloseHandler ( ) { return new CloseHandler < Channel > ( ) { <START_BUG> public void handleClose ( Channel closed ) { <END_BUG> if ( ! ( done ) ) { executeRequest . setError ( new ClientException ( new IOException ( "Channel<seq2seq4repair_space>closed" ) ) ) ; } } } ; } OperationMessageHandler getMessageHandler ( ) { } OperationAttachments getAttachments ( ) { } void done ( ) { } } private class DelegatingCancellableAsyncFuture implements AsyncFuture < ModelNode > { private final AsyncFuture < ModelNode > delegate ; private final int batchId ; private volatile boolean isCancelled ; public DelegatingCancellableAsyncFuture ( AsyncFuture < ModelNode > delegate , int batchId ) { } public Status await ( ) throws InterruptedException { } public Status await ( long timeout , TimeUnit unit ) throws InterruptedException { } public ModelNode getUninterruptibly ( ) throws CancellationException , ExecutionException { } public ModelNode getUninterruptibly ( long timeout , TimeUnit unit ) throws CancellationException , ExecutionException , TimeoutException { } public Status awaitUninterruptibly ( ) { } public Status awaitUninterruptibly ( long timeout , TimeUnit unit ) { } public boolean isDone ( ) { } public Status getStatus ( ) { } public < A > void addListener ( Listener < ? extends ModelNode , A > listener , A attachment ) { } public ModelNode get ( ) throws InterruptedException , ExecutionException { } public ModelNode get ( long timeout , TimeUnit unit ) throws InterruptedException , ExecutionException , TimeoutException { } @ Override public boolean isCancelled ( ) { } @ Override public boolean cancel ( boolean interruptionDesired ) { } @ Override public void asyncCancel ( boolean interruptionDesired ) { } private class CancelAsyncRequest extends ManagementRequest < Void > { public CancelAsyncRequest ( ) { } @ Override protected byte getRequestCode ( ) { } @ Override protected ManagementResponseHandler < Void > getResponseHandler ( ) { } } } }

Fix:
public void handleClose ( final Channel closed , final IOException exception ) {