Program: 64531
Project: 64531
Buggy source:
/** 
 * Program to generate data representing the distribution of points generated by a polynomial mutation operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - 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 distributionIndex=Double.valueOf(args[2]);
  String outputFileName=args[3];
  DoubleProblem problem;
  problem=new Sphere(1);
  MutationOperator<DoubleSolution> mutation=new PolynomialMutation(1.0,distributionIndex);
  DoubleSolution solution=problem.createSolution();
  solution.setVariableValue(0,0.0);
  List<DoubleSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    DoubleSolution newSolution=(DoubleSolution)solution.copy();
    mutation.execute(newSolution);
    population.add(newSolution);
  }
  Collections.sort(population,new VariableComparator());
  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 polynomial mutation operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - 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 distributionIndex=Double.valueOf(args[2]);
  String outputFileName=args[3];
  DoubleProblem problem;
  problem=new Sphere(1);
  MutationOperator<DoubleSolution> mutation=new PolynomialMutation(1.0,distributionIndex);
  DoubleSolution solution=problem.createSolution();
  solution.setVariableValue(0,0.0);
  List<DoubleSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    DoubleSolution newSolution=(DoubleSolution)solution.copy();
    mutation.execute(newSolution);
    population.add(newSolution);
  }
  Collections.sort(population,new VariableComparator());
  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);
  }
}