nus-yam/ex-repair huggingface dataset:
Program: 84152
Project: 84152
Buggy source:
public void testRollbackableChangeLogScriptOnFutureDatabase() throws Exception {
  if (connection == null) {
    return;
  }
  StringWriter writer=new StringWriter();
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.OUTPUT_FUTURE_ROLLBACK_SQL_MODE);
  migrator.setOutputSQLWriter(writer);
  migrator.setRollbackToDate(new Date(0));
  migrator.migrate();
}

Fixed version (ground truth):
public void testRollbackableChangeLogScriptOnFutureDatabase() throws Exception {
  if (database == null) {
    return;
  }
  StringWriter writer=new StringWriter();
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.futureRollbackSQL(this.contexts,writer);
}
Program: 84153
Project: 84153
Buggy source:
public void testDiff() throws Exception {
  if (connection == null) {
    return;
  }
  runCompleteChangeLog();
  Diff diff=new Diff(connection,connection);
  DiffResult diffResult=diff.compare();
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingForeignKeys().size());
  assertEquals(0,diffResult.getMissingIndexes().size());
  assertEquals(0,diffResult.getMissingPrimaryKeys().size());
  assertEquals(0,diffResult.getMissingSequences().size());
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingTables().size());
  assertEquals(0,diffResult.getMissingViews().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedForeignKeys().size());
  assertEquals(0,diffResult.getUnexpectedIndexes().size());
  assertEquals(0,diffResult.getUnexpectedPrimaryKeys().size());
  assertEquals(0,diffResult.getUnexpectedSequences().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedTables().size());
  assertEquals(0,diffResult.getUnexpectedViews().size());
}

Fixed version (ground truth):
public void testDiff() throws Exception {
  if (database == null) {
    return;
  }
  runCompleteChangeLog();
  Diff diff=new Diff(database.getConnection(),database.getConnection());
  DiffResult diffResult=diff.compare();
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingForeignKeys().size());
  assertEquals(0,diffResult.getMissingIndexes().size());
  assertEquals(0,diffResult.getMissingPrimaryKeys().size());
  assertEquals(0,diffResult.getMissingSequences().size());
  assertEquals(0,diffResult.getMissingColumns().size());
  assertEquals(0,diffResult.getMissingTables().size());
  assertEquals(0,diffResult.getMissingViews().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedForeignKeys().size());
  assertEquals(0,diffResult.getUnexpectedIndexes().size());
  assertEquals(0,diffResult.getUnexpectedPrimaryKeys().size());
  assertEquals(0,diffResult.getUnexpectedSequences().size());
  assertEquals(0,diffResult.getUnexpectedColumns().size());
  assertEquals(0,diffResult.getUnexpectedTables().size());
  assertEquals(0,diffResult.getUnexpectedViews().size());
}
Program: 84154
Project: 84154
Buggy source:
public void testClearChecksums() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.migrate();
  migrator.clearCheckSums();
}

Fixed version (ground truth):
public void testClearChecksums() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.update(this.contexts);
  migrator.clearCheckSums();
}
Program: 84155
Project: 84155
Buggy source:
protected void tearDown() throws Exception {
  if (connection != null) {
    if (shouldRollBack()) {
      connection.rollback();
    }
  }
  super.tearDown();
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  if (database != null) {
    if (shouldRollBack()) {
      database.rollback();
    }
  }
  super.tearDown();
}
Program: 84156
Project: 84156
Buggy source:
public void testRunChangeLog() throws Exception {
  if (connection == null) {
    return;
  }
  runCompleteChangeLog();
}

Fixed version (ground truth):
public void testRunChangeLog() throws Exception {
  if (database == null) {
    return;
  }
  runCompleteChangeLog();
}
Program: 84157
Project: 84157
Buggy source:
public void testTagEmptyDatabase() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.checkDatabaseChangeLogTable();
  try {
    migrator.tag("String_Node_Str");
  }
 catch (  JDBCException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
public void testTagEmptyDatabase() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.checkDatabaseChangeLogTable();
  try {
    migrator.tag("String_Node_Str");
  }
 catch (  JDBCException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
}
Program: 84158
Project: 84158
Buggy source:
public void testUnrunChangeSetsEmptyDatabase() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  List<ChangeSet> list=migrator.listUnrunChangeSets();
  assertTrue(list.size() > 0);
}

