Program: 84250
Project: 84250
Buggy source:
/** 
 * After the change set has been ran against the database this method will update the change log table with the information.
 */
public void markChangeSetAsRan(ChangeSet changeSet) throws JDBCException, IOException {
  String dateValue=getDatabase().getCurrentDateTimeFunction();
  String sql="String_Node_Str" + dateValue + "String_Node_Str";
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(escapeStringForDatabase(changeSet.getId())));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getAuthor()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getDatabaseChangeLog().getFilePath()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getMd5sum()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(limitSize(changeSet.getDescription())));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(limitSize(StringUtils.trimToEmpty(changeSet.getComments()))));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getDatabaseChangeLog().getMigrator().getBuildVersion()));
  Writer sqlOutputWriter=getOutputSQLWriter();
  if (sqlOutputWriter == null) {
    DatabaseConnection connection=getDatabase().getConnection();
    try {
      Statement statement=connection.createStatement();
      statement.executeUpdate(sql);
      statement.close();
      connection.commit();
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
  }
 else {
    sqlOutputWriter.write(sql + "String_Node_Str" + StreamUtil.getLineSeparator()+ StreamUtil.getLineSeparator());
  }
  getRanChangeSetList().add(new RanChangeSet(changeSet));
}

Fixed version (ground truth):
/** 
 * After the change set has been ran against the database this method will update the change log table with the information.
 */
public void markChangeSetAsRan(ChangeSet changeSet) throws JDBCException, IOException {
  String dateValue=getDatabase().getCurrentDateTimeFunction();
  String sql="String_Node_Str" + dateValue + "String_Node_Str";
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(escapeStringForDatabase(changeSet.getId())));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getAuthor()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getDatabaseChangeLog().getFilePath().replace("String_Node_Str","String_Node_Str")));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getMd5sum()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(limitSize(changeSet.getDescription())));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(limitSize(StringUtils.trimToEmpty(changeSet.getComments()))));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getDatabaseChangeLog().getMigrator().getBuildVersion()));
  Writer sqlOutputWriter=getOutputSQLWriter();
  if (sqlOutputWriter == null) {
    DatabaseConnection connection=getDatabase().getConnection();
    try {
      Statement statement=connection.createStatement();
      statement.executeUpdate(sql);
      statement.close();
      connection.commit();
    }
 catch (    SQLException e) {
      throw new JDBCException(e);
    }
  }
 else {
    sqlOutputWriter.write(sql + "String_Node_Str" + StreamUtil.getLineSeparator()+ StreamUtil.getLineSeparator());
  }
  getRanChangeSetList().add(new RanChangeSet(changeSet));
}