Program: 39274
Project: 39274
Buggy source:
/** 
 * Actually returns both the hypervolume (as a Double) and the size of the Pareto front (the Integer)
 * @param dirPrefix Dir of the specific method
 * @param run The number of the run
 * @param filePrefix Prefix for all data files
 * @param fileMiddle Unique file name part
 * @param generation Which generation to read
 * @param fileExtension How to end file
 * @return pair with hypervolume and the size of the Pareto front
 */
public static Pair<Double,Integer> hypervolumeForGeneration(String dirPrefix,int run,String filePrefix,String fileMiddle,int generation,String fileExtension){
  Hypervolume qualityIndicator=new Hypervolume();
  String file=dirPrefix + run + "String_Node_Str"+ filePrefix+ run+ fileMiddle+ generation+ "String_Node_Str"+ fileExtension;
  double[][] fileData=qualityIndicator.utils_.readFront(file);
  double[][] solutions;
  double[][] step1=dropColumn(fileData,0);
  solutions=dropColumn(step1,0);
  Task task=MMNEAT.task;
  int numObjectives=task.numObjectives();
  while (solutions[0].length > numObjectives) {
    solutions=dropColumn(solutions,solutions[0].length - 1);
  }
  double[] mins=MMNEAT.task.minScores();
  for (int i=0; i < solutions.length; i++) {
    for (int j=0; j < solutions[0].length; j++) {
      solutions[i][j]-=mins[j];
    }
  }
  int noNondominatedPoints=qualityIndicator.filterNondominatedSet(solutions,solutions.length,solutions[0].length);
  double value=qualityIndicator.calculateHypervolume(solutions,solutions.length,solutions[0].length);
  return new Pair<Double,Integer>(value,noNondominatedPoints);
}

Fixed version (ground truth):
/** 
 * Actually returns both the hypervolume (as a Double) and the size of the Pareto front (the Integer)
 * @param dirPrefix Dir of the specific method
 * @param run The number of the run
 * @param filePrefix Prefix for all data files
 * @param fileMiddle Unique file name part
 * @param generation Which generation to read
 * @param fileExtension How to end file
 * @return pair with hypervolume and the size of the Pareto front
 */
public static Pair<Double,Integer> hypervolumeForGeneration(String dirPrefix,int run,String filePrefix,String fileMiddle,int generation,String fileExtension){
  Hypervolume qualityIndicator=new Hypervolume();
  String file=dirPrefix + run + "String_Node_Str"+ filePrefix+ run+ fileMiddle+ generation+ "String_Node_Str"+ fileExtension;
  double[][] fileData=qualityIndicator.utils_.readFront(file);
  double[][] solutions;
  double[][] step1=dropColumn(fileData,0);
  solutions=dropColumn(step1,0);
  Task task=MMNEAT.task;
  int numObjectives=-1;
  if (task instanceof LonerTask || task instanceof CooperativeMsPacManTask) {
    numObjectives=task.numObjectives();
  }
 else   if (task instanceof CooperativeTask) {
    numObjectives=((CooperativeTask)task).objectivesPerPopulation()[0];
  }
  while (solutions[0].length > numObjectives) {
    solutions=dropColumn(solutions,solutions[0].length - 1);
  }
  double[] mins=null;
  if (task instanceof LonerTask || task instanceof CooperativeMsPacManTask) {
    mins=MMNEAT.task.minScores();
  }
 else   if (task instanceof CooperativeTask) {
    mins=((CooperativeTask)task).minScores();
  }
  for (int i=0; i < solutions.length; i++) {
    for (int j=0; j < solutions[0].length; j++) {
      solutions[i][j]-=mins[j];
    }
  }
  int noNondominatedPoints=qualityIndicator.filterNondominatedSet(solutions,solutions.length,solutions[0].length);
  double value=qualityIndicator.calculateHypervolume(solutions,solutions.length,solutions[0].length);
  return new Pair<Double,Integer>(value,noNondominatedPoints);
}