Buggy code:
return ; } String name = content . getName ( ) ; String prefix = data . getName ( ) . getPrefix ( ( - 2 ) ) . toUri ( ) ; String sid = data . getName ( ) . get ( ( - 3 ) ) . toEscapedString ( ) ; long sessionNo = Long . parseLong ( data . getName ( ) . get ( ( - 2 ) ) . toEscapedString ( ) ) ; long sequenceNo = Long . parseLong ( data . getName ( ) . get ( ( - 1 ) ) . toEscapedString ( ) ) ; String word = content . getWord ( ) ; Messages . MessageType type = content . getType ( ) ; Log . i ( "gamesync" , ( ( ( ( ( ( ( ( ( ( ( ( ( ( "[onData]<seq2seq4repair_space>name=" + name ) + "<seq2seq4repair_space>prefix=" ) + prefix ) + "<seq2seq4repair_space>sid=" ) + sid ) + "<seq2seq4repair_space>sessionNo=" ) + sessionNo ) + "<seq2seq4repair_space>sequenceNo=" ) + sequenceNo ) + "<seq2seq4repair_space>word=" ) + word ) + "<seq2seq4repair_space>(" ) + type ) + ")" ) ) ; int i ; Player player = null ; for ( i = 0 ; i < ( roster_ . size ( ) ) ; i ++ ) { player = roster_ . get ( i ) ; String tempName = player . name ; String tempSid = player . sid ; long tempSessionNo = player . sessionNo ; if ( ( name . equals ( tempName ) ) && ( sid . equals ( tempSid ) ) ) { if ( sessionNo > tempSessionNo ) { player . sessionNo = sessionNo ; } break ; } } if ( ( i == ( roster_ . size ( ) ) ) && ( type . equals ( JOIN ) ) ) { player = new NetPlayer ( name , sessionNo , sid , false ) ; roster_ . add ( player ) ; Log . i ( "gamesync" , ( ( ( ( ( ( "[onData]<seq2seq4repair_space>added<seq2seq4repair_space>player=(" + name ) + ",<seq2seq4repair_space>" ) + sessionNo ) + ",<seq2seq4repair_space>" ) + sid ) + ")" ) ) ; } Log . i ( "gamesync" , ( ( ( "[onData]<seq2seq4repair_space>roundNum=" + ( roundNum_ ) ) + "<seq2seq4repair_space>guessNum=" ) + ( guessNum_ ) ) ) ; if ( ( type . equals ( EVAL ) ) && ( ! ( sid . equals ( sid_ ) ) ) ) { String [ ] parts = word . split ( "-" ) ; int roundNum = Integer . valueOf ( parts [ 0 ] ) ; int guessNum = Integer . valueOf ( parts [ 1 ] ) ; String eval = parts [ 2 ] ; if ( ( ( roundNum == ( roundNum_ ) ) && ( guessNum == ( guessNum_ ) ) ) && ( player . isThinking ( ) ) ) { player . think ( eval ) ; Log . i ( "gamesync" , "[onData]<seq2seq4repair_space>drawer<seq2seq4repair_space>think" ) ; } } else if ( ( type . equals ( GUESS ) ) && ( ! ( sid . equals ( sid_ ) ) ) ) { String [ ] parts = word . split ( "-" ) ; int roundNum = Integer . valueOf ( parts [ 0 ] ) ; int guessNum = Integer . valueOf ( parts [ 1 ] ) ; char guess = parts [ 2 ] . charAt ( 0 ) ; if ( ( ( roundNum == ( roundNum_ ) ) && ( guessNum == ( guessNum_ ) ) ) && ( player . isThinking ( ) ) ) { player . think ( guess ) ; Log . i ( "gamesync" , "[onData]<seq2seq4repair_space>guesser<seq2seq4repair_space>think" ) ; } } else if ( type . equals ( LEAVE ) ) { for ( i = 0 ; i < ( roster_ . size ( ) ) ; i ++ ) { player = roster_ . get ( i ) ; <START_BUG> if ( ( ( ( player . name ) == name ) && ( ( player . sessionNo ) == sessionNo ) ) && ( player . sid . equals ( sid ) ) ) { <END_BUG> roster_ . remove ( i ) ; Log . i ( "gamesync" , ( ( ( ( ( ( "[onData]<seq2seq4repair_space>removed<seq2seq4repair_space>player=(" + ( player . name ) ) + ",<seq2seq4repair_space>" ) + ( player . sessionNo ) ) + ",<seq2seq4repair_space>" ) + ( player . sid ) ) + ")" ) ) ; break ; } } } Interest timeout = new Interest ( new Name ( "//local//timeout" ) ) ; timeout . setInterestLifetimeMilliseconds ( 120000 ) ; try { face_ . expressInterest ( timeout , GameSync . DummyOnData . onData_ , this . new Alive ( sequenceNo , name , sessionNo , prefix ) ) ; } catch ( IOException ex ) { Logger . getLogger ( GameSync . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; return ; } } @ Override public final void onInterest ( Name prefix , Interest interest , Face face , long interestFilterId , InterestFilter filter ) { } @ Override public final void onReceivedSyncState ( List syncStates , boolean isRecovery ) { } private static class SyncTimeout implements OnTimeout { public final void onTimeout ( Interest interest ) { } public static final OnTimeout onTimeout_ = new GameSync . SyncTimeout ( ) ; } private class Heartbeat implements OnTimeout { public final void onTimeout ( Interest interest ) { } } private class Alive implements OnTimeout { public Alive ( long tempSequenceNo , String name , long sessionNo , String prefix ) { } public final void onTimeout ( Interest interest ) { } private final long tempSequenceNo_ ;

Fix:
if ( ( ( player . name . equals ( name ) ) && ( ( player . sessionNo ) == sessionNo ) ) && ( player . sid . equals ( sid ) ) ) {