Program: 64488
Project: 64488
Buggy source:
@Override public Ranking<S> computeRanking(List<S> population){
  int size=population.size();
  List<Double> upperBound=new ArrayList<>();
  List<Double> lowerBound=new ArrayList<>();
  int numberObjectives=population.get(0).getNumberOfObjectives();
  for (int i=0; i < population.get(0).getNumberOfObjectives(); i++) {
    Collections.sort(population,new ObjectiveComparator<S>(i));
    double objetiveMinn=population.get(0).getObjective(i);
    double objetiveMaxn=population.get(population.size() - 1).getObjective(i);
    upperBound.add(objetiveMaxn);
    lowerBound.add(objetiveMinn);
  }
  this.utilityFunctions.setLowerBounds(lowerBound);
  this.utilityFunctions.setUpperBounds(upperBound);
  List<S> temporalList=new LinkedList();
  temporalList.addAll(population);
  int numberOfPoint=this.referencePoint.size() / numberObjectives;
  int indexReference=0;
  this.numberOfRanks=population.size() + 1;
  this.rankedSubpopulations=new ArrayList(this.numberOfRanks);
  for (int i=0; i < numberOfRanks - 1; i++) {
    this.rankedSubpopulations.add(new ArrayList<>());
  }
  for (int i=0; i < numberOfPoint; i++) {
    List<Double> interestPoint=nextInterestPoint(indexReference,numberObjectives);
    indexReference+=numberObjectives;
    this.utilityFunctions.updatePointOfInterest(interestPoint);
    SortedMap<Double,S> map=new TreeMap<>();
    for (    S solution : temporalList) {
      double value=this.utilityFunctions.evaluate(solution).doubleValue();
      map.put(value,solution);
    }
    int rank=0;
    List<S> populationOrder=new ArrayList<>(map.values());
    for (    S solution : populationOrder) {
      this.setAttribute(solution,rank);
      this.rankedSubpopulations.get(rank).add(solution);
      rank++;
    }
  }
  while (!temporalList.isEmpty()) {
    int indexRandom=JMetalRandom.getInstance().nextInt(0,temporalList.size() - 1);
    S solutionRandom=temporalList.get(indexRandom);
    temporalList.remove(indexRandom);
    for (int i=0; i < temporalList.size(); i++) {
      S solution=temporalList.get(i);
      double sum=this.preference(solutionRandom,solution,upperBound,lowerBound);
      if (sum < epsilon) {
        removeRank(solution);
        this.setAttribute(solution,this.rankedSubpopulations.size() - 1);
        List<S> rankListAux=this.rankedSubpopulations.get(this.rankedSubpopulations.size() - 1);
        if (rankListAux == null) {
          rankListAux=new ArrayList();
        }
        rankListAux.add(solution);
        temporalList.remove(i);
      }
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public Ranking<S> computeRanking(List<S> population){
  int size=population.size();
  List<Double> upperBound=new ArrayList<>();
  List<Double> lowerBound=new ArrayList<>();
  int numberObjectives=population.get(0).getNumberOfObjectives();
  for (int i=0; i < population.get(0).getNumberOfObjectives(); i++) {
    Collections.sort(population,new ObjectiveComparator<S>(i));
    double objetiveMinn=population.get(0).getObjective(i);
    double objetiveMaxn=population.get(population.size() - 1).getObjective(i);
    upperBound.add(objetiveMaxn);
    lowerBound.add(objetiveMinn);
  }
  this.utilityFunctions.setLowerBounds(lowerBound);
  this.utilityFunctions.setUpperBounds(upperBound);
  List<S> temporalList=new LinkedList();
  temporalList.addAll(population);
  int numberOfPoint=this.referencePoint.size() / numberObjectives;
  int indexReference=0;
  this.numberOfRanks=population.size() + 1;
  this.rankedSubpopulations=new ArrayList(this.numberOfRanks);
  for (int i=0; i < numberOfRanks - 1; i++) {
    this.rankedSubpopulations.add(new ArrayList<>());
  }
  for (int i=0; i < numberOfPoint; i++) {
    List<Double> interestPoint=nextInterestPoint(indexReference,numberObjectives);
    indexReference+=numberObjectives;
    this.utilityFunctions.updatePointOfInterest(interestPoint);
    SortedMap<Double,List<S>> map=new TreeMap<>();
    for (    S solution : temporalList) {
      double value=this.utilityFunctions.evaluate(solution).doubleValue();
      List<S> auxiliar=map.get(value);
      if (auxiliar == null) {
        auxiliar=new ArrayList<>();
      }
      auxiliar.add(solution);
      map.put(value,auxiliar);
    }
    int rank=0;
    List<List<S>> populationOrder=new ArrayList<>(map.values());
    for (    List<S> solutionList : populationOrder) {
      for (      S solution : solutionList) {
        Integer nConstrains=numberOfViolatedConstraints.getAttribute(solution);
        if (nConstrains != null && nConstrains == 0) {
          this.setAttribute(solution,rank);
          this.rankedSubpopulations.get(rank).add(solution);
        }
 else {
          this.setAttribute(solution,numberOfRanks - 2);
          this.rankedSubpopulations.get(numberOfRanks - 2).add(solution);
        }
      }
      rank++;
    }
  }
  while (!temporalList.isEmpty()) {
    int indexRandom=JMetalRandom.getInstance().nextInt(0,temporalList.size() - 1);
    S solutionRandom=temporalList.get(indexRandom);
    temporalList.remove(indexRandom);
    for (int i=0; i < temporalList.size(); i++) {
      S solution=temporalList.get(i);
      double sum=this.preference(solutionRandom,solution,upperBound,lowerBound);
      if (sum < epsilon) {
        removeRank(solution);
        this.setAttribute(solution,this.rankedSubpopulations.size() - 1);
        List<S> rankListAux=this.rankedSubpopulations.get(this.rankedSubpopulations.size() - 1);
        if (rankListAux == null) {
          rankListAux=new ArrayList();
        }
        rankListAux.add(solution);
        temporalList.remove(i);
      }
    }
  }
  return this;
}