nus-yam/ex-repair huggingface dataset:
Program: 64677
Project: 64677
Buggy source:
public void setCrowdingDistance(double crowdingDistance){
  this.crowdingDistance=crowdingDistance;
}

Fixed version (ground truth):
@Override public void setCrowdingDistance(double crowdingDistance){
  this.crowdingDistance=crowdingDistance;
}
Program: 64678
Project: 64678
Buggy source:
/** 
 * Constructor 
 */
public BinarySolutionImpl(BinaryProblem problem){
  this.problem=problem;
  objectives=new ArrayList<>(problem.getNumberOfVariables());
  variables=new ArrayList<>(problem.getNumberOfObjectives());
  for (int i=0; i < problem.getNumberOfVariables(); i++) {
    variables.add(createNewBitSet(problem.getNumberOfBits(i)));
  }
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public BinarySolutionImpl(BinaryProblem problem){
  this.problem=problem;
  objectives=new ArrayList<>(problem.getNumberOfObjectives());
  variables=new ArrayList<>(problem.getNumberOfVariables());
  for (int i=0; i < problem.getNumberOfVariables(); i++) {
    variables.add(createNewBitSet(problem.getNumberOfBits(i)));
  }
}
Program: 64679
Project: 64679
Buggy source:
/** 
 * Constructor 
 */
public Fonseca(){
  setNumberOfVariables(3);
  setNumberOfObjectives(2);
  setName("String_Node_Str");
  ArrayList<Double> lowerLimit=new ArrayList<>(getNumberOfVariables());
  ArrayList<Double> upperLimit=new ArrayList<>(getNumberOfVariables());
  for (int i=0; i < getNumberOfVariables(); i++) {
    lowerLimit.set(i,-4.0);
    upperLimit.set(i,4.0);
  }
  setLowerLimit(lowerLimit);
  setUpperLimit(upperLimit);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public Fonseca(){
  setNumberOfVariables(3);
  setNumberOfObjectives(2);
  setName("String_Node_Str");
  ArrayList<Double> lowerLimit=new ArrayList<>(getNumberOfVariables());
  ArrayList<Double> upperLimit=new ArrayList<>(getNumberOfVariables());
  for (int i=0; i < getNumberOfVariables(); i++) {
    lowerLimit.add(-4.0);
    upperLimit.add(4.0);
  }
  setLowerLimit(lowerLimit);
  setUpperLimit(upperLimit);
}
Program: 64680
Project: 64680
Buggy source:
/** 
 * Evaluate() method 
 */
public void evaluate(Solution solution){
  int numberOfVariables=getNumberOfVariables();
  double[] f=new double[getNumberOfObjectives()];
  double[] x=new double[numberOfVariables];
  for (int i=0; i < numberOfVariables; i++) {
    x[i]=(double)solution.getVariableValue(i);
  }
  double sum1=0.0;
  for (int i=0; i < numberOfVariables; i++) {
    sum1+=StrictMath.pow(x[i] - (1.0 / StrictMath.sqrt((double)numberOfVariables)),2.0);
  }
  double exp1=StrictMath.exp((-1.0) * sum1);
  f[0]=1 - exp1;
  double sum2=0.0;
  for (int i=0; i < numberOfVariables; i++) {
    sum2+=StrictMath.pow(x[i] + (1.0 / StrictMath.sqrt((double)numberOfVariables)),2.0);
  }
  double exp2=StrictMath.exp((-1.0) * sum2);
  f[1]=1 - exp2;
  solution.setObjective(0,f[0]);
  solution.setObjective(1,f[1]);
}

Fixed version (ground truth):
/** 
 * Evaluate() method 
 */
@Override public void evaluate(Solution solution){
  int numberOfVariables=getNumberOfVariables();
  double[] f=new double[getNumberOfObjectives()];
  double[] x=new double[numberOfVariables];
  for (int i=0; i < numberOfVariables; i++) {
    x[i]=(double)solution.getVariableValue(i);
  }
  double sum1=0.0;
  for (int i=0; i < numberOfVariables; i++) {
    sum1+=StrictMath.pow(x[i] - (1.0 / StrictMath.sqrt((double)numberOfVariables)),2.0);
  }
  double exp1=StrictMath.exp((-1.0) * sum1);
  f[0]=1 - exp1;
  double sum2=0.0;
  for (int i=0; i < numberOfVariables; i++) {
    sum2+=StrictMath.pow(x[i] + (1.0 / StrictMath.sqrt((double)numberOfVariables)),2.0);
  }
  double exp2=StrictMath.exp((-1.0) * sum2);
  f[1]=1 - exp2;
  solution.setObjective(0,f[0]);
  solution.setObjective(1,f[1]);
}
Program: 64681
Project: 64681
Buggy source:
@Override public Double getUpperBound(int index){
  return 0.0;
}

Fixed version (ground truth):
@Override public Number getUpperBound(int index){
  return 0.0;
}
Program: 64682
Project: 64682
Buggy source:
public AsyncMOCell1(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public AsyncMOCell1(Builder builder){
  super(builder);
}
Program: 64684
Project: 64684
Buggy source:
/** 
 * Constructor
 */
public AsyncMOCell2(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public AsyncMOCell2(Builder builder){
  super(builder);
}
Program: 64686
Project: 64686
Buggy source:
public AsyncMOCell3(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public AsyncMOCell3(Builder builder){
  super(builder);
}
Program: 64688
Project: 64688
Buggy source:
public AsyncMOCell4(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public AsyncMOCell4(Builder builder){
  super(builder);
}
Program: 64690
Project: 64690
Buggy source:
public Builder(Problem problem){
  this.problem=problem;
  dominanceComparator=new DominanceComparator();
  densityEstimatorComparator=new CrowdingComparator();
  archiveSize=100;
  archive=new CrowdingArchive(archiveSize,problem.getNumberOfObjectives());
}

Fixed version (ground truth):
/** 
 * Builder class 
 */
public Builder(Problem problem){
  this.problem=problem;
  dominanceComparator=new DominanceComparator();
  densityEstimatorComparator=new CrowdingComparator();
  archiveSize=DEFAULT_ARCHIVE_SIZE;
  numberOfFeedbackSolutionsFromArchive=0;
}
Program: 64691
Project: 64691
Buggy source:
public SyncMOCell1(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public SyncMOCell1(Builder builder){
  super(builder);
}
Program: 64693
Project: 64693
Buggy source:
/** 
 * Constructor
 */
public SyncMOCell2(Builder builder){
  super(builder);
}

Fixed version (ground truth):
/** 
 * Constructor 
 */
public SyncMOCell2(Builder builder){
  super(builder);
}
Program: 64695
Project: 64695
Buggy source:
/** 
 * Returns the epsilon indicator.
 * @param a Solution front
 * @param b True Pareto front
 * @return the value of the epsilon indicator
 * @throws org.uma.jmetal.util.JMetalException
 */
public double epsilon(double[][] a,double[][] b) throws JMetalException {
  int i, j, k;
  double eps, epsJ=0.0, epsK=0.0, epsTemp;
  this.numberOfObjectives=a[0].length;
  setParams();
  if (method == 0) {
    eps=Double.MIN_VALUE;
  }
 else {
    eps=0;
  }
  for (i=0; i < a.length; i++) {
    for (j=0; j < b.length; j++) {
      for (k=0; k < this.numberOfObjectives; k++) {
switch (method) {
case 0:
          if (obj[k] == 0) {
            epsTemp=b[j][k] - a[i][k];
          }
 else {
            epsTemp=a[i][k] - b[j][k];
          }
        break;
default :
      if ((a[i][k] < 0 && b[j][k] > 0) || (a[i][k] > 0 && b[j][k] < 0) || (a[i][k] == 0 || b[j][k] == 0)) {
        throw new JMetalException("String_Node_Str");
      }
    if (obj[k] == 0) {
      epsTemp=b[j][k] / a[i][k];
    }
 else {
      epsTemp=a[i][k] / b[j][k];
    }
  break;
}
if (k == 0) {
epsK=epsTemp;
}
 else if (epsK < epsTemp) {
epsK=epsTemp;
}
}
if (j == 0) {
epsJ=epsK;
}
 else if (epsJ > epsK) {
epsJ=epsK;
}
}
if (i == 0) {
eps=epsJ;
}
 else if (eps < epsJ) {
eps=epsJ;
}
}
return eps;
}

Fixed version (ground truth):
/** 
 * Returns the epsilon indicator.
 * @param front Solution front
 * @param referenceFront True Pareto front
 * @return the value of the epsilon indicator
 * @throws org.uma.jmetal.util.JMetalException
 */
public double epsilon(double[][] front,double[][] referenceFront) throws JMetalException {
  int i, j, k;
  double eps, epsJ=0.0, epsK=0.0, epsTemp;
  this.numberOfObjectives=front[0].length;
  setParams();
  if (method == 0) {
    eps=Double.MIN_VALUE;
  }
 else {
    eps=0;
  }
  for (i=0; i < referenceFront.length; i++) {
    for (j=0; j < front.length; j++) {
      for (k=0; k < this.numberOfObjectives; k++) {
switch (method) {
case 0:
          if (obj[k] == 0) {
            epsTemp=front[j][k] - referenceFront[i][k];
          }
 else {
            epsTemp=referenceFront[i][k] - front[j][k];
          }
        break;
default :
      if ((referenceFront[i][k] < 0 && front[j][k] > 0) || (referenceFront[i][k] > 0 && front[j][k] < 0) || (referenceFront[i][k] == 0 || front[j][k] == 0)) {
        throw new JMetalException("String_Node_Str");
      }
    if (obj[k] == 0) {
      epsTemp=front[j][k] / referenceFront[i][k];
    }
 else {
      epsTemp=referenceFront[i][k] / front[j][k];
    }
  break;
}
if (k == 0) {
epsK=epsTemp;
}
 else if (epsK < epsTemp) {
epsK=epsTemp;
}
}
if (j == 0) {
epsJ=epsK;
}
 else if (epsJ > epsK) {
epsJ=epsK;
}
}
if (i == 0) {
eps=epsJ;
}
 else if (eps < epsJ) {
eps=epsJ;
}
}
return eps;
}
Program: 64698
Project: 64698
Buggy source:
protected void evaluatePopulation(SolutionSet population) throws JMetalException {
  evaluator_.evaluate(population,problem_);
}

Fixed version (ground truth):
protected SolutionSet evaluatePopulation(SolutionSet population) throws JMetalException {
  return evaluator_.evaluate(population,problem_);
}
Program: 64699
Project: 64699
Buggy source:
/** 
 * Runs the ssNSGA-II algorithm.
 * @return a <code>SolutionSet</code> that is a set of non dominated solutionsas a result of the algorithm execution
 * @throws org.uma.jmetal.util.JMetalException
 */
public SolutionSet execute() throws JMetalException, ClassNotFoundException {
  createInitialPopulation();
  evaluatePopulation(population_);
  while (!stoppingCondition()) {
    offspringPopulation_=new SolutionSet(1);
    Solution[] parents=new Solution[2];
    parents[0]=(Solution)selectionOperator_.execute(population_);
    parents[1]=(Solution)selectionOperator_.execute(population_);
    Solution[] offSpring=(Solution[])crossoverOperator_.execute(parents);
    mutationOperator_.execute(offSpring[0]);
    problem_.evaluate(offSpring[0]);
    problem_.evaluateConstraints(offSpring[0]);
    offspringPopulation_.add(offSpring[0]);
    evaluations_++;
    Ranking ranking=new Ranking(population_.union(offspringPopulation_));
    population_.clear();
    int rankingIndex=0;
    while (populationIsNotFull()) {
      if (subfrontFillsIntoThePopulation(ranking,rankingIndex)) {
        addRankedSolutionsToPopulation(ranking,rankingIndex);
        rankingIndex++;
      }
 else {
        computeCrowdingDistance(ranking,rankingIndex);
        addLastRankedSolutions(ranking,rankingIndex);
      }
    }
  }
  tearDown();
  return getNonDominatedSolutions();
}

Fixed version (ground truth):
/** 
 * Runs the ssNSGA-II algorithm.
 * @return a <code>SolutionSet</code> that is a set of non dominated solutionsas a result of the algorithm execution
 * @throws org.uma.jmetal.util.JMetalException
 */
public SolutionSet execute() throws JMetalException, ClassNotFoundException {
  createInitialPopulation();
  population_=evaluatePopulation(population_);
  while (!stoppingCondition()) {
    offspringPopulation_=new SolutionSet(1);
    Solution[] parents=new Solution[2];
    parents[0]=(Solution)selectionOperator_.execute(population_);
    parents[1]=(Solution)selectionOperator_.execute(population_);
    Solution[] offSpring=(Solution[])crossoverOperator_.execute(parents);
    mutationOperator_.execute(offSpring[0]);
    problem_.evaluate(offSpring[0]);
    problem_.evaluateConstraints(offSpring[0]);
    offspringPopulation_.add(offSpring[0]);
    evaluations_++;
    Ranking ranking=new Ranking(population_.union(offspringPopulation_));
    population_.clear();
    int rankingIndex=0;
    while (populationIsNotFull()) {
      if (subfrontFillsIntoThePopulation(ranking,rankingIndex)) {
        addRankedSolutionsToPopulation(ranking,rankingIndex);
        rankingIndex++;
      }
 else {
        computeCrowdingDistance(ranking,rankingIndex);
        addLastRankedSolutions(ranking,rankingIndex);
      }
    }
  }
  tearDown();
  return getNonDominatedSolutions();
}
Program: 64700
Project: 64700
Buggy source:
/** 
 * Constructor
 * @throws org.uma.jmetal.util.JMetalException
 */
public NSGAIISettings(String problem) throws JMetalException {
  super(problem);
  Object[] problemParams={"String_Node_Str"};
  problem_=(new ProblemFactory()).getProblem(problemName_,problemParams);
  populationSize_=100;
  maxEvaluations_=25000;
  mutationProbability_=1.0 / problem_.getNumberOfVariables();
  crossoverProbability_=0.9;
  mutationDistributionIndex_=20.0;
  crossoverDistributionIndex_=20.0;
  evaluator_=new SequentialSolutionSetEvaluator();
}

Fixed version (ground truth):
/** 
 * Constructor
 * @throws org.uma.jmetal.util.JMetalException
 */
public NSGAIISettings(String problem) throws JMetalException {
  super(problem);
  Object[] problemParams={"String_Node_Str"};
  problem_=(new ProblemFactory()).getProblem(problemName_,problemParams);
  populationSize_=100;
  maxEvaluations=25000;
  mutationProbability=1.0 / problem_.getNumberOfVariables();
  crossoverProbability=0.9;
  mutationDistributionIndex=20.0;
  crossoverDistributionIndex=20.0;
  evaluator=new SequentialSolutionSetEvaluator();
}
Program: 64701
Project: 64701
Buggy source:
/** 
 * Configure NSGAII with user-defined parameter experiment.settings
 * @return A NSGAII algorithm object
 */
@Override public Algorithm configure(Properties configuration) throws JMetalException {
  populationSize_=Integer.parseInt(configuration.getProperty("String_Node_Str",String.valueOf(populationSize_)));
  maxEvaluations_=Integer.parseInt(configuration.getProperty("String_Node_Str",String.valueOf(maxEvaluations_)));
  crossoverProbability_=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(crossoverProbability_)));
  crossoverDistributionIndex_=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(crossoverDistributionIndex_)));
  mutationProbability_=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(mutationProbability_)));
  mutationDistributionIndex_=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(mutationDistributionIndex_)));
  return configure();
}

