Program: 9415
Project: 9415
Buggy source:
/** 
 * Compute a (partial) solution that covers as much positive examples as possible.
 * @return
 */
private EvaluatedQueryTree<String> computeBestPartialSolution(){
  logger.info("String_Node_Str");
  bestCurrentScore=Double.NEGATIVE_INFINITY;
  partialSolutionStartTime=System.currentTimeMillis();
  initTodoList(currentPosExampleTrees,currentNegExampleTrees);
  EvaluatedQueryTree<String> bestPartialSolutionTree=null;
  EvaluatedQueryTree<String> currentElement;
  QueryTree<String> currentTree;
  TObjectIntMap<QueryTree<String>> index=new TObjectIntHashMap<QueryTree<String>>(this.currentPosExampleTrees.size() + this.currentNegExampleTrees.size());
  Set<Set<QueryTree<String>>> processedCombinations=new HashSet<>();
  while (!partialSolutionTerminationCriteriaSatisfied()) {
    logger.trace("String_Node_Str" + todoList.size());
    currentElement=todoList.poll();
    currentTree=currentElement.getTree();
    logger.trace("String_Node_Str" + currentElement.getTreeScore() + "String_Node_Str"+ solutionAsString(currentElement.getEvaluatedDescription()));
    String s="String_Node_Str";
    for (    QueryTree<String> tree : currentElement.getBaseQueryTrees()) {
      s+=this.tree2Individual.get(tree) + "String_Node_Str";
    }
    System.out.println(s);
    Iterator<QueryTree<String>> it=currentElement.getFalseNegatives().iterator();
    while (it.hasNext() && !isPartialSolutionTimeExpired() && !isTimeExpired()) {
      QueryTree<String> uncoveredTree=it.next();
      Set<QueryTree<String>> baseQueryTrees=Sets.newHashSet(currentElement.getBaseQueryTrees());
      baseQueryTrees.add(uncoveredTree);
      if (!processedCombinations.add(baseQueryTrees)) {
        System.err.println("String_Node_Str");
        continue;
      }
      lggMon.start();
      QueryTree<String> lgg=lggGenerator.getLGG(currentTree,uncoveredTree);
      lggMon.stop();
      Set<EvaluatedQueryTree<String>> solutions=evaluate(lgg,true);
      for (      EvaluatedQueryTree<String> solution : solutions) {
        solution.setBaseQueryTrees(baseQueryTrees);
        expressionTests++;
        double score=solution.getScore();
        double mas=heuristic.getMaximumAchievableScore(solution);
        if (score >= bestCurrentScore) {
          if (score > bestCurrentScore) {
            logger.info("String_Node_Str" + solution.getTreeScore());
            logger.info("String_Node_Str" + solutionAsString(solution.getEvaluatedDescription()));
            bestCurrentScore=score;
            bestPartialSolutionTree=solution;
          }
          if (bestCurrentScore == 1.0 || mas > score) {
            todo(solution);
          }
        }
 else         if (bestCurrentScore == 1.0 || mas >= bestCurrentScore) {
          todo(solution);
        }
 else {
          logger.trace("String_Node_Str" + solution.getTreeScore());
          todo(solution);
        }
        currentPartialSolutions.add(solution);
      }
    }
    currentPartialSolutions.add(currentElement);
  }
  long endTime=System.currentTimeMillis();
  logger.info("String_Node_Str" + (endTime - partialSolutionStartTime) + "String_Node_Str");
  EvaluatedDescription bestPartialSolution=bestPartialSolutionTree.getEvaluatedDescription();
  logger.info("String_Node_Str" + solutionAsString(bestPartialSolution) + "String_Node_Str"+ bestPartialSolution.getScore()+ "String_Node_Str");
  logger.trace("String_Node_Str" + lggMon.getTotal() + "String_Node_Str");
  logger.trace("String_Node_Str" + lggMon.getAvg() + "String_Node_Str");
  logger.info("String_Node_Str" + lggMon.getHits());
  logger.trace("String_Node_Str" + subMon.getTotal() + "String_Node_Str");
  logger.trace("String_Node_Str" + subMon.getAvg() + "String_Node_Str");
  logger.trace("String_Node_Str" + subMon.getHits());
  return bestPartialSolutionTree;
}

