Program: 161883
Project: 161883
Buggy source:
private double trigramForURLLabel(String candidateURL,String label,String nodeType){
  List<Triple> labelOfCandidate=rdfsLabelIndex.getLabelForURI(candidateURL);
  if (labelOfCandidate.isEmpty()) {
    return 0;
  }
  HashSet<String> union=new HashSet<String>();
  double sim=0;
  for (  Triple t : labelOfCandidate) {
    HashSet<String> trigramsForLabel=new HashSet<String>();
    for (int i=3; i < label.length(); i++) {
      trigramsForLabel.add(label.substring(i - 3,i).toLowerCase());
    }
    union=new HashSet<String>();
    String replace=t.getObject().replace(nodeType,"String_Node_Str").toLowerCase();
    replace=replace.replace("String_Node_Str","String_Node_Str");
    HashSet<String> trigramsForCandidate=new HashSet<String>();
    for (int i=3; i < replace.length(); i++) {
      trigramsForCandidate.add(replace.substring(i - 3,i).toLowerCase());
    }
    union.addAll(trigramsForLabel);
    union.addAll(trigramsForCandidate);
    trigramsForLabel.retainAll(trigramsForCandidate);
    double tmp=(double)trigramsForLabel.size() / ((double)union.size());
    if (sim < tmp)     sim=tmp;
  }
  return sim;
}

Fixed version (ground truth):
private double trigramForURLLabel(String candidateURL,String label,String nodeType){
  double sim=0;
  if (!nodeType.equals("String_Node_Str")) {
    List<Triple> labelOfCandidate=rdfsLabelIndex.getLabelForURI(candidateURL);
    if (labelOfCandidate.isEmpty()) {
      return 0;
    }
    HashSet<String> union=new HashSet<String>();
    for (    Triple t : labelOfCandidate) {
      HashSet<String> trigramsForLabel=new HashSet<String>();
      for (int i=3; i < label.length(); i++) {
        trigramsForLabel.add(label.substring(i - 3,i).toLowerCase());
      }
      union=new HashSet<String>();
      String replace=t.getObject().replace(nodeType,"String_Node_Str").toLowerCase();
      replace=replace.replace("String_Node_Str","String_Node_Str");
      HashSet<String> trigramsForCandidate=new HashSet<String>();
      for (int i=3; i < replace.length(); i++) {
        trigramsForCandidate.add(replace.substring(i - 3,i).toLowerCase());
      }
      union.addAll(trigramsForLabel);
      union.addAll(trigramsForCandidate);
      trigramsForLabel.retainAll(trigramsForCandidate);
      double tmp=(double)trigramsForLabel.size() / ((double)union.size());
      if (sim < tmp)       sim=tmp;
    }
    return sim;
  }
 else {
    HashSet<String> trigramsForLabel=new HashSet<String>();
    for (int i=3; i < label.length(); i++) {
      trigramsForLabel.add(label.substring(i - 3,i).toLowerCase());
    }
    List<Triple> labelOfCandidate=rdfsLabelIndex.getLabelForURI(candidateURL);
    if (labelOfCandidate.isEmpty()) {
      return 0;
    }
    String replace=labelOfCandidate.get(0).getObject().replace(nodeType,"String_Node_Str").toLowerCase();
    replace=replace.replace("String_Node_Str","String_Node_Str");
    HashSet<String> trigramsForCandidate=new HashSet<String>();
    for (int i=3; i < replace.length(); i++) {
      trigramsForCandidate.add(replace.substring(i - 3,i).toLowerCase());
    }
    HashSet<String> union=new HashSet<String>();
    union.addAll(trigramsForLabel);
    union.addAll(trigramsForCandidate);
    trigramsForLabel.retainAll(trigramsForCandidate);
    log.debug("String_Node_Str" + replace + "String_Node_Str"+ label+ "String_Node_Str"+ (double)trigramsForLabel.size() / ((double)union.size()));
    return (double)trigramsForLabel.size() / ((double)union.size());
  }
}