Program: 64593
Project: 64593
Buggy source:
/** 
 * Implements the subset generation method described in the scatter search template
 * @return Number of solutions created by the method
 * @throws JMException
 */
public int subSetGeneration() throws JMException {
  List<DoubleSolution> parents=new ArrayList<DoubleSolution>(2);
  parents.add(problem.createSolution());
  parents.add(problem.createSolution());
  List<DoubleSolution> offSpring;
  subSet.clear();
  for (int i=0; i < refSet1.size(); i++) {
    parents.set(0,refSet1.get(i));
    for (int j=i + 1; j < refSet1.size(); j++) {
      parents.set(1,refSet1.get(j));
      if (!marked.getAttribute(parents.get(0)) || !marked.getAttribute(parents.get(1))) {
        offSpring=(List<DoubleSolution>)crossoverOperator.execute(parents);
        problem.evaluate(offSpring.get(0));
        problem.evaluate(offSpring.get(1));
        if (problem instanceof ConstrainedProblem) {
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(0));
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(1));
        }
        evaluations+=2;
        if (evaluations < maxEvaluations) {
          subSet.add(offSpring.get(0));
          subSet.add(offSpring.get(1));
        }
        marked.setAttribute(parents.get(0),true);
        marked.setAttribute(parents.get(1),true);
      }
    }
  }
  for (int i=0; i < refSet2.size(); i++) {
    parents.set(0,refSet2.get(i));
    for (int j=i + 1; j < refSet2.size(); j++) {
      parents.set(1,refSet2.get(j));
      if (!marked.getAttribute(parents.get(0)) || !marked.getAttribute(parents.get(1))) {
        offSpring=(List<DoubleSolution>)crossoverOperator.execute(parents);
        if (problem instanceof ConstrainedProblem) {
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(0));
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(1));
        }
        problem.evaluate(offSpring.get(0));
        problem.evaluate(offSpring.get(1));
        evaluations+=2;
        if (evaluations < maxEvaluations) {
          subSet.add(offSpring.get(0));
          subSet.add(offSpring.get(1));
        }
        marked.setAttribute(parents.get(0),true);
        marked.setAttribute(parents.get(1),true);
      }
    }
  }
  return subSet.size();
}

Fixed version (ground truth):
/** 
 * Implements the subset generation method described in the scatter search template
 * @return Number of solutions created by the method
 * @throws JMException
 */
public int subSetGeneration() throws JMException {
  List<DoubleSolution> parents=new ArrayList<DoubleSolution>(2);
  parents.add(problem.createSolution());
  parents.add(problem.createSolution());
  List<DoubleSolution> offSpring;
  subSet.clear();
  for (int i=0; i < refSet1.size(); i++) {
    parents.set(0,refSet1.get(i));
    for (int j=i + 1; j < refSet1.size(); j++) {
      parents.set(1,refSet1.get(j));
      if (!marked.getAttribute(parents.get(0)) || !marked.getAttribute(parents.get(1))) {
        offSpring=(List<DoubleSolution>)crossoverOperator.execute(parents);
        problem.evaluate(offSpring.get(0));
        problem.evaluate(offSpring.get(1));
        if (problem instanceof ConstrainedProblem) {
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(0));
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(1));
        }
        evaluations+=2;
        if (evaluations < maxEvaluations) {
          subSet.add(offSpring.get(0));
          subSet.add(offSpring.get(1));
        }
        marked.setAttribute(parents.get(0),true);
        marked.setAttribute(parents.get(1),true);
      }
    }
  }
  System.out.println("String_Node_Str" + subSet.size());
  for (int i=0; i < refSet2.size(); i++) {
    parents.set(0,refSet2.get(i));
    for (int j=i + 1; j < refSet2.size(); j++) {
      parents.set(1,refSet2.get(j));
      if (!marked.getAttribute(parents.get(0)) || !marked.getAttribute(parents.get(1))) {
        offSpring=(List<DoubleSolution>)crossoverOperator.execute(parents);
        if (problem instanceof ConstrainedProblem) {
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(0));
          ((ConstrainedProblem)problem).evaluateConstraints(offSpring.get(1));
        }
        problem.evaluate(offSpring.get(0));
        problem.evaluate(offSpring.get(1));
        evaluations+=2;
        if (evaluations < maxEvaluations) {
          subSet.add(offSpring.get(0));
          subSet.add(offSpring.get(1));
        }
        marked.setAttribute(parents.get(0),true);
        marked.setAttribute(parents.get(1),true);
      }
    }
  }
  System.out.println("String_Node_Str" + subSet.size());
  return subSet.size();
}