Program: 23936
Project: 23936
Buggy source:
private void checkResolveLink(String filename,Location loc,String path,String ref,List<ValidationMessage> messages) throws IOException {
  links++;
  String tgtList="String_Node_Str";
  boolean resolved=Utilities.existsInList(ref,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str") || ref.startsWith("String_Node_Str");
  if (!resolved)   resolved=manual.contains(ref);
  if (!resolved && specs != null) {
    for (    SpecMapManager spec : specs) {
      resolved=resolved || spec.getBase().equals(ref) || (spec.getBase() + "String_Node_Str").equals(ref)|| spec.hasTarget(ref);
    }
  }
  if (!resolved) {
    if (ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str")) {
      resolved=true;
      if (specs != null) {
        for (        SpecMapManager spec : specs) {
          if (ref.startsWith(spec.getBase()))           resolved=false;
        }
      }
    }
 else {
      String page=ref;
      String name=null;
      if (page.startsWith("String_Node_Str")) {
        name=page.substring(1);
        page=filename;
      }
 else       if (page.contains("String_Node_Str")) {
        name=page.substring(page.indexOf("String_Node_Str") + 1);
        page=Utilities.path(rootFolder,page.substring(0,page.indexOf("String_Node_Str")).replace("String_Node_Str",File.separator));
      }
 else       page=Utilities.path(Utilities.getDirectoryForFile(filename),page.replace("String_Node_Str",File.separator));
      LoadedFile f=cache.get(page);
      if (f != null) {
        if (Utilities.noString(name))         resolved=true;
 else {
          resolved=f.targets.contains(name);
          tgtList="String_Node_Str" + f.targets.toString() + "String_Node_Str";
        }
      }
    }
  }
  if (!resolved)   messages.add(new ValidationMessage(Source.Publisher,IssueType.NOTFOUND,filename + (path == null ? "String_Node_Str" : "String_Node_Str" + path + (loc == null ? "String_Node_Str" : "String_Node_Str" + loc.toString())),"String_Node_Str" + ref + "String_Node_Str"+ tgtList,IssueSeverity.ERROR));
}

Fixed version (ground truth):
private void checkResolveLink(String filename,Location loc,String path,String ref,List<ValidationMessage> messages) throws IOException {
  links++;
  String tgtList="String_Node_Str";
  boolean resolved=Utilities.existsInList(ref,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str") || ref.startsWith("String_Node_Str");
  if (!resolved)   resolved=manual.contains(ref);
  if (!resolved && specs != null) {
    for (    SpecMapManager spec : specs) {
      resolved=resolved || spec.getBase().equals(ref) || (spec.getBase() + "String_Node_Str").equals(ref)|| spec.hasTarget(ref);
    }
  }
  if (!resolved) {
    if (ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str")) {
      resolved=true;
      if (specs != null) {
        for (        SpecMapManager spec : specs) {
          if (ref.startsWith(spec.getBase()))           resolved=false;
        }
      }
    }
 else {
      String page=ref;
      String name=null;
      if (page.startsWith("String_Node_Str")) {
        name=page.substring(1);
        page=filename;
      }
 else       if (page.contains("String_Node_Str")) {
        name=page.substring(page.indexOf("String_Node_Str") + 1);
        page=Utilities.path(rootFolder,page.substring(0,page.indexOf("String_Node_Str")).replace("String_Node_Str",File.separator));
      }
 else {
        String folder=Utilities.getDirectoryForFile(filename);
        page=Utilities.path(folder == null ? rootFolder : folder,page.replace("String_Node_Str",File.separator));
      }
      LoadedFile f=cache.get(page);
      if (f != null) {
        if (Utilities.noString(name))         resolved=true;
 else {
          resolved=f.targets.contains(name);
          tgtList="String_Node_Str" + f.targets.toString() + "String_Node_Str";
        }
      }
    }
  }
  if (!resolved)   messages.add(new ValidationMessage(Source.Publisher,IssueType.NOTFOUND,filename + (path == null ? "String_Node_Str" : "String_Node_Str" + path + (loc == null ? "String_Node_Str" : "String_Node_Str" + loc.toString())),"String_Node_Str" + ref + "String_Node_Str"+ tgtList,IssueSeverity.ERROR));
}