Fixed version (ground truth):
/** 
 * Configure NSGAII with user-defined parameter experiment.settings
 * @return A NSGAII algorithm object
 */
@Override public Algorithm configure(Properties configuration) throws JMetalException {
  populationSize_=Integer.parseInt(configuration.getProperty("String_Node_Str",String.valueOf(populationSize_)));
  maxEvaluations=Integer.parseInt(configuration.getProperty("String_Node_Str",String.valueOf(maxEvaluations)));
  crossoverProbability=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(crossoverProbability)));
  crossoverDistributionIndex=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(crossoverDistributionIndex)));
  mutationProbability=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(mutationProbability)));
  mutationDistributionIndex=Double.parseDouble(configuration.getProperty("String_Node_Str",String.valueOf(mutationDistributionIndex)));
  return configure();
}
Program: 64703
Project: 64703
Buggy source:
protected boolean stoppingCondition(){
  return evaluations_ == maxEvaluations_;
}

Fixed version (ground truth):
protected boolean stoppingCondition(){
  return evaluations_ >= maxEvaluations_;
}
Program: 64704
Project: 64704
Buggy source:
protected void evaluatePopulation(SolutionSet population) throws JMetalException {
  evaluator_.evaluate(population,problem_);
}

Fixed version (ground truth):
protected SolutionSet evaluatePopulation(SolutionSet population) throws JMetalException {
  return evaluator_.evaluate(population,problem_);
}
Program: 64706
Project: 64706
Buggy source:
protected void evaluateSwarm() throws JMetalException {
  evaluator_.evaluate(swarm_,problem_);
}