Fixed version (ground truth):
public void testUnrunChangeSetsEmptyDatabase() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  List<ChangeSet> list=migrator.listUnrunChangeSets(this.contexts);
  assertTrue(list.size() > 0);
}
Program: 84159
Project: 84159
Buggy source:
public void testOutputChangeLog() throws Exception {
  if (connection == null) {
    return;
  }
  StringWriter output=new StringWriter();
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.setOutputSQLWriter(output);
  migrator.setMode(Migrator.Mode.OUTPUT_SQL_MODE);
  migrator.migrate();
}

Fixed version (ground truth):
public void testOutputChangeLog() throws Exception {
  if (database == null) {
    return;
  }
  StringWriter output=new StringWriter();
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.update(this.contexts,output);
}
Program: 84161
Project: 84161
Buggy source:
public void testRollbackableChangeLog() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.EXECUTE_MODE);
  migrator.migrate();
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.EXECUTE_ROLLBACK_MODE);
  migrator.setRollbackToDate(new Date(0));
  migrator.migrate();
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.EXECUTE_MODE);
  migrator.migrate();
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.EXECUTE_ROLLBACK_MODE);
  migrator.setRollbackToDate(new Date(0));
  migrator.migrate();
}

Fixed version (ground truth):
public void testRollbackableChangeLog() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.update(this.contexts);
  migrator=createMigrator(rollbackChangeLog);
  migrator.rollback(new Date(0),this.contexts);
  migrator=createMigrator(rollbackChangeLog);
  migrator.update(this.contexts);
  migrator=createMigrator(rollbackChangeLog);
  migrator.rollback(new Date(0),this.contexts);
}
Program: 84162
Project: 84162
Buggy source:
public void testAbsolutePathChangeLog() throws Exception {
  if (connection == null) {
    return;
  }
  Enumeration<URL> urls=new JUnitFileOpener().getResources(includedChangeLog);
  URL completeChangeLogURL=urls.nextElement();
  String absolutePathOfChangeLog=completeChangeLogURL.toExternalForm();
  absolutePathOfChangeLog=absolutePathOfChangeLog.replaceFirst("String_Node_Str","String_Node_Str");
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    absolutePathOfChangeLog=absolutePathOfChangeLog.replace('/','\\');
  }
 else {
    absolutePathOfChangeLog="String_Node_Str" + absolutePathOfChangeLog;
  }
  Migrator migrator=createMigrator(absolutePathOfChangeLog,new FileSystemFileOpener());
  migrator.dropAll(getSchemasToDrop());
  migrator.migrate();
  migrator.migrate();
  migrator.dropAll(getSchemasToDrop());
}

Fixed version (ground truth):
public void testAbsolutePathChangeLog() throws Exception {
  if (database == null) {
    return;
  }
  Enumeration<URL> urls=new JUnitFileOpener().getResources(includedChangeLog);
  URL completeChangeLogURL=urls.nextElement();
  String absolutePathOfChangeLog=completeChangeLogURL.toExternalForm();
  absolutePathOfChangeLog=absolutePathOfChangeLog.replaceFirst("String_Node_Str","String_Node_Str");
  if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    absolutePathOfChangeLog=absolutePathOfChangeLog.replace('/','\\');
  }
 else {
    absolutePathOfChangeLog="String_Node_Str" + absolutePathOfChangeLog;
  }
  Migrator migrator=createMigrator(absolutePathOfChangeLog,new FileSystemFileOpener());
  migrator.dropAll(getSchemasToDrop());
  migrator.update(this.contexts);
  migrator.update(this.contexts);
  migrator.dropAll(getSchemasToDrop());
}
Program: 84163
Project: 84163
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  if (connection != null) {
    if (!connection.getAutoCommit()) {
      connection.rollback();
    }
    createMigrator(completeChangeLog).forceReleaseLock();
  }
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  if (database != null) {
    if (!database.getConnection().getAutoCommit()) {
      database.rollback();
    }
    LockHandler.getInstance(database).forceReleaseLock();
  }
}
Program: 84164
Project: 84164
Buggy source:
private Migrator createMigrator(String changeLogFile,FileOpener fileOpener) throws JDBCException {
  Migrator migrator=new Migrator(changeLogFile,fileOpener);
  migrator.setContexts("String_Node_Str");
  migrator.init(connection);
  return migrator;
}

