Buggy code:
class ClientSideThread implements Runnable { Socket sock ; Scanner input ; Client c ; ClientSideThread ( Socket SOCK ) { } ClientSideThread ( Socket SOCK , Client c ) { } public void run ( ) { } public void messageDecypher ( String message ) { switch ( message . substring ( 0 , 1 ) ) { case "V" : { final int uid = Integer . parseInt ( message . substring ( 1 , message . length ( ) ) ) ; SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . setUser ( uid ) ; c . createLobbyFrame ( ) ; } } ) ; break ; } case "I" : { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . badLogin ( ) ; } } ) ; try { sock . close ( ) ; } catch ( IOException e ) { System . out . println ( ( ( "ERROR:<seq2seq4repair_space>" + e ) + "<seq2seq4repair_space>in<seq2seq4repair_space>ClientSideThread.messageDecypher()<seq2seq4repair_space>" ) ) ; } break ; } case "E" : { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . userExists ( ) ; } } ) ; try { sock . close ( ) ; } catch ( IOException e ) { System . out . println ( ( ( "ERROR:<seq2seq4repair_space>" + e ) + "<seq2seq4repair_space>in<seq2seq4repair_space>ClientSideThread.messageDecypher()<seq2seq4repair_space>" ) ) ; } break ; } case "C" : { final String [ ] data = message . substring ( 1 , message . length ( ) ) . split ( "`" ) ; final int [ ] ids = new int [ data . length ] ; <START_BUG> for ( int i = 2 ; i < ( data . length ) ; i ++ ) { <END_BUG> ids [ i ] = Integer . parseInt ( data [ i ] ) ; } SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . enterGame ( ids ) ; } } ) ; break ; } case "B" : { int blockTime = Integer . parseInt ( message . substring ( 1 , message . length ( ) ) ) ; c . getGamePanel ( ) . blockTimer ( blockTime ) ; break ; } case "U" : { break ; } case "O" : { break ; } case "S" : { final String [ ] data = message . substring ( 1 , message . length ( ) ) . split ( "`" ) ; final int gid = Integer . parseInt ( data [ 0 ] ) ; SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { GamePanel p = c . getGamePanel ( ) ; p . getPlayers ( ) . clearAll ( ) ; p . colorIndex = 0 ; for ( int i = 2 ; i < ( data . length ) ; i += 3 ) { c . getGamePanel ( ) . addPlayer ( Integer . parseInt ( data [ i ] ) , data [ ( i + 1 ) ] , Integer . parseInt ( data [ ( i + 2 ) ] ) , 9001 ) ; } c . setGameID ( gid ) ; p . showNotification ( "A<seq2seq4repair_space>player<seq2seq4repair_space>joined<seq2seq4repair_space>or<seq2seq4repair_space>scored,<seq2seq4repair_space>who<seq2seq4repair_space>knows" , null , false ) ; p . setGameID ( gid ) ; p . setPlayerColor ( ) ; } } ) ; break ; } case "G" : { System . out . println ( ( "Message=" + message ) ) ; String [ ] data = message . substring ( 1 , message . length ( ) ) . split ( "`" ) ; final Object [ ] [ ] gameData = new Object [ ( data . length ) // 3 ] [ 3 ] ; if ( ( data . length ) > 1 ) { for ( int i = 0 ; i < ( data . length ) ; i += 3 ) { System . out . println ( data . length ) ; gameData [ ( i // 3 ) ] = new Object [ ] { new Integer ( data [ i ] ) , data [ ( i + 1 ) ] , new Integer ( data [ ( i + 2 ) ] ) } ; } SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . getLobbyPanel ( ) . refreshGamesList ( gameData , false ) ; } } ) ; } else { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . getLobbyPanel ( ) . refreshGamesList ( null , true ) ; } } ) ; } break ; } case "P" : { String [ ] data = message . substring ( 1 , message . length ( ) ) . split ( "`" ) ; final Object [ ] [ ] userData = new Object [ ( data . length ) // 2 ] [ 3 ] ; for ( int i = 0 ; i < ( data . length ) ; i += 2 ) { System . out . println ( i ) ; userData [ ( i // 2 ) ] = new Object [ ] { new Integer ( data [ i ] ) , data [ ( i + 1 ) ] , new Integer ( 9000 ) } ; } SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { c . getLobbyPanel ( ) . refreshUserList ( userData ) ; } } ) ; break ; } case "M" : { int uid ; int gid ; String username ; String actual_msg ;

Fix:
for ( int i = 0 ; i < ( data . length ) ; i ++ ) {