Fixed version (ground truth):
protected void evaluateSwarm() throws JMetalException {
  swarm_=evaluator_.evaluate(swarm_,problem_);
}
Program: 64707
Project: 64707
Buggy source:
/** 
 * Constructor
 * @param problem Problem to solve
 */
public SMPSO(String trueParetoFront) throws FileNotFoundException {
  super();
  hy_=new Hypervolume();
  jmetal.qualityIndicator.util.MetricsUtil mu=new jmetal.qualityIndicator.util.MetricsUtil();
  trueFront_=mu.readNonDominatedSolutionSet(trueParetoFront);
  trueHypervolume_=hy_.hypervolume(trueFront_.writeObjectivesToMatrix(),trueFront_.writeObjectivesToMatrix(),problem_.getNumberOfObjectives());
  r1Max_=1.0;
  r1Min_=0.0;
  r2Max_=1.0;
  r2Min_=0.0;
  c1Max_=2.5;
  c1Min_=1.5;
  c2Max_=2.5;
  c2Min_=1.5;
  weightMax_=0.1;
  weightMin_=0.1;
  changeVelocity1_=-1;
  changeVelocity2_=-1;
}

Fixed version (ground truth):
/** 
 * Constructor
 */
public SMPSO(String trueParetoFront) throws FileNotFoundException {
  super();
  hy_=new Hypervolume();
  jmetal.qualityIndicator.util.MetricsUtil mu=new jmetal.qualityIndicator.util.MetricsUtil();
  trueFront_=mu.readNonDominatedSolutionSet(trueParetoFront);
  trueHypervolume_=hy_.hypervolume(trueFront_.writeObjectivesToMatrix(),trueFront_.writeObjectivesToMatrix(),problem_.getNumberOfObjectives());
  r1Max_=1.0;
  r1Min_=0.0;
  r2Max_=1.0;
  r2Min_=0.0;
  c1Max_=2.5;
  c1Min_=1.5;
  c2Max_=2.5;
  c2Min_=1.5;
  weightMax_=0.1;
  weightMin_=0.1;
  changeVelocity1_=-1;
  changeVelocity2_=-1;
}
Program: 64708
Project: 64708
Buggy source:
public Mutation(HashMap<String,Object> parameters){
  super(parameters);
}

