Program: 84147
Project: 84147
Buggy source:
/** 
 * Prints changeLog that would bring the base database to be the same as the target database
 */
public void printChangeLog(PrintStream out,Database targetDatabase,XmlWriter xmlWriter) throws ParserConfigurationException, IOException {
  DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  DocumentBuilder documentBuilder=factory.newDocumentBuilder();
  documentBuilder.setEntityResolver(new MigratorSchemaResolver());
  Document doc=documentBuilder.newDocument();
  Element changeLogElement=doc.createElement("String_Node_Str");
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str");
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str");
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str");
  doc.appendChild(changeLogElement);
  List<Change> changes=new ArrayList<Change>();
  addMissingTableChanges(changes,targetDatabase);
  addUnexpectedTableChanges(changes);
  addMissingColumnChanges(changes,targetDatabase);
  addUnexpectedColumnChanges(changes);
  addChangedColumnChanges(changes);
  addMissingPrimaryKeyChanges(changes);
  addUnexpectedPrimaryKeyChanges(changes);
  addMissingIndexChanges(changes);
  addUnexpectedIndexChanges(changes);
  addMissingForeignKeyChanges(changes);
  addUnexpectedForeignKeyChanges(changes);
  addMissingSequenceChanges(changes);
  addUnexpectedSequenceChanges(changes);
  addMissingViewChanges(changes);
  addUnexpectedViewChanges(changes);
  for (  Change change : changes) {
    Element changeSet=doc.createElement("String_Node_Str");
    changeSet.setAttribute("String_Node_Str","String_Node_Str");
    changeSet.setAttribute("String_Node_Str",generateId());
    changeSet.appendChild(change.createNode(doc));
    doc.getDocumentElement().appendChild(changeSet);
  }
  xmlWriter.write(doc,out);
  out.flush();
}

Fixed version (ground truth):
/** 
 * Prints changeLog that would bring the base database to be the same as the target database
 */
public void printChangeLog(PrintStream out,Database targetDatabase,XmlWriter xmlWriter) throws ParserConfigurationException, IOException {
  DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  DocumentBuilder documentBuilder=factory.newDocumentBuilder();
  documentBuilder.setEntityResolver(new LiquibaseSchemaResolver());
  Document doc=documentBuilder.newDocument();
  Element changeLogElement=doc.createElement("String_Node_Str");
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str" + XMLChangeLogParser.getSchemaVersion());
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str");
  changeLogElement.setAttribute("String_Node_Str","String_Node_Str" + XMLChangeLogParser.getSchemaVersion() + "String_Node_Str"+ XMLChangeLogParser.getSchemaVersion()+ "String_Node_Str");
  doc.appendChild(changeLogElement);
  List<Change> changes=new ArrayList<Change>();
  addMissingTableChanges(changes,targetDatabase);
  addUnexpectedTableChanges(changes);
  addMissingColumnChanges(changes,targetDatabase);
  addUnexpectedColumnChanges(changes);
  addChangedColumnChanges(changes);
  addMissingPrimaryKeyChanges(changes);
  addUnexpectedPrimaryKeyChanges(changes);
  addMissingIndexChanges(changes);
  addUnexpectedIndexChanges(changes);
  addMissingForeignKeyChanges(changes);
  addUnexpectedForeignKeyChanges(changes);
  addMissingSequenceChanges(changes);
  addUnexpectedSequenceChanges(changes);
  addMissingViewChanges(changes);
  addUnexpectedViewChanges(changes);
  for (  Change change : changes) {
    Element changeSet=doc.createElement("String_Node_Str");
    changeSet.setAttribute("String_Node_Str","String_Node_Str");
    changeSet.setAttribute("String_Node_Str",generateId());
    changeSet.appendChild(change.createNode(doc));
    doc.getDocumentElement().appendChild(changeSet);
  }
  xmlWriter.write(doc,out);
  out.flush();
}