Program: 161859
Project: 161859
Buggy source:
private boolean checkRdfsLabelCandidates(DirectedSparseGraph<Node,String> graph,double threshholdTrigram,HashMap<String,Node> nodes,NamedEntityInText entity,String label,String knowledgeBase){
  boolean addedCandidates=false;
  label=cleanLabelsfromCorporationIdentifier(label);
  label=label.trim();
  List<Triple> candidates=rdfsLabelIndex.searchInLabels(label,false);
  log.info("String_Node_Str" + candidates.size());
  if (candidates.size() == 0) {
    log.info("String_Node_Str" + label);
    if (label.endsWith("String_Node_Str")) {
      label=label.substring(0,label.lastIndexOf("String_Node_Str"));
      candidates=rdfsLabelIndex.searchInLabels(label,false);
      log.info("String_Node_Str");
    }
 else     if (label.endsWith("String_Node_Str")) {
      label=label.substring(0,label.lastIndexOf("String_Node_Str"));
      candidates=rdfsLabelIndex.searchInLabels(label,false);
      log.info("String_Node_Str");
    }
  }
  for (  Triple c : candidates) {
    String candidateURL=c.getSubject();
    if (candidateURL.startsWith(nodeType) && !candidateURL.matches("String_Node_Str")) {
      if (trigramForURLLabel(candidateURL,label,nodeType) < threshholdTrigram) {
        continue;
      }
      if (disambiguates(candidateURL) != candidateURL) {
        continue;
      }
      if (!nodeType.equals("String_Node_Str")) {
        candidateURL=redirect(candidateURL);
      }
      if (fitsIntoDomain(candidateURL,knowledgeBase)) {
        addNodeToGraph(graph,nodes,entity,c,candidateURL);
        addedCandidates=true;
      }
    }
  }
  return addedCandidates;
}

Fixed version (ground truth):
private boolean checkRdfsLabelCandidates(DirectedSparseGraph<Node,String> graph,double threshholdTrigram,HashMap<String,Node> nodes,NamedEntityInText entity,String label,String knowledgeBase){
  boolean addedCandidates=false;
  label=cleanLabelsfromCorporationIdentifier(label);
  label=label.trim();
  List<Triple> candidates=rdfsLabelIndex.searchInLabels(label,false);
  log.info("String_Node_Str" + candidates.size());
  if (candidates.size() == 0) {
    log.info("String_Node_Str" + label);
    if (label.endsWith("String_Node_Str")) {
      label=label.substring(0,label.lastIndexOf("String_Node_Str"));
      candidates=rdfsLabelIndex.searchInLabels(label,false);
      log.info("String_Node_Str");
    }
 else     if (label.endsWith("String_Node_Str")) {
      label=label.substring(0,label.lastIndexOf("String_Node_Str"));
      candidates=rdfsLabelIndex.searchInLabels(label,false);
      log.info("String_Node_Str");
    }
  }
  for (  Triple c : candidates) {
    String candidateURL=c.getSubject();
    if (candidateURL.startsWith(nodeType) && !candidateURL.matches("String_Node_Str")) {
      if (trigramForURLLabel(c,label,nodeType) < threshholdTrigram) {
        continue;
      }
      if (disambiguates(candidateURL) != candidateURL) {
        continue;
      }
      if (!nodeType.equals("String_Node_Str")) {
        candidateURL=redirect(candidateURL);
      }
      if (fitsIntoDomain(candidateURL,knowledgeBase)) {
        addNodeToGraph(graph,nodes,entity,c,candidateURL);
        addedCandidates=true;
      }
    }
  }
  return addedCandidates;
}