Buggy code:
public class NewRemoteProxyController implements NewProxyController , ManagementOperationHandler { private final PathAddress pathAddress ; private final ManagementChannel channel ; private final ExecutorService executorService ; private final Map < Integer , NewRemoteProxyController . ExecuteRequestContext > activeRequests = Collections . synchronizedMap ( new HashMap < Integer , NewRemoteProxyController . ExecuteRequestContext > ( ) ) ; private NewRemoteProxyController ( final ExecutorService executorService , final PathAddress pathAddress , final ManagementChannel channel ) { } public static NewRemoteProxyController create ( final ExecutorService executorService , final PathAddress pathAddress , final ManagementChannel channel ) { } public static NewRemoteProxyController create ( final ExecutorService executorService , final PathAddress pathAddress , final String hostName , final int port , String channelName ) throws IOException { } @ Override public PathAddress getProxyNodeAddress ( ) { } @ Override public ManagementRequestHandler getRequestHandler ( final byte id ) { } @ Override public void execute ( final ModelNode operation , final OperationMessageHandler handler , final ProxyOperationControl control , final OperationAttachments attachments ) { } private ManagementClientChannelStrategy getChannelStrategy ( ) { } private class ExecuteRequest extends ManagementRequest < Void > { private final NewRemoteProxyController . ExecuteRequestContext executeRequestContext ; private final ModelNode operation ; ExecuteRequest ( final int batchId , final ModelNode operation , final OperationMessageHandler messageHandler , final ProxyOperationControl control , final OperationAttachments attachments ) { } @ Override protected byte getRequestCode ( ) { <START_BUG> return NewModelControllerProtocol . EXECUTE_REQUEST ; <END_BUG> } @ Override protected void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } @ Override protected Void readResponse ( final DataInput input ) throws IOException { } } private class HandleReportRequestHandler extends ManagementRequestHandler { @ Override protected void readRequest ( final DataInput input ) throws IOException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { } } private class ReadAttachmentInputStreamRequestHandler extends ManagementRequestHandler { InputStream attachmentInput ; @ Override protected void readRequest ( final DataInput input ) throws IOException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { } } private abstract class ProxyOperationControlRequestHandler extends ManagementRequestHandler { @ Override protected void readRequest ( final DataInput input ) throws IOException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { } abstract void handle ( final int batchId , final ProxyOperationControl control , final ModelNode response ) throws IOException { } } private class OperationFailedRequestHandler extends NewRemoteProxyController . ProxyOperationControlRequestHandler { @ Override void handle ( final int batchId , final ProxyOperationControl control , final ModelNode response ) { } } private class OperationCompletedRequestHandler extends NewRemoteProxyController . ProxyOperationControlRequestHandler { @ Override void handle ( final int batchId , final ProxyOperationControl control , final ModelNode response ) { } } private class OperationPreparedRequestHandler extends NewRemoteProxyController . ProxyOperationControlRequestHandler { volatile int status ; final CountDownLatch completedLatch = new CountDownLatch ( 1 ) ; @ Override void handle ( final int batchId , final ProxyOperationControl control , final ModelNode response ) throws IOException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { } } private static class ExecuteRequestContext { final OperationMessageHandler messageHandler ; final ProxyOperationControl control ; final OperationAttachments attachments ; final CountDownLatch txCompletedLatch = new CountDownLatch ( 1 ) ; public ExecuteRequestContext ( final OperationMessageHandler messageHandler , final ProxyOperationControl control , final OperationAttachments attachments ) { } public OperationMessageHandler getMessageHandler ( ) { } public ProxyOperationControl getControl ( ) { } public OperationAttachments getAttachments ( ) { } void waitForTxCompleted ( ) { } void setTxCompleted ( ) { } } }

Fix:
return NewModelControllerProtocol . EXECUTE_TX_REQUEST ;