Program: 64528
Project: 64528
Buggy source:
/** 
 * Program to generate data representing the distribution of points generated by a SBX crossover operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - alpha: alpha value - outputFile: file containing the results
 * @param args Command line arguments
 */
public static void main(String[] args) throws FileNotFoundException {
  if (args.length != 4) {
    throw new JMetalException("String_Node_Str");
  }
  int numberOfPoints=Integer.valueOf(args[0]);
  int granularity=Integer.valueOf(args[1]);
  double alpha=Double.valueOf(args[2]);
  String outputFileName=args[3];
  DoubleProblem problem;
  problem=new Kursawe(1);
  CrossoverOperator<DoubleSolution> crossover=new BLXAlphaCrossover(1.0,alpha);
  DoubleSolution solution1=problem.createSolution();
  DoubleSolution solution2=problem.createSolution();
  solution1.setVariableValue(0,-2.0);
  solution2.setVariableValue(0,2.0);
  List<DoubleSolution> parents=Arrays.asList(solution1,solution2);
  List<DoubleSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    List<DoubleSolution> solutions=(List<DoubleSolution>)crossover.execute(parents);
    population.add(solutions.get(0));
    population.add(solutions.get(1));
  }
  Collections.sort(population,new VariableComparator());
  new SolutionListOutput(population).setSeparator("String_Node_Str").setVarFileOutputContext(new DefaultFileOutputContext("String_Node_Str")).print();
  double[][] classifier=classify(population,problem,granularity);
  BufferedWriter bufferedWriter=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFileName)));
  try {
    for (int i=0; i < classifier.length; i++) {
      bufferedWriter.write(classifier[i][0] + "String_Node_Str" + classifier[i][1]);
      bufferedWriter.newLine();
    }
    bufferedWriter.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Program to generate data representing the distribution of points generated by a SBX crossover operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - alpha: alpha value - outputFile: file containing the results
 * @param args Command line arguments
 */
public static void main(String[] args) throws FileNotFoundException {
  if (args.length != 4) {
    throw new JMetalException("String_Node_Str");
  }
  int numberOfPoints=Integer.valueOf(args[0]);
  int granularity=Integer.valueOf(args[1]);
  double alpha=Double.valueOf(args[2]);
  String outputFileName=args[3];
  DoubleProblem problem;
  problem=new Kursawe(1);
  CrossoverOperator<DoubleSolution> crossover=new BLXAlphaCrossover(1.0,alpha);
  DoubleSolution solution1=problem.createSolution();
  DoubleSolution solution2=problem.createSolution();
  solution1.setVariableValue(0,-2.0);
  solution2.setVariableValue(0,2.0);
  List<DoubleSolution> parents=Arrays.asList(solution1,solution2);
  List<DoubleSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    List<DoubleSolution> solutions=(List<DoubleSolution>)crossover.execute(parents);
    population.add(solutions.get(0));
    population.add(solutions.get(1));
  }
  Collections.sort(population,new VariableComparator());
  new SolutionListOutput(population).setSeparator("String_Node_Str").setVarFileOutputContext(new DefaultFileOutputContext("String_Node_Str")).print();
  double[][] classifier=classify(population,problem,granularity);
  BufferedWriter bufferedWriter=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFileName)));
  try {
    for (int i=0; i < classifier.length; i++) {
      bufferedWriter.write(classifier[i][0] + "String_Node_Str" + classifier[i][1]);
      bufferedWriter.newLine();
    }
    bufferedWriter.close();
  }
 catch (  IOException e) {
    throw new JMetalException("String_Node_Str",e);
  }
}