Program: 183952
Project: 183952
Buggy source:
private int run() throws Exception {
  List<TravelingTournamentProblem.Neighborhood> neighborhoods=new ArrayList<TravelingTournamentProblem.Neighborhood>();
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.TWO_OPT_SWAP_ROUNDS);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.TWO_OPT_SWAP_TEAMS);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SWAP_HOME_VISITOR);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SHIFT_ROUND);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SWAP_MATCH_ROUND);
  File baselineOutDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  TTPParameters baseline=new TTPParameters(method,neighborhoods,TravelingTournamentProblem.ConstructionHeuristic.GRASP,VirtualScheduleConstructionMethod.FIRSTPOLYGONTHENGREEK,50,10,250,10,instanceFile,baselineOutDir);
  TravelingTournamentProblem travelingTournamentProblem=new TravelingTournamentProblem();
  travelingTournamentProblem.run(baseline);
  boolean headerWritten=false;
  File sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  File avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  File intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (int i=0; i <= 200; i+=10) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
    TTPParameters current=new TTPParameters(baseline);
    current.setTabuListLength(i);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + i,result);
    writeResultAvg(avgFile,"String_Node_Str" + i,result);
  }
  if (method == TravelingTournamentProblem.Method.GRASP) {
    headerWritten=false;
    sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    for (int i=0; i <= 100; i+=10) {
      File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
      TTPParameters current=new TTPParameters(baseline);
      current.setGraspTries(Math.max(i,1));
      current.setThreadCount(Math.max(i,1));
      current.setOutputDirectory(subOutDir);
      TTPResult result=travelingTournamentProblem.run(current);
      if (!headerWritten) {
        writeResultHeader(sumFile,"String_Node_Str",result);
        writeResultHeader(avgFile,"String_Node_Str",result);
        headerWritten=true;
      }
      writeResultSum(sumFile,"String_Node_Str" + i,result);
      writeResultAvg(avgFile,"String_Node_Str" + i,result);
    }
  }
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (int i=0; i <= 500; i+=50) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
    TTPParameters current=new TTPParameters(baseline);
    current.setIterationsWithoutImprovement(i);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + i,result);
    writeResultAvg(avgFile,"String_Node_Str" + i,result);
  }
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  TravelingTournamentProblem.ConstructionHeuristic constructionHeuristic : TravelingTournamentProblem.ConstructionHeuristic.values()) {
    if (constructionHeuristic == TravelingTournamentProblem.ConstructionHeuristic.GRASP)     continue;
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + constructionHeuristic);
    TTPParameters current=new TTPParameters(baseline);
    current.setConstructionHeuristic(constructionHeuristic);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + constructionHeuristic,result);
    writeResultAvg(avgFile,"String_Node_Str" + constructionHeuristic,result);
  }
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  VirtualScheduleConstructionMethod virtualScheduleConstructionMethod : VirtualScheduleConstructionMethod.values()) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + virtualScheduleConstructionMethod);
    TTPParameters current=new TTPParameters(baseline);
    current.setVirtualScheduleConstructionMethod(virtualScheduleConstructionMethod);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + virtualScheduleConstructionMethod,result);
    writeResultAvg(avgFile,"String_Node_Str" + virtualScheduleConstructionMethod,result);
  }
  Set<TravelingTournamentProblem.Neighborhood> neighborhoodsBase=new HashSet<TravelingTournamentProblem.Neighborhood>(neighborhoods);
  Set<Set<TravelingTournamentProblem.Neighborhood>> neighborhoodsPowerSet=powerSet(neighborhoodsBase);
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  Set<TravelingTournamentProblem.Neighborhood> neighborhoodSet : neighborhoodsPowerSet) {
    if (neighborhoodSet.size() == 0)     continue;
    List<TravelingTournamentProblem.Neighborhood> currentNeighborhoods=new ArrayList<TravelingTournamentProblem.Neighborhood>(neighborhoodSet);
    String neighborhoodNames="String_Node_Str";
    for (    TravelingTournamentProblem.Neighborhood currentNeighborhood : currentNeighborhoods)     neighborhoodNames+="String_Node_Str" + currentNeighborhood;
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + neighborhoodNames);
    neighborhoodNames=neighborhoodNames.replaceAll("String_Node_Str","String_Node_Str");
    TTPParameters current=new TTPParameters(baseline);
    current.setNeighborhoods(currentNeighborhoods);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + neighborhoodNames,result);
    writeResultAvg(avgFile,"String_Node_Str" + neighborhoodNames,result);
  }
  return 0;
}

