Program: 23113
Project: 23113
Buggy source:
private void checkAllInterlinked(List<ValidationMessage> errors,List<Element> entries,NodeStack stack,Element bundle){
  Map<String,Element> visitedResources=new HashMap<String,Element>();
  HashMap<Element,Element> candidateEntries=new HashMap<Element,Element>();
  List<Element> candidateResources=new ArrayList<Element>();
  for (  Element entry : entries) {
    candidateEntries.put(entry.getNamedChild("String_Node_Str"),entry);
    candidateResources.add(entry.getNamedChild("String_Node_Str"));
  }
  List<String> sheets=new ArrayList();
  List<Element> links=bundle.getChildren("String_Node_Str");
  for (  Element link : links) {
    if (link.getChildValue("String_Node_Str").equals("String_Node_Str")) {
      sheets.add(link.getChildValue("String_Node_Str"));
    }
  }
  if (!sheets.isEmpty()) {
    for (    Element r : candidateResources) {
      String url=r.getChildValue("String_Node_Str");
      if (sheets.contains(url))       visitedResources.put(url,r);
    }
  }
  List<Element> unusedResources=new ArrayList<Element>();
  boolean reverseLinksFound=false;
  do {
    followResourceLinks(entries.get(0),visitedResources,candidateEntries,candidateResources,errors,stack);
    unusedResources.clear();
    unusedResources.addAll(candidateResources);
    unusedResources.removeAll(visitedResources.values());
    for (    Element unusedResource : unusedResources) {
      List<String> references=findReferences(unusedResource);
      for (      String reference : references) {
        if (visitedResources.containsKey(reference)) {
          visitedResources.put(reference,unusedResource);
          reverseLinksFound=true;
        }
      }
    }
  }
 while (reverseLinksFound);
  int i=0;
  for (  Element entry : entries) {
    rule(errors,IssueType.INFORMATIONAL,entry.line(),entry.col(),stack.addToLiteralPath("String_Node_Str" + '[' + (i + 1)+ ']'),!unusedResources.contains(entry.getNamedChild("String_Node_Str")),"String_Node_Str");
    i++;
  }
}

Fixed version (ground truth):
private void checkAllInterlinked(List<ValidationMessage> errors,List<Element> entries,NodeStack stack,Element bundle){
  Map<String,Element> visitedResources=new HashMap<String,Element>();
  HashMap<Element,Element> candidateEntries=new HashMap<Element,Element>();
  List<Element> candidateResources=new ArrayList<Element>();
  for (  Element entry : entries) {
    candidateEntries.put(entry.getNamedChild("String_Node_Str"),entry);
    candidateResources.add(entry.getNamedChild("String_Node_Str"));
  }
  List<String> sheets=new ArrayList();
  List<Element> links=bundle.getChildren("String_Node_Str");
  for (  Element link : links) {
    if (link.getChildValue("String_Node_Str").equals("String_Node_Str")) {
      sheets.add(link.getChildValue("String_Node_Str"));
    }
  }
  if (!sheets.isEmpty()) {
    for (    Element r : candidateResources) {
      String url=r.getChildValue("String_Node_Str");
      if (sheets.contains(url))       visitedResources.put(url,r);
    }
  }
  List<Element> unusedResources=new ArrayList<Element>();
  boolean reverseLinksFound;
  do {
    reverseLinksFound=false;
    followResourceLinks(entries.get(0),visitedResources,candidateEntries,candidateResources,errors,stack);
    unusedResources.clear();
    unusedResources.addAll(candidateResources);
    unusedResources.removeAll(visitedResources.values());
    for (    Element unusedResource : unusedResources) {
      List<String> references=findReferences(unusedResource);
      for (      String reference : references) {
        if (visitedResources.containsKey(reference)) {
          visitedResources.put(reference,unusedResource);
          reverseLinksFound=true;
        }
      }
    }
  }
 while (reverseLinksFound);
  int i=0;
  for (  Element entry : entries) {
    rule(errors,IssueType.INFORMATIONAL,entry.line(),entry.col(),stack.addToLiteralPath("String_Node_Str" + '[' + (i + 1)+ ']'),!unusedResources.contains(entry.getNamedChild("String_Node_Str")),"String_Node_Str");
    i++;
  }
}