Fixed version (ground truth):
private Migrator createMigrator(String changeLogFile,FileOpener fileOpener) throws JDBCException {
  return new Migrator(changeLogFile,fileOpener,database);
}
Program: 84165
Project: 84165
Buggy source:
protected AbstractSimpleChangeLogRunnerTest(String changelogDir,String url) throws Exception {
  this.completeChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.rollbackChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.includedChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.connection=TestContext.getInstance().getConnection(url);
  Logger.getLogger(Migrator.DEFAULT_LOG_NAME).setLevel(Level.SEVERE);
}

Fixed version (ground truth):
protected AbstractSimpleChangeLogRunnerTest(String changelogDir,String url) throws Exception {
  this.completeChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.rollbackChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.includedChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  DatabaseConnection connection=TestContext.getInstance().getConnection(url);
  LogFactory.getLogger().setLevel(Level.SEVERE);
  if (connection != null) {
    database=DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
  }
}
Program: 84166
Project: 84166
Buggy source:
public void testRollbackableChangeLogScriptOnExistingDatabase() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.EXECUTE_MODE);
  migrator.migrate();
  StringWriter writer=new StringWriter();
  migrator=createMigrator(rollbackChangeLog);
  migrator.setMode(Migrator.Mode.OUTPUT_ROLLBACK_SQL_MODE);
  migrator.setOutputSQLWriter(writer);
  migrator.setRollbackToDate(new Date(0));
  migrator.migrate();
}