Fixed version (ground truth):
/** 
 * Compute a (partial) solution that covers as much positive examples as possible.
 * @return
 */
private EvaluatedQueryTree<String> computeBestPartialSolution(){
  logger.info("String_Node_Str");
  bestCurrentScore=Double.NEGATIVE_INFINITY;
  partialSolutionStartTime=System.currentTimeMillis();
  initTodoList(currentPosExampleTrees,currentNegExampleTrees);
  EvaluatedQueryTree<String> bestPartialSolutionTree=null;
  EvaluatedQueryTree<String> currentElement;
  QueryTree<String> currentTree;
  TObjectIntMap<QueryTree<String>> index=new TObjectIntHashMap<QueryTree<String>>(this.currentPosExampleTrees.size() + this.currentNegExampleTrees.size());
  Set<Set<QueryTree<String>>> processedCombinations=new HashSet<>();
  while (!partialSolutionTerminationCriteriaSatisfied()) {
    logger.trace("String_Node_Str" + todoList.size());
    currentElement=todoList.poll();
    currentTree=currentElement.getTree();
    logger.trace("String_Node_Str" + currentElement.getTreeScore() + "String_Node_Str"+ solutionAsString(currentElement.getEvaluatedDescription()));
    Iterator<QueryTree<String>> it=currentElement.getFalseNegatives().iterator();
    while (it.hasNext() && !isPartialSolutionTimeExpired() && !isTimeExpired()) {
      QueryTree<String> uncoveredTree=it.next();
      Set<QueryTree<String>> baseQueryTrees=Sets.newHashSet(currentElement.getBaseQueryTrees());
      baseQueryTrees.add(uncoveredTree);
      if (!processedCombinations.add(baseQueryTrees)) {
        continue;
      }
      lggMon.start();
      QueryTree<String> lgg=lggGenerator.getLGG(currentTree,uncoveredTree);
      lggMon.stop();
      Set<EvaluatedQueryTree<String>> solutions=evaluate(lgg,true);
      for (      EvaluatedQueryTree<String> solution : solutions) {
        solution.setBaseQueryTrees(baseQueryTrees);
        expressionTests++;
        double score=solution.getScore();
        double mas=heuristic.getMaximumAchievableScore(solution);
        if (score >= bestCurrentScore) {
          if (score > bestCurrentScore) {
            logger.info("String_Node_Str" + solution.getTreeScore());
            logger.info("String_Node_Str" + solutionAsString(solution.getEvaluatedDescription()));
            bestCurrentScore=score;
            bestPartialSolutionTree=solution;
          }
          if (bestCurrentScore == 1.0 || mas > score) {
            todo(solution);
          }
        }
 else         if (bestCurrentScore == 1.0 || mas >= bestCurrentScore) {
          todo(solution);
        }
 else {
          logger.trace("String_Node_Str" + solution.getTreeScore());
          todo(solution);
        }
        currentPartialSolutions.add(solution);
      }
    }
    currentPartialSolutions.add(currentElement);
  }
  long endTime=System.currentTimeMillis();
  logger.info("String_Node_Str" + (endTime - partialSolutionStartTime) + "String_Node_Str");
  EvaluatedDescription bestPartialSolution=bestPartialSolutionTree.getEvaluatedDescription();
  logger.info("String_Node_Str" + solutionAsString(bestPartialSolution) + "String_Node_Str"+ bestPartialSolution.getScore()+ "String_Node_Str");
  logger.trace("String_Node_Str" + lggMon.getTotal() + "String_Node_Str");
  logger.trace("String_Node_Str" + lggMon.getAvg() + "String_Node_Str");
  logger.info("String_Node_Str" + lggMon.getHits());
  logger.trace("String_Node_Str" + subMon.getTotal() + "String_Node_Str");
  logger.trace("String_Node_Str" + subMon.getAvg() + "String_Node_Str");
  logger.trace("String_Node_Str" + subMon.getHits());
  return bestPartialSolutionTree;
}