Program: 64529
Project: 64529
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 {
  int numberOfPoints;
  int granularity;
  double distributionIndex;
  String outputFileName;
  if (args.length != 4) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    numberOfPoints=10000;
    granularity=100;
    distributionIndex=20.0;
    outputFileName="String_Node_Str";
  }
 else {
    numberOfPoints=Integer.valueOf(args[0]);
    granularity=Integer.valueOf(args[1]);
    distributionIndex=Double.valueOf(args[2]);
    outputFileName=args[3];
  }
  IntegerProblem problem;
  problem=new NIntegerMin(1,10,-1000,1000);
  MutationOperator<IntegerSolution> mutation=new IntegerPolynomialMutation(1.0,distributionIndex);
  IntegerSolution solution=problem.createSolution();
  solution.setVariableValue(0,0);
  List<IntegerSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    IntegerSolution newSolution=(IntegerSolution)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 {
  int numberOfPoints;
  int granularity;
  double distributionIndex;
  String outputFileName;
  if (args.length != 4) {
    JMetalLogger.logger.info("String_Node_Str");
    JMetalLogger.logger.info("String_Node_Str");
    numberOfPoints=10000;
    granularity=100;
    distributionIndex=20.0;
    outputFileName="String_Node_Str";
  }
 else {
    numberOfPoints=Integer.valueOf(args[0]);
    granularity=Integer.valueOf(args[1]);
    distributionIndex=Double.valueOf(args[2]);
    outputFileName=args[3];
  }
  IntegerProblem problem;
  problem=new NIntegerMin(1,10,-1000,1000);
  MutationOperator<IntegerSolution> mutation=new IntegerPolynomialMutation(1.0,distributionIndex);
  IntegerSolution solution=problem.createSolution();
  solution.setVariableValue(0,0);
  List<IntegerSolution> population=new ArrayList<>(numberOfPoints);
  for (int i=0; i < numberOfPoints; i++) {
    IntegerSolution newSolution=(IntegerSolution)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);
  }
}