Fixed version (ground truth):
public void testRollbackableChangeLogScriptOnExistingDatabase() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(rollbackChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(rollbackChangeLog);
  migrator.update(this.contexts);
  StringWriter writer=new StringWriter();
  migrator=createMigrator(rollbackChangeLog);
  migrator.rollback(new Date(0),this.contexts,writer);
}
Program: 84167
Project: 84167
Buggy source:
public void testTag() throws Exception {
  if (connection == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.migrate();
  migrator.tag("String_Node_Str");
}

Fixed version (ground truth):
public void testTag() throws Exception {
  if (database == null) {
    return;
  }
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  migrator.update(this.contexts);
  migrator.tag("String_Node_Str");
}
Program: 84168
Project: 84168
Buggy source:
private void runCompleteChangeLog() throws Exception {
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  try {
    migrator.migrate();
  }
 catch (  ValidationFailedException e) {
    e.printDescriptiveError(System.out);
    throw e;
  }
}

Fixed version (ground truth):
private void runCompleteChangeLog() throws Exception {
  Migrator migrator=createMigrator(completeChangeLog);
  migrator.dropAll(getSchemasToDrop());
  migrator=createMigrator(completeChangeLog);
  try {
    migrator.update(this.contexts);
  }
 catch (  ValidationFailedException e) {
    e.printDescriptiveError(System.out);
    throw e;
  }
}
Program: 84169
Project: 84169
Buggy source:
@Before public void setUp(){
  factory=new ChangeFactory();
}

Fixed version (ground truth):
@Before public void setUp(){
  factory=ChangeFactory.getInstance();
}
Program: 84170
Project: 84170
Buggy source:
protected void performLiquibaseTask(Migrator migrator) throws LiquibaseException {
  migrator.migrate();
}

Fixed version (ground truth):
protected void performLiquibaseTask(Migrator migrator) throws LiquibaseException {
  super.performLiquibaseTask(migrator);
  migrator.migrate();
}
Program: 84171
Project: 84171
Buggy source:
protected void performLiquibaseTask(Migrator migrator) throws LiquibaseException {
  migrator.migrate();
}

Fixed version (ground truth):
protected void performLiquibaseTask(Migrator migrator) throws LiquibaseException {
  super.performLiquibaseTask(migrator);
  migrator.migrate();
}
Program: 84172
Project: 84172
Buggy source:
public Object convertDatabaseValueToJavaObject(Object defaultValue,int dataType,int columnSize,int decimalDigits) throws ParseException {
  if (defaultValue != null) {
    if (defaultValue instanceof String) {
      if (dataType == Types.DATE || dataType == Types.TIME || dataType == Types.TIMESTAMP) {
        if (((String)defaultValue).indexOf("String_Node_Str") > 0) {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
 else         if (((String)defaultValue).indexOf("String_Node_Str") > 0) {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
 else {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
      }
    }
  }
  return super.convertDatabaseValueToJavaObject(defaultValue,dataType,columnSize,decimalDigits);
}

Fixed version (ground truth):
public Object convertDatabaseValueToJavaObject(Object defaultValue,int dataType,int columnSize,int decimalDigits) throws ParseException {
  if (defaultValue != null) {
    if (defaultValue instanceof String) {
      if (dataType == Types.DATE || dataType == Types.TIME || dataType == Types.TIMESTAMP) {
        if (((String)defaultValue).indexOf("String_Node_Str") > 0) {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
 else         if (((String)defaultValue).indexOf("String_Node_Str") > 0) {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
 else {
          defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str").replaceFirst("String_Node_Str","String_Node_Str");
        }
      }
      defaultValue=((String)defaultValue).replaceFirst("String_Node_Str","String_Node_Str");
    }
  }
  return super.convertDatabaseValueToJavaObject(defaultValue,dataType,columnSize,decimalDigits);
}
Program: 84175
Project: 84175
Buggy source:
Migrator getMigrator(Database database);

Fixed version (ground truth):
Migrator getMigrator(String changeLogFile,Database database);
Program: 84176
Project: 84176
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ideFacade.getMigrator(database).clearCheckSums();
  ideFacade.displayMessage("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ideFacade.getMigrator(null,database).clearCheckSums();
  ideFacade.displayMessage("String_Node_Str","String_Node_Str");
}
Program: 84177
Project: 84177
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  if (ideFacade.confirm(getTitle(),"String_Node_Str")) {
    ideFacade.getMigrator(database).dropAll();
    ideFacade.displayOutput("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  if (ideFacade.confirm(getTitle(),"String_Node_Str")) {
    ideFacade.getMigrator(null,database).dropAll();
    ideFacade.displayOutput("String_Node_Str","String_Node_Str");
  }
}
Program: 84178
Project: 84178
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  File input=ideFacade.promptForDirectory(getTitle(),"String_Node_Str",null);
  if (input != null) {
    try {
      ideFacade.getMigrator(database).generateDocumentation(input.getCanonicalPath());
    }
 catch (    IOException e) {
      throw new LiquibaseException(e);
    }
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  File input=ideFacade.promptForDirectory(getTitle(),"String_Node_Str",null);
  if (input != null) {
    try {
      String changeLogFile=ideFacade.selectChangeLogFile();
      if (changeLogFile == null) {
        return;
      }
      ideFacade.getMigrator(null,database).generateDocumentation(input.getCanonicalPath());
    }
 catch (    IOException e) {
      throw new LiquibaseException(e);
    }
  }
}
Program: 84179
Project: 84179
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  try {
    String output="String_Node_Str";
    DatabaseChangeLogLock[] locks=ideFacade.getMigrator(database).listLocks();
    for (    DatabaseChangeLogLock lock : locks) {
      output+="String_Node_Str" + lock.getLockedBy() + "String_Node_Str"+ DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT).format(lock.getLockGranted())+ "String_Node_Str";
    }
    ideFacade.displayOutput("String_Node_Str",output);
  }
 catch (  IOException e) {
    throw new LiquibaseException(e);
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  try {
    String output="String_Node_Str";
    DatabaseChangeLogLock[] locks=ideFacade.getMigrator(null,database).listLocks();
    for (    DatabaseChangeLogLock lock : locks) {
      output+="String_Node_Str" + lock.getLockedBy() + "String_Node_Str"+ DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT).format(lock.getLockGranted())+ "String_Node_Str";
    }
    ideFacade.displayOutput("String_Node_Str",output);
  }
 catch (  IOException e) {
    throw new LiquibaseException(e);
  }
}
Program: 84180
Project: 84180
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ideFacade.getMigrator(database).migrate();
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String changeLogFile=ideFacade.selectChangeLogFile();
  if (changeLogFile == null) {
    return;
  }
  ideFacade.getMigrator(changeLogFile,database).migrate();
}
Program: 84181
Project: 84181
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  StringWriter stringWriter=new StringWriter();
  ideFacade.getMigrator(database).migrateSQL(stringWriter);
  ideFacade.displayOutput("String_Node_Str",stringWriter.toString());
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  StringWriter stringWriter=new StringWriter();
  String changeLogFile=ideFacade.selectChangeLogFile();
  if (changeLogFile == null) {
    return;
  }
  ideFacade.getMigrator(changeLogFile,database).migrateSQL(stringWriter);
  ideFacade.displayOutput("String_Node_Str",stringWriter.toString());
}
Program: 84182
Project: 84182
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ideFacade.getMigrator(database).releaseLock();
  ideFacade.displayMessage("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ideFacade.getMigrator(null,database).releaseLock();
  ideFacade.displayMessage("String_Node_Str","String_Node_Str");
}
Program: 84183
Project: 84183
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Integer input=ideFacade.promptForInteger(getTitle(),"String_Node_Str",1);
  if (input != null) {
    ideFacade.getMigrator(database).rollbackCount(input);
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Integer input=ideFacade.promptForInteger(getTitle(),"String_Node_Str",1);
  if (input != null) {
    ideFacade.getMigrator(null,database).rollbackCount(input);
  }
}
Program: 84184
Project: 84184
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Integer input=ideFacade.promptForInteger(getTitle(),"String_Node_Str",1);
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(database).rollbackCountSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Integer input=ideFacade.promptForInteger(getTitle(),"String_Node_Str",1);
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(null,database).rollbackCountSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}
Program: 84185
Project: 84185
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  StringWriter writer=new StringWriter();
  ideFacade.getMigrator(database).futureRollbackSQL(writer);
  ideFacade.displayOutput("String_Node_Str",writer.toString());
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  StringWriter writer=new StringWriter();
  String changeLogFile=ideFacade.selectChangeLogFile();
  if (changeLogFile == null) {
    return;
  }
  ideFacade.getMigrator(changeLogFile,database).futureRollbackSQL(writer);
  ideFacade.displayOutput("String_Node_Str",writer.toString());
}
Program: 84186
Project: 84186
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Date input=ideFacade.promptForDateTime(getTitle(),"String_Node_Str",new Date());
  if (input != null) {
    ideFacade.getMigrator(database).rollbackToDate(input);
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Date input=ideFacade.promptForDateTime(getTitle(),"String_Node_Str",new Date());
  if (input != null) {
    String changeLogFile=ideFacade.selectChangeLogFile();
    if (changeLogFile == null) {
      return;
    }
    ideFacade.getMigrator(changeLogFile,database).rollbackToDate(input);
  }
}
Program: 84187
Project: 84187
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Date input=ideFacade.promptForDateTime(getTitle(),"String_Node_Str",new Date());
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(database).rollbackToDateSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  Date input=ideFacade.promptForDateTime(getTitle(),"String_Node_Str",new Date());
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(null,database).rollbackToDateSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}
Program: 84188
Project: 84188
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    ideFacade.getMigrator(database).rollback(input);
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    ideFacade.getMigrator(null,database).rollback(input);
  }
}
Program: 84189
Project: 84189
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(database).rollbackSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    StringWriter writer=new StringWriter();
    ideFacade.getMigrator(null,database).rollbackSQL(input,writer);
    ideFacade.displayOutput("String_Node_Str",writer.toString());
  }
}
Program: 84190
Project: 84190
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
  ideFacade.getMigrator(database).reportStatus(true,new PrintStream(byteArrayOutputStream));
  ideFacade.displayOutput("String_Node_Str",byteArrayOutputStream.toString());
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
  String changeLogFile=ideFacade.selectChangeLogFile();
  if (changeLogFile == null) {
    return;
  }
  ideFacade.getMigrator(changeLogFile,database).reportStatus(true,new PrintStream(byteArrayOutputStream));
  ideFacade.displayOutput("String_Node_Str",byteArrayOutputStream.toString());
}
Program: 84191
Project: 84191
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    ideFacade.getMigrator(database).tag(input);
  }
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String input=ideFacade.promptForString(getTitle(),"String_Node_Str",null);
  if (input != null) {
    ideFacade.getMigrator(null,database).tag(input);
  }
}
Program: 84192
Project: 84192
Buggy source:
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String message;
  try {
    ideFacade.getMigrator(database).validate();
    message="String_Node_Str";
  }
 catch (  ValidationFailedException e) {
    ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
    e.printDescriptiveError(new PrintStream(byteArrayOutputStream));
    message=byteArrayOutputStream.toString();
  }
