Program: 24089
Project: 24089
Buggy source:
private void compareXml(String t,String n,String fn1,String fn2) throws Exception {
  char sc=File.separatorChar;
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  dbf.setNamespaceAware(true);
  dbf.setCoalescing(true);
  dbf.setIgnoringElementContentWhitespace(true);
  dbf.setIgnoringComments(true);
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document doc1=db.parse(new CSFile(fn1));
  doc1.normalizeDocument();
  stripWhitespaceAndComments(doc1);
  Document doc2=db.parse(new CSFile(fn2));
  doc2.normalizeDocument();
  stripWhitespaceAndComments(doc2);
  XmlGenerator xmlgen=new XmlGenerator();
  File tmp1=Utilities.createTempFile("String_Node_Str","String_Node_Str");
  xmlgen.generate(doc1.getDocumentElement(),tmp1,doc1.getDocumentElement().getNamespaceURI(),doc1.getDocumentElement().getLocalName());
  File tmp2=Utilities.createTempFile("String_Node_Str","String_Node_Str");
  xmlgen.generate(doc2.getDocumentElement(),tmp2,doc2.getDocumentElement().getNamespaceURI(),doc2.getDocumentElement().getLocalName());
  boolean ok=!TextFile.fileToString(tmp1.getAbsolutePath()).equals(TextFile.fileToString(tmp2.getAbsolutePath()));
  if (ok) {
    page.getValidationErrors().add(new ValidationMessage(Source.Publisher,IssueType.BUSINESSRULE,-1,-1,"String_Node_Str","String_Node_Str" + t + "String_Node_Str"+ n,IssueSeverity.WARNING));
    String diff=diffProgram != null ? diffProgram : System.getenv("String_Node_Str") + sc + "String_Node_Str"+ sc+ "String_Node_Str";
    if (new CSFile(diff).exists()) {
      List<String> command=new ArrayList<String>();
      command.add("String_Node_Str" + diff + "String_Node_Str"+ tmp1.getAbsolutePath()+ "String_Node_Str"+ tmp2.getAbsolutePath()+ "String_Node_Str");
      ProcessBuilder builder=new ProcessBuilder(command);
      builder.directory(new CSFile(page.getFolders().rootDir));
      builder.start();
    }
 else {
      page.log("String_Node_Str" + fn1 + "String_Node_Str"+ fn2+ "String_Node_Str",LogMessageType.Warning);
    }
  }
}

Fixed version (ground truth):
private void compareXml(String t,String n,String fn1,String fn2) throws Exception {
  char sc=File.separatorChar;
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  dbf.setNamespaceAware(true);
  dbf.setCoalescing(true);
  dbf.setIgnoringElementContentWhitespace(true);
  dbf.setIgnoringComments(true);
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document doc1=db.parse(new CSFile(fn1));
  doc1.normalizeDocument();
  stripWhitespaceAndComments(doc1);
  Document doc2=db.parse(new CSFile(fn2));
  doc2.normalizeDocument();
  stripWhitespaceAndComments(doc2);
  XmlGenerator xmlgen=new XmlGenerator();
  File tmp1=Utilities.createTempFile("String_Node_Str","String_Node_Str");
  xmlgen.generate(doc1.getDocumentElement(),tmp1,doc1.getDocumentElement().getNamespaceURI(),doc1.getDocumentElement().getLocalName());
  File tmp2=Utilities.createTempFile("String_Node_Str","String_Node_Str");
  xmlgen.generate(doc2.getDocumentElement(),tmp2,doc2.getDocumentElement().getNamespaceURI(),doc2.getDocumentElement().getLocalName());
  boolean ok=Utilities.compareIgnoreWhitespace(tmp1,tmp2);
  if (!ok) {
    page.getValidationErrors().add(new ValidationMessage(Source.Publisher,IssueType.BUSINESSRULE,-1,-1,"String_Node_Str","String_Node_Str" + t + "String_Node_Str"+ n,IssueSeverity.WARNING));
    String diff=diffProgram != null ? diffProgram : System.getenv("String_Node_Str") + sc + "String_Node_Str"+ sc+ "String_Node_Str";
    if (new CSFile(diff).exists()) {
      List<String> command=new ArrayList<String>();
      command.add("String_Node_Str" + diff + "String_Node_Str"+ tmp1.getAbsolutePath()+ "String_Node_Str"+ tmp2.getAbsolutePath()+ "String_Node_Str");
      ProcessBuilder builder=new ProcessBuilder(command);
      builder.directory(new CSFile(page.getFolders().rootDir));
      builder.start();
    }
 else {
      page.log("String_Node_Str" + fn1 + "String_Node_Str"+ fn2+ "String_Node_Str",LogMessageType.Warning);
    }
  }
}