Program: 64705
Project: 64705
Buggy source:
/** 
 * Runs of the GDE3 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(populationSize_ * 2);
    SolutionSet tmpSolutionSet=new SolutionSet(populationSize_);
    for (int i=0; i < populationSize_; i++) {
      Solution[] parent=(Solution[])selectionOperator_.execute(new Object[]{population_,i});
      Solution child;
      child=(Solution)crossoverOperator_.execute(new Object[]{population_.get(i),parent});
      tmpSolutionSet.add(child);
    }
    evaluatePopulation(tmpSolutionSet);
    for (int i=0; i < populationSize_; i++) {
      Solution child=tmpSolutionSet.get(i);
      int result;
      result=dominance_.compare(population_.get(i),child);
      if (result == -1) {
        offspringPopulation_.add(population_.get(i));
      }
 else       if (result == 1) {
        offspringPopulation_.add(child);
      }
 else {
        offspringPopulation_.add(child);
        offspringPopulation_.add(population_.get(i));
      }
    }
    Ranking ranking=new Ranking(offspringPopulation_);
    population_.clear();
    int rankingIndex=0;
    while (populationIsNotFull()) {
      if (subfrontFillsIntoThePopulation(ranking,rankingIndex)) {
        addRankedSolutionsToPopulation(ranking,rankingIndex);
        rankingIndex++;
      }
 else {
        computeCrowdingDistance(ranking,rankingIndex);
        addLastRankedSolutions(ranking,rankingIndex);
      }
    }
    iterations_++;
  }
  tearDown();
  return getNonDominatedSolutions();
}

Fixed version (ground truth):
/** 
 * Runs of the GDE3 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(populationSize_ * 2);
    SolutionSet tmpSolutionSet=new SolutionSet(populationSize_);
    for (int i=0; i < populationSize_; i++) {
      Solution[] parent=(Solution[])selectionOperator_.execute(new Object[]{population_,i});
      Solution child;
      child=(Solution)crossoverOperator_.execute(new Object[]{population_.get(i),parent});
      tmpSolutionSet.add(child);
    }
    tmpSolutionSet=evaluatePopulation(tmpSolutionSet);
    for (int i=0; i < populationSize_; i++) {
      Solution child=tmpSolutionSet.get(i);
      int result;
      result=dominance_.compare(population_.get(i),child);
      if (result == -1) {
        offspringPopulation_.add(population_.get(i));
      }
 else       if (result == 1) {
        offspringPopulation_.add(child);
      }
 else {
        offspringPopulation_.add(child);
        offspringPopulation_.add(population_.get(i));
      }
    }
    Ranking ranking=new Ranking(offspringPopulation_);
    population_.clear();
    int rankingIndex=0;
    while (populationIsNotFull()) {
      if (subfrontFillsIntoThePopulation(ranking,rankingIndex)) {
        addRankedSolutionsToPopulation(ranking,rankingIndex);
        rankingIndex++;
      }
 else {
        computeCrowdingDistance(ranking,rankingIndex);
        addLastRankedSolutions(ranking,rankingIndex);
      }
    }
    iterations_++;
  }
  tearDown();
  return getNonDominatedSolutions();
}