catch (  Exception e) {
    throw new LiquibaseException(e);
  }
  ideFacade.displayOutput("String_Node_Str",message);
}

Fixed version (ground truth):
public void actionPerform(Database database,IdeFacade ideFacade) throws LiquibaseException {
  String message;
  try {
    String changeLogFile=ideFacade.selectChangeLogFile();
    if (changeLogFile == null) {
      return;
    }
    ideFacade.getMigrator(changeLogFile,database).validate();
    message="String_Node_Str";
  }
 catch (  ValidationFailedException e) {
    ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
    e.printDescriptiveError(new PrintStream(byteArrayOutputStream));
    message=byteArrayOutputStream.toString();
  }
catch (  Exception e) {
    throw new LiquibaseException(e);
  }
  ideFacade.displayOutput("String_Node_Str",message);
}
Program: 84194
Project: 84194
Buggy source:
private void addChangedColumnChanges(List<Change> changes){
  for (  Column column : getChangedColumns()) {
    if (!shouldModifyColumn(column)) {
      continue;
    }
    Column baseColumn=baseSnapshot.getColumn(column);
    if (column.isDataTypeDifferent(baseColumn)) {
      ColumnConfig columnConfig=new ColumnConfig();
      columnConfig.setName(column.getName());
      columnConfig.setType(baseColumn.getDataTypeString(targetDatabase));
      ModifyColumnChange change=new ModifyColumnChange();
      change.setTableName(column.getTable().getName());
      change.setColumn(columnConfig);
      changes.add(change);
    }
    if (column.isNullabilityDifferent(baseColumn)) {
      if (baseColumn.isNullable() == null || baseColumn.isNullable()) {
        DropNotNullConstraintChange change=new DropNotNullConstraintChange();
        change.setTableName(column.getTable().getName());
        change.setColumnName(column.getName());
        change.setColumnDataType(baseColumn.getDataTypeString(targetDatabase));
        changes.add(change);
      }
 else {
        AddNotNullConstraintChange change=new AddNotNullConstraintChange();
        change.setTableName(column.getTable().getName());
        change.setColumnName(column.getName());
        change.setColumnDataType(baseColumn.getDataTypeString(targetDatabase));
        changes.add(change);
      }
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void addChangedColumnChanges(List<Change> changes){
  for (  Column column : getChangedColumns()) {
    if (!shouldModifyColumn(column)) {
      continue;
    }
    boolean foundDifference=false;
    Column baseColumn=baseSnapshot.getColumn(column);
    if (column.isDataTypeDifferent(baseColumn)) {
      ColumnConfig columnConfig=new ColumnConfig();
      columnConfig.setName(column.getName());
      columnConfig.setType(baseColumn.getDataTypeString(targetDatabase));
      ModifyColumnChange change=new ModifyColumnChange();
      change.setTableName(column.getTable().getName());
      change.setColumn(columnConfig);
      changes.add(change);
      foundDifference=true;
    }
    if (column.isNullabilityDifferent(baseColumn)) {
      if (baseColumn.isNullable() == null || baseColumn.isNullable()) {
        DropNotNullConstraintChange change=new DropNotNullConstraintChange();
        change.setTableName(column.getTable().getName());
        change.setColumnName(column.getName());
        change.setColumnDataType(baseColumn.getDataTypeString(targetDatabase));
        changes.add(change);
        foundDifference=true;
      }
 else {
        AddNotNullConstraintChange change=new AddNotNullConstraintChange();
        change.setTableName(column.getTable().getName());
        change.setColumnName(column.getName());
        change.setColumnDataType(baseColumn.getDataTypeString(targetDatabase));
        changes.add(change);
        foundDifference=true;
      }
    }
    if (!foundDifference) {
      throw new RuntimeException("String_Node_Str");
    }
  }
}
Program: 84195
Project: 84195
Buggy source:
public InputStream getResourceAsStream(String arg0) throws IOException {
  return getChangeLogResource().getInputStream();
}

Fixed version (ground truth):
public InputStream getResourceAsStream(String file) throws IOException {
  Resource resource=getResource(file);
  return resource.getInputStream();
}
Program: 84196
Project: 84196
Buggy source:
public Enumeration<URL> getResources(String arg0) throws IOException {
  Vector<URL> tmp=new Vector<URL>();
  tmp.add(getChangeLogResource().getURL());
  return tmp.elements();
}

Fixed version (ground truth):
public Enumeration<URL> getResources(String packageName) throws IOException {
  Vector<URL> tmp=new Vector<URL>();
  tmp.add(getResource(packageName).getURL());
  return tmp.elements();
}
Program: 84197
Project: 84197
Buggy source:
/** 
 * Executed automatically when the bean is initialized.
 */
public void afterPropertiesSet() throws LiquibaseException {
  Connection c=null;
  try {
    c=getDataSource().getConnection();
    Migrator migrator=createMigrator(c);
    migrator.init(c);
    setup(migrator);
    if (isWriteSqlFileEnabled() && getSqlOutputDir() != null) {
      if (migrator.listUnrunChangeSets().size() > 0) {
        log.log(Level.WARNING,getExecuteDisabledWarningMessage());
      }
      writeSqlFile(migrator);
    }
    if (isExecuteEnabled()) {
      executeSql(migrator);
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
catch (  IOException e) {
    throw new LiquibaseException(e);
  }
 finally {
    if (c != null) {
      try {
        c.close();
      }
 catch (      SQLException e) {
        ;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Executed automatically when the bean is initialized.
 */
public void afterPropertiesSet() throws LiquibaseException {
  Connection c=null;
  try {
    c=getDataSource().getConnection();
    Migrator migrator=createMigrator(c);
    if (StringUtils.trimToNull(contexts) != null) {
      migrator.setContexts(contexts);
    }
    setup(migrator);
    if (isWriteSqlFileEnabled() && getSqlOutputDir() != null) {
      if (migrator.listUnrunChangeSets().size() > 0) {
        log.log(Level.WARNING,getExecuteDisabledWarningMessage());
      }
      writeSqlFile(migrator);
    }
    if (isExecuteEnabled()) {
      executeSql(migrator);
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
catch (  IOException e) {
    throw new LiquibaseException(e);
  }
 finally {
    if (c != null) {
      try {
        c.close();
      }
 catch (      SQLException e) {
        ;
      }
    }
  }
}
Program: 84198
Project: 84198
Buggy source:
private Migrator createMigrator(Connection c) throws IOException, JDBCException {
  Migrator m=new Migrator(getChangeLogResource().getURL().toString(),new SpringResourceOpener());
  m.init(c);
  return m;
}

Fixed version (ground truth):
private Migrator createMigrator(Connection c) throws IOException, JDBCException {
  Migrator m=new Migrator(getChangeLog(),new SpringResourceOpener(getChangeLog()));
  m.init(c);
  return m;
}
Program: 84199
Project: 84199
Buggy source:
@Test public void createTable_standard() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false).addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str");
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      assertNotNull(table.getColumn("String_Node_Str"));
      assertNotNull(table.getColumn("String_Node_Str"));
      assertTrue(table.getColumn("String_Node_Str").isPrimaryKey());
      assertNull(StringUtils.trimToNull(table.getColumn("String_Node_Str").getDefaultValue()));
      assertTrue(table.getColumn("String_Node_Str").getDefaultValue().indexOf("String_Node_Str") >= 0);
      assertFalse(table.getColumn("String_Node_Str").isAutoIncrement());
    }
  }
);
}

Fixed version (ground truth):
@Test public void createTable_standard() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str");
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      assertNotNull(table.getColumn("String_Node_Str"));
      assertNotNull(table.getColumn("String_Node_Str"));
      assertTrue(table.getColumn("String_Node_Str").isPrimaryKey());
      assertNull(StringUtils.trimToNull(table.getColumn("String_Node_Str").getDefaultValue()));
      assertTrue(table.getColumn("String_Node_Str").getDefaultValue().indexOf("String_Node_Str") >= 0);
      assertFalse(table.getColumn("String_Node_Str").isAutoIncrement());
    }
  }
);
}
Program: 84201
Project: 84201
Buggy source:
@Test public void createTable_autoincrementPK() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (!database.supportsAutoIncrement()) {
        return;
      }
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str",true).addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str");
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      assertTrue(table.getColumn("String_Node_Str").isPrimaryKey());
      assertTrue(table.getColumn("String_Node_Str").isAutoIncrement());
    }
  }
);
}

