Buggy code:
} final Map < String , String > env = new HashMap < String , String > ( ) ; for ( int i = 0 ; i < mapSize ; i ++ ) { status = StreamUtils . readWord ( inputStream , b ) ; if ( status != ( Status . MORE ) ) { break OUT ; } final String key = b . toString ( ) ; status = StreamUtils . readWord ( inputStream , b ) ; if ( ( status == ( Status . MORE ) ) || ( ( i == lastEntry ) && ( status == ( Status . END_OF_LINE ) ) ) ) { env . put ( key , b . toString ( ) ) ; } else { break OUT ; } } master . addProcess ( name , execCmd , env , workingDirectory ) ; break ; } case START : { if ( status != ( Status . MORE ) ) { break ; } status = StreamUtils . readWord ( inputStream , b ) ; final String name = b . toString ( ) ; master . startProcess ( name ) ; break ; } case STOP : { if ( status != ( Status . MORE ) ) { break ; } status = StreamUtils . readWord ( inputStream , b ) ; final String name = b . toString ( ) ; master . stopProcess ( name ) ; break ; } case REMOVE : { if ( status != ( Status . MORE ) ) { break ; } status = StreamUtils . readWord ( inputStream , b ) ; final String name = b . toString ( ) ; master . removeProcess ( name ) ; break ; } case SEND : { if ( status != ( Status . MORE ) ) { break ; } status = StreamUtils . readWord ( inputStream , b ) ; final String recipient = b . toString ( ) ; final List < String > msg = new ArrayList < String > ( 0 ) ; while ( status == ( Status . MORE ) ) { status = StreamUtils . readWord ( inputStream , b ) ; msg . add ( b . toString ( ) ) ; } master . sendMessage ( processName , recipient , msg ) ; break ; } case SEND_BYTES : { if ( status != ( Status . MORE ) ) { break ; } status = StreamUtils . readWord ( inputStream , b ) ; if ( status == ( Status . MORE ) ) { final String recipient = b . toString ( ) ; CheckedBytes cb = StreamUtils . readCheckedBytes ( inputStream ) ; status = cb . getStatus ( ) ; if ( ( cb . getChecksum ( ) ) != ( cb . getExpectedChecksum ( ) ) ) { log . error ( ( "Incorrect<seq2seq4repair_space>checksum<seq2seq4repair_space>on<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>" + recipient ) ) ; } else { master . sendMessage ( processName , recipient , cb . getBytes ( ) , cb . getExpectedChecksum ( ) ) ; } } break ; } case BROADCAST : { final List < String > msg = new ArrayList < String > ( 0 ) ; while ( status == ( Status . MORE ) ) { status = StreamUtils . readWord ( inputStream , b ) ; msg . add ( b . toString ( ) ) ; } master . broadcastMessage ( processName , msg ) ; break ; } case BROADCAST_BYTES : { if ( status == ( Status . MORE ) ) { CheckedBytes cb = StreamUtils . readCheckedBytes ( inputStream ) ; status = cb . getStatus ( ) ; if ( ( cb . getChecksum ( ) ) != ( cb . getExpectedChecksum ( ) ) ) { } else { master . broadcastMessage ( processName , cb . getBytes ( ) , cb . getExpectedChecksum ( ) ) ; } } break ; } } } catch ( IllegalArgumentException e ) { <START_BUG> log . error ( ( "Received<seq2seq4repair_space>unknown<seq2seq4repair_space>command:<seq2seq4repair_space>" + ( b . toString ( ) ) ) ) ; <END_BUG> } if ( status == ( Status . MORE ) ) StreamUtils . readToEol ( inputStream ) ; } } catch ( Exception e ) { log . error ( ( ( "Output<seq2seq4repair_space>stream<seq2seq4repair_space>handler<seq2seq4repair_space>for<seq2seq4repair_space>process<seq2seq4repair_space>" + ( processName ) ) + "<seq2seq4repair_space>caught<seq2seq4repair_space>an<seq2seq4repair_space>exception;<seq2seq4repair_space>shutting<seq2seq4repair_space>down" ) , e ) ; } finally { ManagedProcess . safeClose ( inputStream ) ; for ( ; ; ) try { invokeStopProcessListeners ( process . waitFor ( ) ) ; break ; } catch ( InterruptedException e ) { } boolean respawn = false ; synchronized ( ManagedProcess . this ) { start = false ; respawn = ! ( stopped ) ; } if ( respawn ) respawn ( ) ; } } private void respawn ( ) { } } private static final class ErrorStreamHandler implements Runnable { private static final Logger log = Logger . getLogger ( "org.jboss.as.process.stderr" ) ; private final String processName ; private final InputStream errorStream ; private ErrorStreamHandler ( final String processName , final InputStream errorStream ) { } public void run ( ) { NDC . push ( processName ) ; final int idx = NDC . getDepth ( ) ; final Reader reader = new InputStreamReader ( errorStream ) ; final StringBuilder b = new StringBuilder ( ) ; try { for ( ; ; ) { try { int c = reader . read ( ) ; if ( c == ( - 1 ) ) { return ; } if ( c == '\n' ) { if ( ( b . length ( ) ) > 0 ) { ManagedProcess . ErrorStreamHandler . log . error ( b . toString ( ) ) ; } b . setLength ( 0 ) ; } else { b . append ( ( ( char ) ( c ) ) ) ;

Fix:
log . error ( "Received<seq2seq4repair_space>unknown<seq2seq4repair_space>command" , e ) ;