Buggy code:
public class Client { public static int MAX_GAMES = 5 ; public static void main ( String [ ] args ) { for ( int i = 0 ; i < ( args . length ) ; i ++ ) { switch ( args [ i ] ) { case "--max-games" : try { int games = Integer . parseInt ( args [ ( ++ i ) ] ) ; if ( games <= 0 ) { System . err . println ( ( "max-games<seq2seq4repair_space>only<seq2seq4repair_space>accepts<seq2seq4repair_space>numbers" + "<seq2seq4repair_space>greater<seq2seq4repair_space>than<seq2seq4repair_space>zero!" ) ) ; i -- ; continue ; } Client . MAX_GAMES = games ; } catch ( NumberFormatException ex ) { System . err . println ( ( "The<seq2seq4repair_space>max-games<seq2seq4repair_space>argument<seq2seq4repair_space>only<seq2seq4repair_space>accepts" + "<seq2seq4repair_space>numbers!" ) ) ; i -- ; } break ; case "--no-file" : System . out . println ( "Disabling<seq2seq4repair_space>logging<seq2seq4repair_space>to<seq2seq4repair_space>file..." ) ; PontoonLogger . fileLog = false ; break ; case "-v" : case "--verbose" : System . out . println ( "Enabling<seq2seq4repair_space>verbose<seq2seq4repair_space>output..." ) ; PontoonLogger . verbose = true ; break ; case "-h" : case "--help" : System . out . println ( Client . helpMessage ( ) ) ; return ; default : System . out . printf ( "Unknown<seq2seq4repair_space>arugment<seq2seq4repair_space>%s%n" , args [ i ] ) ; } } try { PontoonLogger . setup ( "client" ) ; } catch ( IOException ex ) { System . err . printf ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>up<seq2seq4repair_space>logging.<seq2seq4repair_space>Reason%n%s" , ex . getMessage ( ) ) ; } Scanner input = new Scanner ( System . in ) ; boolean running = true ; IPlayer player = null ; while ( running ) { System . out . println ( "Run<seq2seq4repair_space>which<seq2seq4repair_space>client?<seq2seq4repair_space>(gui,<seq2seq4repair_space>cli,<seq2seq4repair_space>robo)" ) ; String run = input . nextLine ( ) . trim ( ) ; switch ( run ) { case "gui" : System . out . println ( "Starting<seq2seq4repair_space>GUI<seq2seq4repair_space>client..." ) ; player = new GUIPlayer ( ) ; player . init ( ) ; break ; case "cli" : System . out . println ( "Starting<seq2seq4repair_space>CLI<seq2seq4repair_space>client..." ) ; player = new CLIPlayer ( ) ; player . init ( ) ; break ; case "robo" : System . out . println ( "Starting<seq2seq4repair_space>automated<seq2seq4repair_space>clients..." ) ; <START_BUG> System . out . println ( "How<seq2seq4repair_space>many<seq2seq4repair_space>client<seq2seq4repair_space>do<seq2seq4repair_space>you<seq2seq4repair_space>want?" ) ; <END_BUG> String in = input . nextLine ( ) ; int num = - 1 ; try { num = Integer . parseInt ( in ) ; } catch ( NumberFormatException ex ) { System . out . println ( "You<seq2seq4repair_space>must<seq2seq4repair_space>specify<seq2seq4repair_space>a<seq2seq4repair_space>number." ) ; } if ( num > 0 ) { for ( int i = 0 ; i < num ; i ++ ) { player = new RoboPlayer ( ) ; player . init ( ) ; player . startGame ( ) ; } } else { System . out . println ( "Cannot<seq2seq4repair_space>start<seq2seq4repair_space>less<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>robo." ) ; } break ; case "exit" : case "quit" : return ; default : System . err . printf ( "Unknown<seq2seq4repair_space>client<seq2seq4repair_space>type<seq2seq4repair_space>'%s'!%n" , run ) ; } if ( player != null ) while ( player . isPlaying ( ) ) { } } try { PontoonLogger . close ( ) ; } catch ( IOException ex ) { System . err . printf ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>close<seq2seq4repair_space>logger.<seq2seq4repair_space>Reason:%n%s" , ex . getMessage ( ) ) ; } } private static String helpMessage ( ) { } }

Fix:
System . out . println ( "How<seq2seq4repair_space>many<seq2seq4repair_space>clients<seq2seq4repair_space>do<seq2seq4repair_space>you<seq2seq4repair_space>want?" ) ;