Fixed version (ground truth):
public Mutation(){
  super();
}
Program: 64709
Project: 64709
Buggy source:
private PolynomialMutation(Builder builder){
  super(new HashMap<String,Object>());
  mutationProbability_=builder.mutationProbability_;
  distributionIndex_=builder.distributionIndex_;
}

Fixed version (ground truth):
private PolynomialMutation(Builder builder){
  addValidSolutionType(RealSolutionType.class);
  addValidSolutionType(ArrayRealSolutionType.class);
  mutationProbability_=builder.mutationProbability_;
  distributionIndex_=builder.distributionIndex_;
}
Program: 64710
Project: 64710
Buggy source:
/** 
 * Executes the operation
 * @param object An object containing a solution
 * @return An object containing the mutated solution
 * @throws JMException
 */
public Object execute(Object object) throws JMException {
  Solution solution=(Solution)object;
  if (!VALID_TYPES.contains(solution.getType().getClass())) {
    Configuration.logger_.severe("String_Node_Str" + "String_Node_Str" + solution.getType() + "String_Node_Str");
    Class cls=java.lang.String.class;
    String name=cls.getName();
    throw new JMException("String_Node_Str" + name + "String_Node_Str");
  }
  doMutation(mutationProbability_,solution);
  return solution;
}

Fixed version (ground truth):
/** 
 * Executes the operation
 * @param object An object containing a solution
 * @return An object containing the mutated solution
 * @throws JMException
 */
public Object execute(Object object) throws JMException {
  Solution solution=(Solution)object;
  if (!solutionTypeIsValid(solution)) {
    Configuration.logger_.severe("String_Node_Str" + "String_Node_Str" + solution.getType() + "String_Node_Str");
    Class cls=java.lang.String.class;
    String name=cls.getName();
    throw new JMException("String_Node_Str" + name + "String_Node_Str");
  }
  doMutation(mutationProbability_,solution);
  return solution;
}
Program: 64711
Project: 64711
Buggy source:
public RStudy(){
  experimentName_="String_Node_Str";
  independentRuns_=30;
  algorithmNameList_=new String[]{"String_Node_Str","String_Node_Str"};
  problemList_=new String[]{"String_Node_Str"};
  paretoFrontFileList_=new String[]{"String_Node_Str"};
  indicatorList_=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  experimentBaseDirectory_="String_Node_Str";
  paretoFrontDirectory_="String_Node_Str";
  numberOfExecutionThreads_=6;
  generateReferenceParetoFronts_=false;
  runTheAlgorithms_=false;
  generateBoxplots_=false;
  boxplotRows_=2;
  boxplotColumns_=2;
  boxplotNotch_=true;
  generateFriedmanTables_=false;
  generateLatexTables_=false;
  generateWilcoxonTables_=false;
  generateSetCoverageTables_=true;
  generateQualityIndicators_=false;
}

Fixed version (ground truth):
public RStudy(){
  experimentName_="String_Node_Str";
  independentRuns_=30;
  algorithmNameList_=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  problemList_=new String[]{"String_Node_Str"};
  paretoFrontFileList_=new String[]{"String_Node_Str"};
  indicatorList_=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  experimentBaseDirectory_="String_Node_Str";
  paretoFrontDirectory_="String_Node_Str";
  numberOfExecutionThreads_=6;
  generateReferenceParetoFronts_=false;
  runTheAlgorithms_=false;
  generateBoxplots_=false;
  boxplotRows_=2;
  boxplotColumns_=2;
  boxplotNotch_=true;
  generateFriedmanTables_=false;
  generateLatexTables_=false;
  generateWilcoxonTables_=false;
  generateSetCoverageTables_=true;
  generateQualityIndicators_=false;
}
Program: 64712
Project: 64712
Buggy source:
private void writeTableHeader(String problem) throws IOException {
  fileWriter_.write("String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str" + problem + "String_Node_Str"+ "String_Node_Str");
  fileWriter_.write("String_Node_Str" + problem + "String_Node_Str"+ "String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str");
  for (int i=0; i < experiment_.getProblemList().length; i++) {
    fileWriter_.write("String_Node_Str");
  }
  fileWriter_.write("String_Node_Str");
  for (int i=-1; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i == -1) {
      fileWriter_.write("String_Node_Str");
    }
 else     if (i == (experiment_.getAlgorithmNameList().length - 1)) {
      fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[i] + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[i] + "String_Node_Str");
    }
  }
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
private void writeTableHeader(String problem) throws IOException {
  fileWriter_.write("String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str" + problem + "String_Node_Str"+ "String_Node_Str");
  fileWriter_.write("String_Node_Str" + problem + "String_Node_Str"+ "String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
  fileWriter_.write("String_Node_Str");
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    fileWriter_.write("String_Node_Str");
  }
  fileWriter_.write("String_Node_Str");
  for (int i=-1; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i == -1) {
      fileWriter_.write("String_Node_Str");
    }
 else     if (i == (experiment_.getAlgorithmNameList().length - 1)) {
      fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[i] + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[i] + "String_Node_Str");
    }
  }
  fileWriter_.write("String_Node_Str" + "String_Node_Str");
}
Program: 64713
Project: 64713
Buggy source:
private void writeTableRow(int algorithmIndex,String problem) throws IOException {
  fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[algorithmIndex] + "String_Node_Str");
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i != algorithmIndex) {
      double setCoverageValueAB=calculateSetCoverage(problem,experiment_.getAlgorithmNameList()[algorithmIndex],experiment_.getAlgorithmNameList()[i]);
      double setCoverageValueBA=calculateSetCoverage(problem,experiment_.getAlgorithmNameList()[i],experiment_.getAlgorithmNameList()[algorithmIndex]);
      String setCoverageAB=String.format(Locale.ENGLISH,"String_Node_Str",setCoverageValueAB);
      fileWriter_.write("String_Node_Str" + setCoverageAB + "String_Node_Str");
    }
 else     fileWriter_.write("String_Node_Str" + "String_Node_Str");
  }
  fileWriter_.write("String_Node_Str");
}