Fixed version (ground truth):
private int run() throws Exception {
  List<TravelingTournamentProblem.Neighborhood> neighborhoods=new ArrayList<TravelingTournamentProblem.Neighborhood>();
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.TWO_OPT_SWAP_ROUNDS);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.TWO_OPT_SWAP_TEAMS);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SWAP_HOME_VISITOR);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SHIFT_ROUND);
  neighborhoods.add(TravelingTournamentProblem.Neighborhood.SWAP_MATCH_ROUND);
  File baselineOutDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  TTPParameters baseline=new TTPParameters(method,neighborhoods,TravelingTournamentProblem.ConstructionHeuristic.GRASP,VirtualScheduleConstructionMethod.FIRSTPOLYGONTHENGREEK,50,10,250,10,instanceFile,baselineOutDir);
  TravelingTournamentProblem travelingTournamentProblem=new TravelingTournamentProblem();
  travelingTournamentProblem.run(baseline);
  boolean headerWritten=false;
  File sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  File avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  File intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (int i=0; i <= 200; i+=10) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
    TTPParameters current=new TTPParameters(baseline);
    current.setTabuListLength(i);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + i,result);
    writeResultAvg(avgFile,"String_Node_Str" + i,result);
  }
  if (method == TravelingTournamentProblem.Method.GRASP) {
    headerWritten=false;
    sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
    for (int i=0; i <= 100; i+=10) {
      File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
      TTPParameters current=new TTPParameters(baseline);
      current.setGraspTries(Math.max(i,1));
      current.setThreadCount(Math.max(i,1));
      current.setOutputDirectory(subOutDir);
      TTPResult result=travelingTournamentProblem.run(current);
      if (!headerWritten) {
        writeResultHeader(sumFile,"String_Node_Str",result);
        writeResultHeader(avgFile,"String_Node_Str",result);
        headerWritten=true;
      }
      writeResultSum(sumFile,"String_Node_Str" + i,result);
      writeResultAvg(avgFile,"String_Node_Str" + i,result);
    }
  }
  System.exit(0);
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (int i=0; i <= 500; i+=50) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + i);
    TTPParameters current=new TTPParameters(baseline);
    current.setIterationsWithoutImprovement(i);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + i,result);
    writeResultAvg(avgFile,"String_Node_Str" + i,result);
  }
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  TravelingTournamentProblem.ConstructionHeuristic constructionHeuristic : TravelingTournamentProblem.ConstructionHeuristic.values()) {
    if (constructionHeuristic == TravelingTournamentProblem.ConstructionHeuristic.GRASP)     continue;
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + constructionHeuristic);
    TTPParameters current=new TTPParameters(baseline);
    current.setConstructionHeuristic(constructionHeuristic);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + constructionHeuristic,result);
    writeResultAvg(avgFile,"String_Node_Str" + constructionHeuristic,result);
  }
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  VirtualScheduleConstructionMethod virtualScheduleConstructionMethod : VirtualScheduleConstructionMethod.values()) {
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + virtualScheduleConstructionMethod);
    TTPParameters current=new TTPParameters(baseline);
    current.setVirtualScheduleConstructionMethod(virtualScheduleConstructionMethod);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + virtualScheduleConstructionMethod,result);
    writeResultAvg(avgFile,"String_Node_Str" + virtualScheduleConstructionMethod,result);
  }
  Set<TravelingTournamentProblem.Neighborhood> neighborhoodsBase=new HashSet<TravelingTournamentProblem.Neighborhood>(neighborhoods);
  Set<Set<TravelingTournamentProblem.Neighborhood>> neighborhoodsPowerSet=powerSet(neighborhoodsBase);
  headerWritten=false;
  sumFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  avgFile=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  intermediateDir=new File(outputDirectory,instanceFile.getName() + "String_Node_Str");
  for (  Set<TravelingTournamentProblem.Neighborhood> neighborhoodSet : neighborhoodsPowerSet) {
    if (neighborhoodSet.size() == 0)     continue;
    List<TravelingTournamentProblem.Neighborhood> currentNeighborhoods=new ArrayList<TravelingTournamentProblem.Neighborhood>(neighborhoodSet);
    String neighborhoodNames="String_Node_Str";
    for (    TravelingTournamentProblem.Neighborhood currentNeighborhood : currentNeighborhoods)     neighborhoodNames+="String_Node_Str" + currentNeighborhood;
    File subOutDir=new File(intermediateDir,instanceFile.getName() + "String_Node_Str" + neighborhoodNames);
    neighborhoodNames=neighborhoodNames.replaceAll("String_Node_Str","String_Node_Str");
    TTPParameters current=new TTPParameters(baseline);
    current.setNeighborhoods(currentNeighborhoods);
    current.setOutputDirectory(subOutDir);
    TTPResult result=travelingTournamentProblem.run(current);
    if (!headerWritten) {
      writeResultHeader(sumFile,"String_Node_Str",result);
      writeResultHeader(avgFile,"String_Node_Str",result);
      headerWritten=true;
    }
    writeResultSum(sumFile,"String_Node_Str" + neighborhoodNames,result);
    writeResultAvg(avgFile,"String_Node_Str" + neighborhoodNames,result);
  }
  return 0;
}