Source:
<code>public void run() { CommandReader.this.startMonitor.countDown(); DataInputStream stdIn = new DataInputStream( System.in ); boolean isTestSetFinished = false; try { while ( CommandReader.this.state.get() == RUNNABLE ) { Command command = decode( stdIn ); if ( command == null ) { String errorMessage = "[SUREFIRE] std/in stream corrupted: first sequence not recognized"; DumpErrorSingleton.getSingleton().dumpStreamText( errorMessage ); logger.error( errorMessage ); break; } else { switch ( command.getCommandType() ) { case RUN_CLASS: String test = command.getData(); boolean inserted = CommandReader.this.insertToQueue( test ); if ( inserted ) { CommandReader.this.wakeupIterator(); callListeners( command ); } break; case TEST_SET_FINISHED: CommandReader.this.makeQueueFull(); isTestSetFinished = true; CommandReader.this.wakeupIterator(); callListeners( command ); break; case SHUTDOWN: CommandReader.this.makeQueueFull(); CommandReader.this.wakeupIterator(); callListeners( command ); break; case BYE_ACK: callListeners( command ); return; default: <START> callListeners( command ); <END> break; } } } } catch ( EOFException e ) { CommandReader.this.state.set( TERMINATED ); if ( !isTestSetFinished ) { String msg = "TestSet has not finished before stream error has appeared >> " + "initializing exit by non-null configuration: " + CommandReader.this.shutdown; DumpErrorSingleton.getSingleton().dumpStreamException( e, msg ); exitByConfiguration(); } } catch ( IOException e ) { CommandReader.this.state.set( TERMINATED ); if ( !( e.getCause() instanceof InterruptedException ) ) { String msg = "[SUREFIRE] std/in stream corrupted"; DumpErrorSingleton.getSingleton().dumpStreamException( e, msg ); logger.error( msg, e ); } } finally { if ( !isTestSetFinished ) { CommandReader.this.makeQueueFull(); } CommandReader.this.wakeupIterator(); } }</code><technical_language>listeners called here. put IF condition: IF BYE_ACK -> return end of default case</technical_language>

Target:
public void run() { CommandReader.this.startMonitor.countDown(); DataInputStream stdIn = new DataInputStream( System.in ); boolean isTestSetFinished = false; try { while ( CommandReader.this.state.get() == RUNNABLE ) { Command command = decode( stdIn ); if ( command == null ) { String errorMessage = "[SUREFIRE] std/in stream corrupted: first sequence not recognized"; DumpErrorSingleton.getSingleton().dumpStreamText( errorMessage ); logger.error( errorMessage ); break; } else { switch ( command.getCommandType() ) { case RUN_CLASS: String test = command.getData(); boolean inserted = CommandReader.this.insertToQueue( test ); if ( inserted ) { CommandReader.this.wakeupIterator(); callListeners( command ); } break; case TEST_SET_FINISHED: CommandReader.this.makeQueueFull(); isTestSetFinished = true; CommandReader.this.wakeupIterator(); callListeners( command ); break; case SHUTDOWN: CommandReader.this.makeQueueFull(); CommandReader.this.wakeupIterator(); callListeners( command ); break; case BYE_ACK: callListeners( command ); CommandReader.this.state.set( TERMINATED ); default: callListeners( command ); break; } } } } catch ( EOFException e ) { CommandReader.this.state.set( TERMINATED ); if ( !isTestSetFinished ) { String msg = "TestSet has not finished before stream error has appeared >> " + "initializing exit by non-null configuration: " + CommandReader.this.shutdown; DumpErrorSingleton.getSingleton().dumpStreamException( e, msg ); exitByConfiguration(); } } catch ( IOException e ) { CommandReader.this.state.set( TERMINATED ); if ( !( e.getCause() instanceof InterruptedException ) ) { String msg = "[SUREFIRE] std/in stream corrupted"; DumpErrorSingleton.getSingleton().dumpStreamException( e, msg ); logger.error( msg, e ); } } finally { if ( !isTestSetFinished ) { CommandReader.this.makeQueueFull(); } CommandReader.this.wakeupIterator(); } }