Fixed version (ground truth):
private void writeTableRow(int algorithmIndex,String problem) throws IOException {
  fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[algorithmIndex] + "String_Node_Str");
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i != algorithmIndex) {
      double setCoverageValueAB=calculateSetCoverage(problem,experiment_.getAlgorithmNameList()[algorithmIndex],experiment_.getAlgorithmNameList()[i]);
      String setCoverageAB=String.format(Locale.ENGLISH,"String_Node_Str",setCoverageValueAB);
      fileWriter_.write("String_Node_Str" + setCoverageAB);
    }
 else     fileWriter_.write("String_Node_Str");
    if (i < (experiment_.getAlgorithmNameList().length - 1)) {
      fileWriter_.write("String_Node_Str");
    }
  }
  fileWriter_.write("String_Node_Str");
}
Program: 64714
Project: 64714
Buggy source:
private double calculateSetCoverage(String problem,String algorithmA,String algorithmB){
  double result=5.5;
  SetCoverage setCoverageMetric=new SetCoverage();
  Vector<Double> values=new Vector<Double>(experiment_.getIndependentRuns());
  for (int i=0; i < experiment_.getIndependentRuns(); i++) {
    String front1=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmA+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    String front2=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmB+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    result=setCoverageMetric.setCoverage(front1,front2);
    values.add(i,result);
  }
  return result;
}

Fixed version (ground truth):
private double calculateSetCoverage(String problem,String algorithmA,String algorithmB){
  double result=5.5;
  SetCoverage setCoverageMetric=new SetCoverage();
  Vector<Double> values=new Vector<Double>(experiment_.getIndependentRuns());
  for (int i=0; i < experiment_.getIndependentRuns(); i++) {
    String front1=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmA+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    String front2=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmB+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    result=setCoverageMetric.setCoverage(front1,front2);
    values.add(i,result);
  }
  return Statistics.calculateMean(values);
}
Program: 64715
Project: 64715
Buggy source:
/** 
 * Constructor Create a new ElitistES instance.
 * @param problem Problem to solve.
 * @mu Mu
 * @lambda Lambda
 */
public ElitistES(Problem problem,int mu,int lambda){
  super(problem);
  mu_=mu;
  lambda_=lambda;
}

Fixed version (ground truth):
/** 
 * Constructor Create a new ElitistES instance.
 * @param problem Problem to solve.
 * @param mu
 * @param lambda
 */
public ElitistES(Problem problem,int mu,int lambda){
  super(problem);
  mu_=mu;
  lambda_=lambda;
}
Program: 64716
Project: 64716
Buggy source:
/** 
 * Constructor Create a new NonElitistES instance.
 * @param problem Problem to solve.
 * @mu Mu
 * @lambda Lambda
 */
public NonElitistES(Problem problem,int mu,int lambda){
  super(problem);
  mu_=mu;
  lambda_=lambda;
}

Fixed version (ground truth):
/** 
 * Constructor Create a new NonElitistES instance.
 * @param problem Problem to solve.
 * @param mu
 * @param lambda
 */
public NonElitistES(Problem problem,int mu,int lambda){
  super(problem);
  mu_=mu;
  lambda_=lambda;
}
Program: 64718
Project: 64718
Buggy source:
/** 
 * @param name: the name of the file
 * @author Juan J. DurilloCreates a new ReadInstance for the mQAP problem
 */
public ReadInstance(String name){
  fileName_=name;
}

Fixed version (ground truth):
/** 
 * @param name the name of the file
 * @author Juan J. DurilloCreates a new ReadInstance for the mQAP problem
 */
public ReadInstance(String name){
  fileName_=name;
}
Program: 64719
Project: 64719
Buggy source:
/** 
 * Creates a new instance of problem mQAP.
 * @param fileName: name of the file containing the instance
 */