Fixed version (ground truth):
@Test public void createTable_autoincrementPK() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (!database.supportsAutoIncrement()) {
        return;
      }
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str");
      statement.addColumnConstraint(new AutoIncrementConstraint("String_Node_Str"));
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      assertTrue(table.getColumn("String_Node_Str").isPrimaryKey());
      assertTrue(table.getColumn("String_Node_Str").isAutoIncrement());
    }
  }
);
}
Program: 84202
Project: 84202
Buggy source:
@Test public void createTable_foreignKeyColumn() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      String foreignKeyName="String_Node_Str";
      ForeignKeyConstraint fkConstraint=new ForeignKeyConstraint(foreignKeyName,TABLE_NAME + "String_Node_Str");
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false).addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",fkConstraint);
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      ForeignKey foundForeignKey=snapshot.getForeignKey(foreignKeyName);
      assertNotNull(foundForeignKey);
      assertEquals(TABLE_NAME,foundForeignKey.getPrimaryKeyTable().getName().toUpperCase());
      assertEquals("String_Node_Str",foundForeignKey.getPrimaryKeyColumn().toUpperCase());
      assertEquals(TABLE_NAME,foundForeignKey.getForeignKeyTable().getName().toUpperCase());
      assertEquals("String_Node_Str",foundForeignKey.getForeignKeyColumn().toUpperCase());
    }
  }
);
}

