Buggy code:
public final class Main { static final int generations = 10000 ; static final int populationSize = 100 ; public static void main ( String [ ] args ) throws FileNotFoundException , IOException { CmdLineOptions options = new CmdLineOptions ( args ) ; Evolvable initial = new GeneticAlgorithmAgent ( ) ; options . setTimeLimit ( 100 ) ; options . setAgent ( ( ( Agent ) ( initial ) ) ) ; options . setFPS ( MaxFPS ) ; options . setPauseWorld ( false ) ; options . setVisualization ( false ) ; ProgressTask task = new ProgressTask ( options ) ; int seed = 6189642 ; options . setLevelRandSeed ( seed ) ; CustomES es = new CustomES ( task , initial , Main . populationSize ) ; System . out . println ( ( ( ( "Evolving<seq2seq4repair_space>" + initial ) + "<seq2seq4repair_space>with<seq2seq4repair_space>task<seq2seq4repair_space>" ) + task ) ) ; System . out . println ( ( "options.getTimeLimit()<seq2seq4repair_space>=<seq2seq4repair_space>" + ( options . getTimeLimit ( ) ) ) ) ; String fileName = ( ( "evolved-" + "-uid-" ) + seed ) + ".xml" ; DecimalFormat df = new DecimalFormat ( ) ; float bestScore = 600 ; int dif = 0 ; for ( int gen = 0 ; gen < ( Main . generations ) ; gen ++ ) { seed -- ; dif -- ; if ( dif < 0 ) { dif = 9 ; } if ( seed < 0 ) { seed = 1000 ; } options . setLevelDifficulty ( dif ) ; options . setLevelRandSeed ( seed ) ; es . nextGeneration ( ) ; float fitn = es . getBestFitnesses ( ) [ 0 ] ; <START_BUG> String path = "C://Users//Olivia//Documents//Learning<seq2seq4repair_space>and<seq2seq4repair_space>AI//test.txt" ; <END_BUG> File file = new File ( path ) ; FileWriter fileWriter = new FileWriter ( file , true ) ; BufferedWriter bufferFileWriter = new BufferedWriter ( fileWriter ) ; fileWriter . append ( ( ( ( ( "Generation:<seq2seq4repair_space>" + gen ) + "<seq2seq4repair_space>CurrentBest:<seq2seq4repair_space>" ) + ( df . format ( fitn ) ) ) + "<seq2seq4repair_space>" ) ) ; bufferFileWriter . close ( ) ; System . out . print ( ( ( ( ( "Generation:<seq2seq4repair_space>" + gen ) + "<seq2seq4repair_space>current<seq2seq4repair_space>best:<seq2seq4repair_space>" ) + ( df . format ( fitn ) ) ) + ";<seq2seq4repair_space>" ) ) ; if ( fitn > bestScore ) { bestScore = fitn ; fileName = ( ( ( ( "evolved-progress-" + ( options . getAgentFullLoadName ( ) ) ) + gen ) + "-uid-" ) + seed ) + ".xml" ; final Agent a = ( ( Agent ) ( es . getBests ( ) [ 0 ] ) ) ; task . dumpFitnessEvaluation ( bestScore , ( ( "fitnessImprovements-" + ( options . getAgentFullLoadName ( ) ) ) + ".txt" ) ) ; options . setAgent ( a ) ; System . out . println ( ( "a<seq2seq4repair_space>=<seq2seq4repair_space>" + ( options . getMarioMode ( ) ) ) ) ; options . setVisualization ( true ) ; options . setFPS ( 42 ) ; task . getEnvironment ( ) . reset ( options ) ; task . evaluate ( a ) ; options . setVisualization ( false ) ; options . setFPS ( 100 ) ; System . out . print ( ( "MODE:<seq2seq4repair_space>=<seq2seq4repair_space>" + ( task . getEnvironment ( ) . getEvaluationInfo ( ) . marioMode ) ) ) ; System . out . print ( ( "TIME<seq2seq4repair_space>LEFT:<seq2seq4repair_space>" + ( task . getEnvironment ( ) . getEvaluationInfo ( ) . timeLeft ) ) ) ; System . out . println ( ( ",<seq2seq4repair_space>STATUS<seq2seq4repair_space>=<seq2seq4repair_space>" + ( task . getEnvironment ( ) . getEvaluationInfo ( ) . marioStatus ) ) ) ; } } System . out . println ( "\n\n\n\n\n\n\n\n\n" ) ; try { Stats . main ( new String [ ] { fileName , "0" } ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } System . exit ( 0 ) ; } No newline ; at end ; of file ; }

Fix:
String path = "E:\\Development\\SchoolWork<seq2seq4repair_space>Spring<seq2seq4repair_space>2016\\Learning<seq2seq4repair_space>and<seq2seq4repair_space>Advanced<seq2seq4repair_space>Game<seq2seq4repair_space>AI\\MarioTesting\\GeneticAlgorithmTest.txt" ;