Program: 9677
Project: 9677
Buggy source:
public void evaluate(){
  String targetQuery;
  Set<String> answers;
  List<String> examples;
  Set<String> relatedResources;
  List<String> relevantWords;
  int i=1;
  for (  String question : question2Answers.keySet()) {
    question="String_Node_Str";
    logger.info(getNewQuestionString(i++,question));
    try {
      logger.info("String_Node_Str" + question + "String_Node_Str");
      targetQuery=question2query.get(question);
      logger.info("String_Node_Str" + targetQuery);
      answers=question2Answers.get(question);
      logger.info("String_Node_Str" + answers.size() + "String_Node_Str"+ answers);
      relevantWords=getRelevantWords(question);
      exFinder.setStatementFilter(new QuestionBasedStatementFilter(new HashSet<String>(relevantWords)));
      if (USE_SYNONYMS) {
        relevantWords.addAll(getSynonyms(relevantWords));
        logger.info("String_Node_Str" + relevantWords);
      }
      question="String_Node_Str";
      for (      String word : relevantWords) {
        question+="String_Node_Str" + word;
      }
      question.trim();
      logger.info("String_Node_Str" + question);
      if (USE_WIKIPEDIA_SEARCH) {
        examples=getResourcesByWikipedia(question);
      }
 else {
        examples=getResourcesByNLQueryWithLucene(question);
      }
      List<String> posExamples=new ArrayList<String>();
      List<String> negExamples=new ArrayList<String>();
      for (      String ex : examples) {
        if (answers.contains(ex)) {
          if (posExamples.size() < NR_OF_POS_START_EXAMPLES_COUNT) {
            posExamples.add(ex);
          }
        }
 else {
          if (negExamples.size() < NR_OF_NEG_START_EXAMPLES_COUNT) {
            negExamples.add(ex);
          }
        }
      }
      if (posExamples.isEmpty()) {
        logger.warn("String_Node_Str" + TOP_K + "String_Node_Str"+ "String_Node_Str");
        continue;
      }
      logger.info("String_Node_Str" + posExamples.size() + "String_Node_Str"+ posExamples);
      logger.info("String_Node_Str" + negExamples.size() + "String_Node_Str"+ negExamples);
      Set<String> learnedResources;
      do {
        logger.info("String_Node_Str");
        long startTime=System.currentTimeMillis();
        String example=exFinder.findSimilarExample(posExamples,negExamples).getURI();
        logger.info("String_Node_Str" + example + "String_Node_Str"+ (System.currentTimeMillis() - startTime)+ "String_Node_Str");
        String learnedQuery=exFinder.getCurrentQuery();
        logger.info("String_Node_Str" + learnedQuery);
        learnedQuery="String_Node_Str" + learnedQuery.substring(7);
        learnedResources=getResourcesBySPARQLQuery(learnedQuery);
        logger.info("String_Node_Str" + learnedResources.size());
        if (answers.contains(example)) {
          posExamples.add(example);
        }
 else {
          negExamples.add(example);
        }
      }
 while (answers.equals(learnedResources));
      logger.info("String_Node_Str" + question + "String_Node_Str");
    }
 catch (    TimeOutException e) {
      e.printStackTrace();
    }
catch (    SPARQLQueryException e) {
      e.printStackTrace();
    }
catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public void evaluate(){
  String targetQuery;
  Set<String> answers;
  List<String> examples;
  Set<String> relatedResources;
  List<String> relevantWords;
  int i=1;
  for (  String question : question2Answers.keySet()) {
    question="String_Node_Str";
    logger.info(getNewQuestionString(i++,question));
    try {
      logger.info("String_Node_Str" + question + "String_Node_Str");
      targetQuery=question2query.get(question);
      logger.info("String_Node_Str" + targetQuery);
      answers=question2Answers.get(question);
      logger.info("String_Node_Str" + answers.size() + "String_Node_Str"+ answers);
      relevantWords=getRelevantWords(question);
      QuestionBasedStatementFilter filter=new QuestionBasedStatementFilter(new HashSet<String>(relevantWords));
      filter.setThreshold(SIMILARITY_THRESHOLD);
      exFinder.setStatementFilter(filter);
      if (USE_SYNONYMS) {
        relevantWords.addAll(getSynonyms(relevantWords));
        logger.info("String_Node_Str" + relevantWords);
      }
      question="String_Node_Str";
      for (      String word : relevantWords) {
        question+="String_Node_Str" + word;
      }
      question.trim();
      logger.info("String_Node_Str" + question);
      if (USE_WIKIPEDIA_SEARCH) {
        examples=getResourcesByWikipedia(question);
      }
 else {
        examples=getResourcesByNLQueryWithLucene(question);
      }
      List<String> posExamples=new ArrayList<String>();
      List<String> negExamples=new ArrayList<String>();
      for (      String ex : examples) {
        if (answers.contains(ex)) {
          if (posExamples.size() < NR_OF_POS_START_EXAMPLES_COUNT) {
            posExamples.add(ex);
          }
        }
 else {
          if (negExamples.size() < NR_OF_NEG_START_EXAMPLES_COUNT) {
            negExamples.add(ex);
          }
        }
      }
      if (posExamples.size() < NR_OF_POS_START_EXAMPLES_COUNT) {
        logger.info("String_Node_Str" + posExamples.size() + "String_Node_Str");
        for (        String answer : answers) {
          posExamples.add(answer);
          if (posExamples.size() == NR_OF_POS_START_EXAMPLES_COUNT) {
            break;
          }
        }
      }
      if (posExamples.isEmpty()) {
        logger.warn("String_Node_Str" + TOP_K + "String_Node_Str"+ "String_Node_Str");
        continue;
      }
      logger.info("String_Node_Str" + posExamples.size() + "String_Node_Str"+ posExamples);
      logger.info("String_Node_Str" + negExamples.size() + "String_Node_Str"+ negExamples);
      Set<String> learnedResources;
      do {
        logger.info("String_Node_Str");
        long startTime=System.currentTimeMillis();
        String example=exFinder.findSimilarExample(posExamples,negExamples).getURI();
        logger.info("String_Node_Str" + example + "String_Node_Str"+ (System.currentTimeMillis() - startTime)+ "String_Node_Str");
        String learnedQuery=exFinder.getCurrentQuery();
        logger.info("String_Node_Str" + learnedQuery);
        learnedQuery="String_Node_Str" + learnedQuery.substring(7);
        learnedResources=getResourcesBySPARQLQuery(learnedQuery);
        logger.info("String_Node_Str" + learnedResources.size());
        if (answers.contains(example)) {
          posExamples.add(example);
        }
 else {
          negExamples.add(example);
        }
      }
 while (answers.equals(learnedResources));
      logger.info("String_Node_Str" + question + "String_Node_Str");
    }
 catch (    TimeOutException e) {
      e.printStackTrace();
    }
catch (    SPARQLQueryException e) {
      e.printStackTrace();
    }
catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
}