Fixed version (ground truth):
@Test public void createTable_foreignKeyColumn() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      String foreignKeyName="String_Node_Str";
      ForeignKeyConstraint fkConstraint=new ForeignKeyConstraint(foreignKeyName,TABLE_NAME + "String_Node_Str");
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",fkConstraint);
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
      assertNotNull(table.getColumn("String_Node_Str"));
      ForeignKey foundForeignKey=snapshot.getForeignKey(foreignKeyName);
      assertNotNull(foundForeignKey);
      assertEquals(TABLE_NAME,foundForeignKey.getPrimaryKeyTable().getName().toUpperCase());
      assertEquals("String_Node_Str",foundForeignKey.getPrimaryKeyColumn().toUpperCase());
      assertEquals(TABLE_NAME,foundForeignKey.getForeignKeyTable().getName().toUpperCase());
      assertEquals("String_Node_Str",foundForeignKey.getForeignKeyColumn().toUpperCase());
    }
  }
);
}
Program: 84203
Project: 84203
Buggy source:
@Test public void addPrimaryKeyColumn_multiColumn(){
  CreateTableStatement statement=new CreateTableStatement("String_Node_Str");
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false);
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false);
  assertEquals(2,statement.getPrimaryKeyConstraint().getColumns().size());
}

Fixed version (ground truth):
@Test public void addPrimaryKeyColumn_multiColumn(){
  CreateTableStatement statement=new CreateTableStatement("String_Node_Str");
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str");
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str");
  assertEquals(2,statement.getPrimaryKeyConstraint().getColumns().size());
}
Program: 84204
Project: 84204
Buggy source:
@Test public void createTable_tablespace() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (!database.supportsTablespaces()) {
        return;
      }
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false).addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str").setTablespace("String_Node_Str");
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
    }
  }
);
}

Fixed version (ground truth):
@Test public void createTable_tablespace() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (!database.supportsTablespaces()) {
        return;
      }
      CreateTableStatement statement=new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str","String_Node_Str").setTablespace("String_Node_Str");
      new JdbcTemplate(database).execute(statement);
      DatabaseSnapshot snapshot=new DatabaseSnapshot(database);
      Table table=snapshot.getTable(TABLE_NAME);
      assertEquals(TABLE_NAME.toUpperCase(),table.getName().toUpperCase());
    }
  }
);
}