Buggy code:
public class MirrorUniverse { static Player plrCurrent ; public static void main ( String [ ] args ) { FileWriter frtReplay = null ; try { frtReplay = new FileWriter ( ( "replays//" + ( "LastGame" + ".txt" ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } BufferedWriter bfrReplay = new BufferedWriter ( frtReplay ) ; Scanner scnGame = null ; try { scnGame = new Scanner ( new File ( "game//GameConfig.txt" ) ) ; } catch ( FileNotFoundException e1 ) { e1 . printStackTrace ( ) ; } String strConfigL = scnGame . nextLine ( ) ; String strConfigR = scnGame . nextLine ( ) ; MUMapConfig mmcL = new MUMapConfig ( strConfigL ) ; MUMapConfig mmcR = new MUMapConfig ( strConfigR ) ; MUMap mumMapL = new MUMap ( mmcL ) ; MUMap mumMapR = new MUMap ( mmcR ) ; try { bfrReplay . write ( ( ( mumMapL . getConfigForGui ( ) ) + "\n" ) ) ; bfrReplay . write ( ( ( mumMapR . getConfigForGui ( ) ) + "\n" ) ) ; bfrReplay . flush ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } File filPlayersClasses = new File ( "player//player.txt" ) ; Scanner scnPlayersClasses = null ; try { scnPlayersClasses = new Scanner ( filPlayersClasses ) ; } catch ( FileNotFoundException e1 ) { System . out . println ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>Players<seq2seq4repair_space>Classes<seq2seq4repair_space>File" ) ; e1 . printStackTrace ( ) ; } while ( scnPlayersClasses . hasNextLine ( ) ) { String strPlayerClass = scnPlayersClasses . nextLine ( ) ; if ( strPlayerClass . startsWith ( "////" ) ) { continue ; } try { MirrorUniverse . plrCurrent = ( ( Player ) ( Class . forName ( strPlayerClass ) . newInstance ( ) ) ) ; } catch ( ClassNotFoundException e ) { System . out . println ( "Problem<seq2seq4repair_space>loading<seq2seq4repair_space>Players'<seq2seq4repair_space>classes" ) ; } catch ( InstantiationException e ) { e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { e . printStackTrace ( ) ; } } <START_BUG> int cutOff = 10000 ; <END_BUG> int intStep = 0 ; while ( ( ! ( mumMapL . getMapOver ( ) ) ) || ( ! ( mumMapR . getMapOver ( ) ) ) ) { int [ ] [ ] aintViewL = mumMapL . getView ( ) ; int [ ] [ ] aintViewR = mumMapR . getView ( ) ; cutOff -- ; if ( cutOff < 0 ) break ; int intMove = MirrorUniverse . plrCurrent . lookAndMove ( aintViewL , aintViewR ) ; try { if ( intStep != 0 ) { bfrReplay . write ( ",<seq2seq4repair_space>" ) ; } bfrReplay . write ( ( "" + intMove ) ) ; bfrReplay . flush ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } mumMapL . move ( intMove ) ; mumMapR . move ( intMove ) ; intStep ++ ; if ( intStep > 10000 ) { break ; } } int intStepL = mumMapL . getStep ( ) ; int intStepR = mumMapR . getStep ( ) ; int intStepMax = ( intStepL > intStepR ) ? intStepL : intStepR ; int intStepMin = ( intStepL > intStepR ) ? intStepR : intStepL ; int intStepDiff = intStepMax - intStepMin ; System . out . println ( "==============" ) ; System . out . println ( ( "Diff:<seq2seq4repair_space>" + intStepDiff ) ) ; System . out . println ( ( "Steps:<seq2seq4repair_space>" + intStepMax ) ) ; if ( intStepMax != intStep ) System . out . println ( "Step<seq2seq4repair_space>inconsistent" ) ; try { bfrReplay . write ( ( ( ( "\n" + intStepDiff ) + ",<seq2seq4repair_space>" ) + intStepMax ) ) ; bfrReplay . close ( ) ; frtReplay . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
int cutOff = 50 ;