Buggy code:
private long systemHeartbeatReceiveInterval = 10000 ; private String virtualHost ; private TcpOperations < byte [ ] > tcpClient ; private MessageHeaderInitializer headerInitializer ; private final Map < String , StompBrokerRelayMessageHandler . StompConnectionHandler > connectionHandlers = new ConcurrentHashMap < String , StompBrokerRelayMessageHandler . StompConnectionHandler > ( ) ; private final StompBrokerRelayMessageHandler . Stats stats = new StompBrokerRelayMessageHandler . Stats ( ) ; public StompBrokerRelayMessageHandler ( SubscribableChannel clientInChannel , MessageChannel clientOutChannel , SubscribableChannel brokerChannel , Collection < String > destinationPrefixes ) { } public void setRelayHost ( String relayHost ) { } public String getRelayHost ( ) { } public void setRelayPort ( int relayPort ) { } public int getRelayPort ( ) { } public void setSystemHeartbeatSendInterval ( long systemHeartbeatSendInterval ) { } public long getSystemHeartbeatSendInterval ( ) { } public void setSystemHeartbeatReceiveInterval ( long heartbeatReceiveInterval ) { } public long getSystemHeartbeatReceiveInterval ( ) { } public void setClientLogin ( String clientLogin ) { } public String getClientLogin ( ) { } public void setClientPasscode ( String clientPasscode ) { } public String getClientPasscode ( ) { } public void setSystemLogin ( String systemLogin ) { } public String getSystemLogin ( ) { } public void setSystemPasscode ( String systemPasscode ) { } public String getSystemPasscode ( ) { } public void setVirtualHost ( String virtualHost ) { } public String getVirtualHost ( ) { } public void setTcpClient ( TcpOperations < byte [ ] > tcpClient ) { } public TcpOperations < byte [ ] > getTcpClient ( ) { } public int getConnectionCount ( ) { } public void setHeaderInitializer ( MessageHeaderInitializer headerInitializer ) { } public MessageHeaderInitializer getHeaderInitializer ( ) { } public String getStatsInfo ( ) { } @ Override protected void startInternal ( ) { } @ Override protected void stopInternal ( ) { } @ Override protected void handleMessageInternal ( Message < ? > message ) { } @ Override public String toString ( ) { } private class StompConnectionHandler implements TcpConnectionHandler < byte [ ] > { private final String sessionId ; private final boolean isRemoteClientSession ; private final StompHeaderAccessor connectHeaders ; private volatile TcpConnection < byte [ ] > tcpConnection ; private volatile boolean isStompConnected ; private StompConnectionHandler ( String sessionId , StompHeaderAccessor connectHeaders ) { } private StompConnectionHandler ( String sessionId , StompHeaderAccessor connectHeaders , boolean isClientSession ) { } public String getSessionId ( ) { } @ Override public void afterConnected ( TcpConnection < byte [ ] > connection ) { } @ Override public void afterConnectFailure ( Throwable ex ) { } protected void handleTcpConnectionFailure ( String error , Throwable ex ) { } private void sendStompErrorFrameToClient ( String errorText ) { } protected void sendMessageToClient ( Message < ? > message ) { } @ Override public void handleMessage ( Message < byte [ ] > message ) { } protected void afterStompConnected ( StompHeaderAccessor connectedHeaders ) { } private void initHeartbeats ( StompHeaderAccessor connectedHeaders ) { } @ Override public void handleFailure ( Throwable ex ) { } @ Override public void afterConnectionClosed ( ) { } @ SuppressWarnings ( "unchecked" ) public ListenableFuture < Void > forward ( final Message < ? > message , final StompHeaderAccessor accessor ) { TcpConnection < byte [ ] > conn = this . tcpConnection ; if ( ! ( this . isStompConnected ) ) { if ( this . isRemoteClientSession ) { if ( logger . isDebugEnabled ( ) ) { <START_BUG> logger . debug ( ( "TCP<seq2seq4repair_space>connection<seq2seq4repair_space>closed<seq2seq4repair_space>already,<seq2seq4repair_space>ignoring<seq2seq4repair_space>" + ( accessor . getShortLogMessage ( ( ( byte [ ] ) ( message . getPayload ( ) ) ) ) ) ) ) ; <END_BUG> } return StompBrokerRelayMessageHandler . EMPTY_TASK ; } else { throw new IllegalStateException ( ( ( ( ( "Cannot<seq2seq4repair_space>forward<seq2seq4repair_space>messages<seq2seq4repair_space>" + ( conn != null ? "before<seq2seq4repair_space>STOMP<seq2seq4repair_space>CONNECTED.<seq2seq4repair_space>" : "while<seq2seq4repair_space>inactive.<seq2seq4repair_space>" ) ) + "Consider<seq2seq4repair_space>subscribing<seq2seq4repair_space>to<seq2seq4repair_space>receive<seq2seq4repair_space>BrokerAvailabilityEvent's<seq2seq4repair_space>from<seq2seq4repair_space>" ) + "an<seq2seq4repair_space>ApplicationListener<seq2seq4repair_space>Spring<seq2seq4repair_space>bean.<seq2seq4repair_space>Dropped<seq2seq4repair_space>" ) + ( accessor . getShortLogMessage ( message . getPayload ( ) ) ) ) ) ; } } final Message < ? > messageToSend = ( ( accessor . isMutable ( ) ) && ( accessor . isModified ( ) ) ) ? MessageBuilder . createMessage ( message . getPayload ( ) , accessor . getMessageHeaders ( ) ) : message ; StompCommand command = accessor . getCommand ( ) ; if ( ( logger . isDebugEnabled ( ) ) && ( ( ( ( SEND . equals ( command ) ) || ( SUBSCRIBE . equals ( command ) ) ) || ( UNSUBSCRIBE . equals ( command ) ) ) || ( DISCONNECT . equals ( command ) ) ) ) { logger . debug ( ( "Forwarding<seq2seq4repair_space>" + ( accessor . getShortLogMessage ( message . getPayload ( ) ) ) ) ) ; } else if ( logger . isTraceEnabled ( ) ) { logger . trace ( ( "Forwarding<seq2seq4repair_space>" + ( accessor . getDetailedLogMessage ( message . getPayload ( ) ) ) ) ) ; } ListenableFuture < Void > future = conn . send ( ( ( Message < byte [ ] > ) ( messageToSend ) ) ) ; future . addCallback ( new org . springframework . util . concurrent . ListenableFutureCallback < Void > ( ) { @ Override public void onSuccess ( Void result ) { if ( ( accessor . getCommand ( ) ) == ( StompCommand . DISCONNECT ) ) { afterDisconnectSent ( accessor ) ; } } @ Override public void onFailure ( Throwable ex ) { if ( ( tcpConnection ) != null ) { handleTcpConnectionFailure ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>forward<seq2seq4repair_space>" + ( accessor . getShortLogMessage ( message . getPayload ( ) ) ) ) , ex ) ; } else if ( logger . isErrorEnabled ( ) ) { logger . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>forward<seq2seq4repair_space>" + ( accessor . getShortLogMessage ( message . getPayload ( ) ) ) ) ) ; } } } ) ; return future ; } private void afterDisconnectSent ( StompHeaderAccessor accessor ) { } public void clearConnection ( ) { }

Fix:
logger . debug ( ( "TCP<seq2seq4repair_space>connection<seq2seq4repair_space>closed<seq2seq4repair_space>already,<seq2seq4repair_space>ignoring<seq2seq4repair_space>" + ( accessor . getShortLogMessage ( message . getPayload ( ) ) ) ) ) ;