public mQAP(String solutionType,String fileName) throws JMException {
  ReadInstance ri=new ReadInstance(fileName);
  ri.loadInstance();
  numberOfVariables_=1;
  numberOfObjectives_=ri.getNumberOfObjectives();
  numberOfConstraints_=0;
  problemName_="String_Node_Str";
  a_matrix=ri.get_a_Matrix();
  b_matrixs=ri.get_b_Matrixs();
  upperLimit_=new double[numberOfVariables_];
  lowerLimit_=new double[numberOfVariables_];
  for (int var=0; var < numberOfVariables_; var++) {
    lowerLimit_[var]=0.0;
    upperLimit_[var]=ri.getNumberOfFacilities() - 1;
  }
  length_=new int[numberOfVariables_];
  for (int var=0; var < numberOfVariables_; var++) {
    length_[var]=ri.getNumberOfFacilities();
  }
  if (solutionType.compareTo("String_Node_Str") == 0) {
    solutionType_=new PermutationSolutionType(this);
  }
 else {
    throw new JMException("String_Node_Str" + solutionType + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance of problem mQAP.
 */
public mQAP(String solutionType,String fileName) throws JMException {
  ReadInstance ri=new ReadInstance(fileName);
  ri.loadInstance();
  numberOfVariables_=1;
  numberOfObjectives_=ri.getNumberOfObjectives();
  numberOfConstraints_=0;
  problemName_="String_Node_Str";
  a_matrix=ri.get_a_Matrix();
  b_matrixs=ri.get_b_Matrixs();
  upperLimit_=new double[numberOfVariables_];
  lowerLimit_=new double[numberOfVariables_];
  for (int var=0; var < numberOfVariables_; var++) {
    lowerLimit_[var]=0.0;
    upperLimit_[var]=ri.getNumberOfFacilities() - 1;
  }
  length_=new int[numberOfVariables_];
  for (int var=0; var < numberOfVariables_; var++) {
    length_[var]=ri.getNumberOfFacilities();
  }
  if (solutionType.compareTo("String_Node_Str") == 0) {
    solutionType_=new PermutationSolutionType(this);
  }
 else {
    throw new JMException("String_Node_Str" + solutionType + "String_Node_Str");
  }
}
Program: 64720
Project: 64720
Buggy source:
public CEC2005Problem(String solutionType,int problemID,int numberOfVariables) throws JMException {
  numberOfVariables_=numberOfVariables;
  numberOfObjectives_=1;
  numberOfConstraints_=0;
  problemName_="String_Node_Str";
  Benchmark cec2005ProblemFactory=new Benchmark();
  testFunction_=cec2005ProblemFactory.testFunctionFactory(problemID,numberOfVariables);
  upperLimit_=new double[numberOfVariables_];
  lowerLimit_=new double[numberOfVariables_];
  double ulimit=0;
  double llimit=0;
switch (problemID) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 14:
    ulimit=100;
  llimit=-100;
break;
case 7:
case 25:
ulimit=Double.MAX_VALUE;
llimit=Double.MIN_VALUE;
break;
case 8:
ulimit=32;
llimit=-32;
break;
case 9:
case 10:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
ulimit=5;
llimit=-5;
break;
case 11:
ulimit=0.5;
llimit=-0.5;
break;
case 12:
ulimit=Math.PI;
llimit=-Math.PI;
break;
case 13:
ulimit=3;
llimit=1;
break;
default :
throw new JMException("String_Node_Str");
}
for (int var=0; var < numberOfVariables_; var++) {
lowerLimit_[var]=llimit;
upperLimit_[var]=ulimit;
}
if (solutionType.compareTo("String_Node_Str") == 0) {
solutionType_=new BinaryRealSolutionType(this);
}
 else if (solutionType.compareTo("String_Node_Str") == 0) {
solutionType_=new RealSolutionType(this);
}
 else {
throw new JMException("String_Node_Str" + solutionType + "String_Node_Str");
}
}

Fixed version (ground truth):
/** 
 * Constructor Creates a default instance of the Sphere problem
 * @param numberOfVariables Number of variables of the problem
 * @param solutionType The solution type must "Real" or "BinaryReal".
 */
public CEC2005Problem(String solutionType,int problemID,int numberOfVariables) throws JMException {
  numberOfVariables_=numberOfVariables;
  numberOfObjectives_=1;
  numberOfConstraints_=0;
  problemName_="String_Node_Str";
  Benchmark cec2005ProblemFactory=new Benchmark();
  testFunction_=cec2005ProblemFactory.testFunctionFactory(problemID,numberOfVariables);
  upperLimit_=new double[numberOfVariables_];
  lowerLimit_=new double[numberOfVariables_];
  double ulimit=0;
  double llimit=0;
switch (problemID) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 14:
    ulimit=100;
  llimit=-100;
break;
case 7:
case 25:
ulimit=Double.MAX_VALUE;
llimit=Double.MIN_VALUE;
break;
case 8:
ulimit=32;
llimit=-32;
break;
case 9:
case 10:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
ulimit=5;
llimit=-5;
break;
case 11:
ulimit=0.5;
llimit=-0.5;
break;
case 12:
ulimit=Math.PI;
llimit=-Math.PI;
break;
case 13:
ulimit=3;
llimit=1;
break;
default :
throw new JMException("String_Node_Str");
}
for (int var=0; var < numberOfVariables_; var++) {
lowerLimit_[var]=llimit;
upperLimit_[var]=ulimit;
}
if (solutionType.compareTo("String_Node_Str") == 0) {
solutionType_=new BinaryRealSolutionType(this);
}
 else if (solutionType.compareTo("String_Node_Str") == 0) {
solutionType_=new RealSolutionType(this);
}
 else {
throw new JMException("String_Node_Str" + solutionType + "String_Node_Str");
}
}
Program: 64721
Project: 64721
Buggy source:
/** 
 * Returns the R2 indicator of a given population, using as a reference point 0, 0. Normalization is using taking into account the population itself
 * @param set
 * @return
 */
public double r2(SolutionSet set){
  double[][] approximationFront=set.writeObjectivesToMatrix();
  double[][] trueFront=set.writeObjectivesToMatrix();
  return this.r2(approximationFront,trueFront);
}

Fixed version (ground truth):
/** 
 * Returns the R2 indicator of a given population, using as a reference point 0, 0. Normalization is using taking into account the population itself
 */
public double r2(SolutionSet set){
  double[][] approximationFront=set.writeObjectivesToMatrix();
  double[][] trueFront=set.writeObjectivesToMatrix();
  return this.r2(approximationFront,trueFront);
}
Program: 64722
Project: 64722
Buggy source:
/** 
 * Calculates the set coverage of the front stored in file1 over the front stored in file2
 * @param file1
 * @param file2
 * @return
 */
public double setCoverage(String file1,String file2){
  MetricsUtil utils=new MetricsUtil();
  double[][] front1=utils.readFront(file1);
  double[][] front2=utils.readFront(file2);
  SolutionSet solutionSet1=transformArraysToSolutionSet(front1);
  SolutionSet solutionSet2=transformArraysToSolutionSet(front2);
  return setCoverage(solutionSet1,solutionSet2);
}

Fixed version (ground truth):
/** 
 * Calculates the set coverage of the front stored in file1 over the front stored in file2
 * @param file1
 * @param file2
 * @return The value of the set coverage
 */
public double setCoverage(String file1,String file2){
  MetricsUtil utils=new MetricsUtil();
  double[][] front1=utils.readFront(file1);
  double[][] front2=utils.readFront(file2);
  SolutionSet solutionSet1=transformArraysToSolutionSet(front1);
  SolutionSet solutionSet2=transformArraysToSolutionSet(front2);
  return setCoverage(solutionSet1,solutionSet2);
}
Program: 64723
Project: 64723
Buggy source:
/** 
 * The compare method compare the objects o1 and o2.
 * @param o1 An object that reference a double[]
 * @param o2 An object that reference a double[]
 * @return -1 if o1 < o1, 1 if o1 > o2 or 0 in other case.
 */
public int compare(Object o1,Object o2){
  double[] pointOne=(double[])o1;
  double[] pointTwo=(double[])o2;
  int index=0;
  while ((index < pointOne.length) && (index < pointTwo.length) && pointOne[index] == pointTwo[index]) {
    index++;
  }
  if ((index >= pointOne.length) || (index >= pointTwo.length)) {
    return 0;
  }
 else   if (pointOne[index] < pointTwo[index]) {
    return -1;
  }
 else   if (pointOne[index] > pointTwo[index]) {
    return 1;
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * The compare method compare the objects o1 and o2.
 * @param o1 An object that reference a double[]
 * @param o2 An object that reference a double[]
 * @return The following value: -1 if o1 < o1, 1 if o1 > o2 or 0 in other case.
 */
public int compare(Object o1,Object o2){
  double[] pointOne=(double[])o1;
  double[] pointTwo=(double[])o2;
  int index=0;
  while ((index < pointOne.length) && (index < pointTwo.length) && pointOne[index] == pointTwo[index]) {
    index++;
  }
  if ((index >= pointOne.length) || (index >= pointTwo.length)) {
    return 0;
  }
 else   if (pointOne[index] < pointTwo[index]) {
    return -1;
  }
 else   if (pointOne[index] > pointTwo[index]) {
    return 1;
  }
  return 0;
}
Program: 64724
Project: 64724
Buggy source:
/** 
 * Reads a set of non dominated solutions from a file and store it in a existing non dominated solution set
 * @param path The path of the file containing the data
 * @return A solution set
 */
public void readNonDominatedSolutionSet(String path,NonDominatedSolutionList solutionSet){
  try {
    FileInputStream fis=new FileInputStream(path);
    InputStreamReader isr=new InputStreamReader(fis);
    BufferedReader br=new BufferedReader(isr);
    String aux=br.readLine();
    while (aux != null) {
      StringTokenizer st=new StringTokenizer(aux);
      int i=0;
      Solution solution=new Solution(st.countTokens());
      while (st.hasMoreTokens()) {
        double value=new Double(st.nextToken());
        solution.setObjective(i,value);
        i++;
      }
      solutionSet.add(solution);
      aux=br.readLine();
    }
    br.close();
  }
 catch (  Exception e) {
    Configuration.logger_.log(Level.SEVERE,"String_Node_Str" + path,e);
  }
}

Fixed version (ground truth):
/** 
 * Reads a set of non dominated solutions from a file and store it in a existing non dominated solution set
 */
public void readNonDominatedSolutionSet(String path,NonDominatedSolutionList solutionSet){
  try {
    FileInputStream fis=new FileInputStream(path);
    InputStreamReader isr=new InputStreamReader(fis);
    BufferedReader br=new BufferedReader(isr);
    String aux=br.readLine();
    while (aux != null) {
      StringTokenizer st=new StringTokenizer(aux);
      int i=0;
      Solution solution=new Solution(st.countTokens());
      while (st.hasMoreTokens()) {
        double value=new Double(st.nextToken());
        solution.setObjective(i,value);
        i++;
      }
      solutionSet.add(solution);
      aux=br.readLine();
    }
    br.close();
  }
 catch (  Exception e) {
    Configuration.logger_.log(Level.SEVERE,"String_Node_Str" + path,e);
  }
}
Program: 64725
Project: 64725
Buggy source:
/** 
 * @param name: the name of the file
 * @author Juan J. DurilloCreates a new instance
 * @throws IOException 
 */
public ExtractParetoFront(String name,int dimensions) throws IOException {
  fileName_=name;
  dimensions_=dimensions;
  loadInstance();
}

Fixed version (ground truth):
/** 
 * @param name the name of the file
 * @author Juan J. DurilloCreates a new instance
 * @throws IOException 
 */
public ExtractParetoFront(String name,int dimensions) throws IOException {
  fileName_=name;
  dimensions_=dimensions;
  loadInstance();
}
Program: 64726
Project: 64726
Buggy source:
/** 
 * Adds a <code>Solution</code> to the archive. If the <code>Solution</code> is dominated by any member of the archive then it is discarded. If the <code>Solution</code> dominates some members of the archive, these are removed. If the archive is full and the <code>Solution</code> has to be inserted, all the solutions are ordered by his strengthRawFitness value and the one having the worst value is removed.
 * @param solution The <code>Solution</code>
 * @return true if the <code>Solution</code> has been inserted, falseotherwise.
 */
public boolean add(Solution solution){
  int flag=0;
  int i=0;
  Solution aux;
  while (i < solutionsList_.size()) {
    aux=solutionsList_.get(i);
    flag=dominance_.compare(solution,aux);
    if (flag == 1) {
      return false;
    }
 else     if (flag == -1) {
      solutionsList_.remove(i);
    }
 else {
      if (equals_.compare(aux,solution) == 0) {
        return false;
      }
      i++;
    }
  }
  solutionsList_.add(solution);
  if (size() > maxSize_) {
    (new Spea2Fitness(this)).fitnessAssign();
    remove(indexWorst(fitnessComparator_));
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Adds a Solution to the archive. If the <code>Solution</code> is dominated by any member of the archive then it is discarded. If the <code>Solution</code> dominates some members of the archive, these are removed. If the archive is full and the <code>Solution</code> has to be inserted, all the solutions are ordered by his strengthRawFitness value and the one having the worst value is removed.
 * @param solution The <code>Solution</code>
 * @return true if the <code>Solution</code> has been inserted, falseotherwise.
 */
public boolean add(Solution solution){
  int flag=0;
  int i=0;
  Solution aux;
  while (i < solutionsList_.size()) {
    aux=solutionsList_.get(i);
    flag=dominance_.compare(solution,aux);
    if (flag == 1) {
      return false;
    }
 else     if (flag == -1) {
      solutionsList_.remove(i);
    }
 else {
      if (equals_.compare(aux,solution) == 0) {
        return false;
      }
      i++;
    }
  }
  solutionsList_.add(solution);
  if (size() > maxSize_) {
    (new Spea2Fitness(this)).fitnessAssign();
    remove(indexWorst(fitnessComparator_));
  }
  return true;
}
Program: 64727
Project: 64727
Buggy source:
/** 
 * Comparator
 * @param node1
 * @param node2
 * @return -1 if node1 < node2, +1 if node1 > node2; 0 if node1 == node2
 */
public int compareNodes(AvlNode<T> node1,AvlNode<T> node2){
  return comparator_.compare(node1.getItem(),node2.getItem());
}

Fixed version (ground truth):
/** 
 * Comparator
 * @param node1
 * @param node2
 * @return The result of the comparison according to the comparators
 */
public int compareNodes(AvlNode<T> node1,AvlNode<T> node2){
  return comparator_.compare(node1.getItem(),node2.getItem());
}
Program: 64728
Project: 64728
Buggy source:
/** 
 * Compares two solutions.
 * @param o1 Object representing the first <code>Solution</code>.
 * @param o2 Object representing the second <code>Solution</code>.
 * @return 0, if both solutions are equals with a certain dissimilarity, -1otherwise.
 * @throws JMException
 * @throws JMException
 */
@Override public int compare(Solution o1,Solution o2){
  Solution solution1, solution2;
  solution1=(Solution)o1;
  solution2=(Solution)o2;
  if ((solution1.getDecisionVariables() != null) && (solution2.getDecisionVariables() != null)) {
    if (solution1.numberOfVariables() != solution2.numberOfVariables()) {
      return -1;
    }
  }
  try {
    if ((new Distance()).distanceBetweenSolutions(solution1,solution2) < EPSILON) {
      return 0;
    }
  }
 catch (  JMException e) {
    Configuration.logger_.log(Level.SEVERE,"String_Node_Str",e);
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Compares two solutions.
 * @param o1 Object representing the first solution.
 * @param o2 Object representing the second solution.
 * @return 0, if both solutions are equals with a certain dissimilarity, -1otherwise.
 * @throws JMException
 * @throws JMException
 */
@Override public int compare(Solution o1,Solution o2){
  Solution solution1, solution2;
  solution1=(Solution)o1;
  solution2=(Solution)o2;
  if ((solution1.getDecisionVariables() != null) && (solution2.getDecisionVariables() != null)) {
    if (solution1.numberOfVariables() != solution2.numberOfVariables()) {
      return -1;
    }
  }
  try {
    if ((new Distance()).distanceBetweenSolutions(solution1,solution2) < EPSILON) {
      return 0;
    }
  }
 catch (  JMException e) {
    Configuration.logger_.log(Level.SEVERE,"String_Node_Str",e);
  }
  return -1;
}
Program: 64729
Project: 64729
Buggy source:
private void generateTable(String problem) throws IOException {
  writeTableHeader(problem);
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    writeTableRow(i,problem);
  }
  writeTableTail();
}

Fixed version (ground truth):
private void generateTable(String problem) throws IOException, JMException {
  writeTableHeader(problem);
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    writeTableRow(i,problem);
  }
  writeTableTail();
}
Program: 64730
Project: 64730
Buggy source:
private void writeTableRow(int algorithmIndex,String problem) throws IOException {
  fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[algorithmIndex] + "String_Node_Str");
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i != algorithmIndex) {
      double setCoverageValueAB=calculateSetCoverage(problem,experiment_.getAlgorithmNameList()[algorithmIndex],experiment_.getAlgorithmNameList()[i]);
      String setCoverageAB=String.format(Locale.ENGLISH,"String_Node_Str",setCoverageValueAB);
      fileWriter_.write("String_Node_Str" + setCoverageAB);
    }
 else     fileWriter_.write("String_Node_Str");
    if (i < (experiment_.getAlgorithmNameList().length - 1)) {
      fileWriter_.write("String_Node_Str");
    }
  }
  fileWriter_.write("String_Node_Str");
}

Fixed version (ground truth):
private void writeTableRow(int algorithmIndex,String problem) throws IOException, JMException {
  fileWriter_.write("String_Node_Str" + experiment_.getAlgorithmNameList()[algorithmIndex] + "String_Node_Str");
  for (int i=0; i < experiment_.getAlgorithmNameList().length; i++) {
    if (i != algorithmIndex) {
      double setCoverageValueAB=calculateSetCoverage(problem,experiment_.getAlgorithmNameList()[algorithmIndex],experiment_.getAlgorithmNameList()[i]);
      String setCoverageAB=String.format(Locale.ENGLISH,"String_Node_Str",setCoverageValueAB);
      fileWriter_.write("String_Node_Str" + setCoverageAB);
    }
 else     fileWriter_.write("String_Node_Str");
    if (i < (experiment_.getAlgorithmNameList().length - 1)) {
      fileWriter_.write("String_Node_Str");
    }
  }
  fileWriter_.write("String_Node_Str");
}
Program: 64731
Project: 64731
Buggy source:
private double calculateSetCoverage(String problem,String algorithmA,String algorithmB){
  double result=5.5;
  SetCoverage setCoverageMetric=new SetCoverage();
  Vector<Double> values=new Vector<Double>(experiment_.getIndependentRuns());
  for (int i=0; i < experiment_.getIndependentRuns(); i++) {
    String front1=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmA+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    String front2=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmB+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    result=setCoverageMetric.setCoverage(front1,front2);
    values.add(i,result);
  }
  return Statistics.calculateMean(values);
}

Fixed version (ground truth):
private double calculateSetCoverage(String problem,String algorithmA,String algorithmB) throws JMException {
  double result=5.5;
  SetCoverage setCoverageMetric=new SetCoverage();
  Vector<Double> values=new Vector<Double>(experiment_.getIndependentRuns());
  for (int i=0; i < experiment_.getIndependentRuns(); i++) {
    String front1=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmA+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    String front2=experiment_.getExperimentBaseDirectory() + "String_Node_Str" + algorithmB+ "String_Node_Str"+ problem+ "String_Node_Str"+ i;
    result=setCoverageMetric.setCoverage(front1,front2);
    values.add(i,result);
  }
  return Statistics.calculateMean(values);
}
Program: 64732
Project: 64732
Buggy source:
@Override public void generate() throws IOException {
  createOutputDirectory();
  String outputTexFile=outputDirectoryName_ + "String_Node_Str" + "String_Node_Str";
  fileWriter_=new FileWriter(outputTexFile,false);
  generateLatexHeader();
  for (  String problem : experiment_.getProblemList()) {
    generateTable(problem);
  }
  generateLatexTail();
  fileWriter_.close();
}

Fixed version (ground truth):
@Override public void generate() throws IOException, JMException {
  createOutputDirectory();
  String outputTexFile=outputDirectoryName_ + "String_Node_Str" + "String_Node_Str";
  fileWriter_=new FileWriter(outputTexFile,false);
  generateLatexHeader();
  for (  String problem : experiment_.getProblemList()) {
    generateTable(problem);
  }
  generateLatexTail();
  fileWriter_.close();
}