Program: 84149
Project: 84149
Buggy source:
/** 
 * This method will actually execute each of the changes in the list against the specified database.
 */
public void execute() throws MigrationFailedException {
  for (  Change change : changes) {
    try {
      change.setUp();
    }
 catch (    SetupException se) {
      throw new MigrationFailedException(this,se);
    }
  }
  Migrator migrator=getDatabaseChangeLog().getMigrator();
  DatabaseConnection connection=migrator.getDatabase().getConnection();
  try {
    Writer outputSQLWriter=getDatabaseChangeLog().getMigrator().getOutputSQLWriter();
    if (migrator.getMode().equals(Migrator.Mode.EXECUTE_MODE)) {
      log.finest("String_Node_Str" + toString());
      for (      Change change : getChanges()) {
        change.executeStatements(migrator.getDatabase());
        log.finest(change.getConfirmationMessage());
      }
      connection.commit();
      log.finest("String_Node_Str" + toString() + "String_Node_Str");
    }
 else     if (migrator.getMode().equals(Migrator.Mode.OUTPUT_SQL_MODE)) {
      outputSQLWriter.write("String_Node_Str" + toString() + StreamUtil.getLineSeparator());
      writeComments(outputSQLWriter);
      for (      Change change : getChanges()) {
        change.saveStatements(getDatabaseChangeLog().getMigrator().getDatabase(),outputSQLWriter);
      }
    }
 else     if (migrator.getMode().equals(Migrator.Mode.EXECUTE_ROLLBACK_MODE)) {
      log.finest("String_Node_Str" + toString());
      if (rollBackStatements != null && rollBackStatements.length > 0) {
        for (        SqlStatement rollback : rollBackStatements) {
          try {
            new JdbcTemplate(migrator.getDatabase()).execute(rollback);
          }
 catch (          JDBCException e) {
            throw new RollbackFailedException("String_Node_Str" + rollback.getSqlStatement(migrator.getDatabase()) + "String_Node_Str");
          }
        }
      }
 else {
        List<Change> changes=getChanges();
        for (int i=changes.size() - 1; i >= 0; i--) {
          Change change=changes.get(i);
          change.executeRollbackStatements(migrator.getDatabase());
          log.finest(change.getConfirmationMessage());
        }
      }
      connection.commit();
      log.finest("String_Node_Str" + toString() + "String_Node_Str");
    }
 else     if (migrator.getMode().equals(Migrator.Mode.OUTPUT_ROLLBACK_SQL_MODE) || migrator.getMode().equals(Migrator.Mode.OUTPUT_FUTURE_ROLLBACK_SQL_MODE)) {
      outputSQLWriter.write("String_Node_Str" + toString() + StreamUtil.getLineSeparator());
      writeComments(outputSQLWriter);
      if (rollBackStatements != null && rollBackStatements.length > 0) {
        for (        SqlStatement statement : rollBackStatements) {
          outputSQLWriter.append(statement.getSqlStatement(migrator.getDatabase())).append(statement.getEndDelimiter(migrator.getDatabase())).append(StreamUtil.getLineSeparator()).append(StreamUtil.getLineSeparator());
        }
      }
 else {
        for (int i=changes.size() - 1; i >= 0; i--) {
          Change change=changes.get(i);
          change.saveRollbackStatement(getDatabaseChangeLog().getMigrator().getDatabase(),outputSQLWriter);
        }
      }
    }
 else     if (migrator.getMode().equals(Migrator.Mode.OUTPUT_CHANGELOG_ONLY_SQL_MODE)) {
    }
 else {
      throw new MigrationFailedException(this,"String_Node_Str" + migrator.getMode());
    }
    connection.commit();
  }
 catch (  Exception e) {
    try {
      connection.rollback();
    }
 catch (    SQLException e1) {
      throw new MigrationFailedException(this,e);
    }
    throw new MigrationFailedException(this,e);
  }
}

Fixed version (ground truth):
/** 
 * This method will actually execute each of the changes in the list against the specified database.
 */
public void execute(Database database) throws MigrationFailedException {
  try {
    database.getJdbcTemplate().comment("String_Node_Str" + toString());
    for (    Change change : changes) {
      try {
        change.setUp();
      }
 catch (      SetupException se) {
        throw new MigrationFailedException(this,se);
      }
    }
    log.finest("String_Node_Str" + toString());
    for (    Change change : getChanges()) {
      change.executeStatements(database);
      log.finest(change.getConfirmationMessage());
    }
    database.commit();
    log.finest("String_Node_Str" + toString() + "String_Node_Str");
    database.commit();
  }
 catch (  Exception e) {
    try {
      database.rollback();
    }
 catch (    Exception e1) {
      throw new MigrationFailedException(this,e);
    }
    throw new MigrationFailedException(this,e);
  }
}