nus-yam/ex-repair huggingface dataset:
Program: 84205
Project: 84205
Buggy source:
@Test public void createTable_uniqueColumn() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (database instanceof HsqlDatabase) {
        return;
      }
      UniqueConstraint uniqueConstraint=new UniqueConstraint("String_Node_Str");
      NotNullConstraint notNullConstraint=new NotNullConstraint();
      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",uniqueConstraint,notNullConstraint);
      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"));
    }
  }
);
}

Fixed version (ground truth):
@Test public void createTable_uniqueColumn() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new DatabaseTest(){
    public void performTest(    Database database) throws JDBCException {
      if (database instanceof HsqlDatabase) {
        return;
      }
      UniqueConstraint uniqueConstraint=new UniqueConstraint("String_Node_Str");
      NotNullConstraint notNullConstraint=new NotNullConstraint();
      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",uniqueConstraint,notNullConstraint);
      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"));
    }
  }
);
}
Program: 84206
Project: 84206
Buggy source:
@Test public void addPrimaryKeyColumn_oneColumn(){
  CreateTableStatement statement=new CreateTableStatement("String_Node_Str");
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str",false);
  assertEquals(1,statement.getPrimaryKeyConstraint().getColumns().size());
}

Fixed version (ground truth):
@Test public void addPrimaryKeyColumn_oneColumn(){
  CreateTableStatement statement=new CreateTableStatement("String_Node_Str");
  statement.addPrimaryKeyColumn("String_Node_Str","String_Node_Str");
  assertEquals(1,statement.getPrimaryKeyConstraint().getColumns().size());
}
Program: 84209
Project: 84209
Buggy source:
public String getViewDefinition(String viewName) throws JDBCException {
  return (String)new JdbcTemplate(this).queryForObject(getViewDefinitionSql(viewName),String.class);
}

Fixed version (ground truth):
public String getViewDefinition(String viewName) throws JDBCException {
  String definition=(String)new JdbcTemplate(this).queryForObject(getViewDefinitionSql(viewName),String.class);
  return definition.replaceFirst("String_Node_Str","String_Node_Str");
}
Program: 84210
Project: 84210
Buggy source:
protected void dropViews(DatabaseConnection conn) throws JDBCException {
  ResultSet rs=null;
  try {
    rs=conn.getMetaData().getTables(getCatalogName(),getSchemaName(),null,new String[]{"String_Node_Str"});
    while (rs.next()) {
      String tableName=rs.getString("String_Node_Str");
      if (getSystemTablesAndViews().contains(tableName)) {
        continue;
      }
      DropViewChange dropChange=new DropViewChange();
      dropChange.setViewName(tableName);
      try {
        log.finest("String_Node_Str" + tableName);
        dropChange.executeStatements(this);
      }
 catch (      UnsupportedChangeException e) {
        throw new JDBCException("String_Node_Str" + tableName + "String_Node_Str"+ e.getMessage(),e);
      }
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
 finally {
    if (rs != null) {
      try {
        rs.close();
      }
 catch (      SQLException e) {
        throw new JDBCException(e);
      }
    }
  }
}

Fixed version (ground truth):
protected void dropViews(DatabaseConnection conn) throws JDBCException {
  ResultSet rs=null;
  try {
    rs=conn.getMetaData().getTables(getCatalogName(),getSchemaName(),null,new String[]{"String_Node_Str"});
    while (rs.next()) {
      String tableName=rs.getString("String_Node_Str");
      String schemaName=rs.getString("String_Node_Str");
      String catalogName=rs.getString("String_Node_Str");
      if (isSystemView(catalogName,schemaName,tableName)) {
        continue;
      }
      DropViewChange dropChange=new DropViewChange();
      dropChange.setViewName(tableName);
      try {
        log.finest("String_Node_Str" + tableName);
        dropChange.executeStatements(this);
      }
 catch (      UnsupportedChangeException e) {
        throw new JDBCException("String_Node_Str" + tableName + "String_Node_Str"+ e.getMessage(),e);
      }
    }
  }
 catch (  SQLException e) {
    throw new JDBCException(e);
  }
 finally {
    if (rs != null) {
      try {
        rs.close();
      }
 catch (      SQLException e) {
        throw new JDBCException(e);
      }
    }
  }
}
Program: 84211
Project: 84211
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn(COLUMN_NAME,COLUMN_TYPE).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn(COLUMN_NAME,COLUMN_TYPE).addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn(COLUMN_NAME,COLUMN_TYPE).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn(COLUMN_NAME,COLUMN_TYPE).addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84212
Project: 84212
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84213
Project: 84213
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(BASE_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(BASE_COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(REF_TABLE_NAME).addPrimaryKeyColumn(REF_COL_NAME,"String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,BASE_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(BASE_COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,REF_TABLE_NAME).addPrimaryKeyColumn(REF_COL_NAME,"String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,BASE_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(BASE_COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(null,REF_TABLE_NAME).addPrimaryKeyColumn(REF_COL_NAME,"String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,BASE_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(BASE_COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,REF_TABLE_NAME).addPrimaryKeyColumn(REF_COL_NAME,"String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84214
Project: 84214
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()).addColumn(COLUMN2_NAME,"String_Node_Str",new NotNullConstraint()),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()).addColumn(COLUMN2_NAME,"String_Node_Str",new NotNullConstraint()),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()).addColumn(COLUMN2_NAME,"String_Node_Str",new NotNullConstraint()),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()).addColumn(COLUMN2_NAME,"String_Node_Str",new NotNullConstraint()),database);
}
Program: 84215
Project: 84215
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn("String_Node_Str","String_Node_Str",new NotNullConstraint()).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str",new NotNullConstraint()).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str",new NotNullConstraint()).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str",new NotNullConstraint()).addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
}
Program: 84216
Project: 84216
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str").addColumn(COLUMN_NAME2,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str").addColumn(COLUMN_NAME2,"String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str").addColumn(COLUMN_NAME2,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str").addColumn(COLUMN_NAME2,"String_Node_Str"),database);
}
Program: 84217
Project: 84217
Buggy source:
protected SqlStatement generateTestStatement(){
  return new CreateTableStatement(null);
}

Fixed version (ground truth):
protected SqlStatement generateTestStatement(){
  return new CreateTableStatement(null,null);
}
Program: 84218
Project: 84218
Buggy source:
@Test public void execute_altSchema() throws Exception {
  final String definition="String_Node_Str" + TABLE_NAME;
  new DatabaseTestTemplate().testOnAvailableDatabases(new SqlStatementDatabaseTest(TestContext.ALT_SCHEMA,new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,definition)){
    protected boolean supportsTest(    Database database){
      return !(database instanceof HsqlDatabase || database instanceof OracleDatabase);
    }
    protected boolean expectedException(    Database database,    JDBCException exception){
      return !database.supportsSchemas();
    }
    protected void preExecuteAssert(    DatabaseSnapshot snapshot){
      assertNull(snapshot.getView(VIEW_NAME));
    }
    protected void postExecuteAssert(    DatabaseSnapshot snapshot){
      View view=snapshot.getView(VIEW_NAME);
      assertNotNull(view);
      assertEquals(2,view.getColumns().size());
    }
  }
);
}

Fixed version (ground truth):
@Test public void execute_altSchema() throws Exception {
  final String definition="String_Node_Str" + TestContext.ALT_SCHEMA + "String_Node_Str"+ TABLE_NAME;
  new DatabaseTestTemplate().testOnAvailableDatabases(new SqlStatementDatabaseTest(TestContext.ALT_SCHEMA,new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,definition)){
    protected boolean supportsTest(    Database database){
      return !(database instanceof HsqlDatabase || database instanceof OracleDatabase);
    }
    protected boolean expectedException(    Database database,    JDBCException exception){
      return !database.supportsSchemas();
    }
    protected void preExecuteAssert(    DatabaseSnapshot snapshot){
      assertNull(snapshot.getView(VIEW_NAME));
    }
    protected void postExecuteAssert(    DatabaseSnapshot snapshot){
      View view=snapshot.getView(VIEW_NAME);
      assertNotNull(view);
      assertEquals(2,view.getColumns().size());
    }
  }
);
}
Program: 84219
Project: 84219
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84220
Project: 84220
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str"),database);
}
Program: 84221
Project: 84221
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str","String_Node_Str"),database);
}
Program: 84222
Project: 84222
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropTableIfExists(null,TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(FK_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",new ForeignKeyConstraint(CONSTRAINT_NAME,FK_TABLE_NAME + "String_Node_Str")).addColumn("String_Node_Str","String_Node_Str"),database);
  dropTableIfExists(TestContext.ALT_SCHEMA,TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,FK_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",new ForeignKeyConstraint(ALT_SCHEMA_NAME,TestContext.ALT_SCHEMA + "String_Node_Str" + FK_TABLE_NAME+ "String_Node_Str")).addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropTableIfExists(null,TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(null,FK_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",new ForeignKeyConstraint(CONSTRAINT_NAME,FK_TABLE_NAME + "String_Node_Str")).addColumn("String_Node_Str","String_Node_Str"),database);
  dropTableIfExists(TestContext.ALT_SCHEMA,TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,FK_TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn("String_Node_Str","String_Node_Str",new ForeignKeyConstraint(ALT_SCHEMA_NAME,TestContext.ALT_SCHEMA + "String_Node_Str" + FK_TABLE_NAME+ "String_Node_Str")).addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84223
Project: 84223
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  new JdbcTemplate(database).execute(new CreateIndexStatement(IDX_NAME,null,TABLE_NAME,COLUMN_NAME));
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  if (database.supportsSchemas()) {
    new JdbcTemplate(database).execute(new CreateIndexStatement(ALT_IDX_NAME,TestContext.ALT_SCHEMA,TABLE_NAME,COLUMN_NAME));
  }
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  new JdbcTemplate(database).execute(new CreateIndexStatement(IDX_NAME,null,TABLE_NAME,COLUMN_NAME));
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COLUMN_NAME,"String_Node_Str",new NotNullConstraint()),database);
  if (database.supportsSchemas()) {
    new JdbcTemplate(database).execute(new CreateIndexStatement(ALT_IDX_NAME,TestContext.ALT_SCHEMA,TABLE_NAME,COLUMN_NAME));
  }
}
Program: 84224
Project: 84224
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new PrimaryKeyConstraint(PK_NAME).addColumns(COLUMN_NAME),new NotNullConstraint()).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new PrimaryKeyConstraint(PK_NAME).addColumns(COLUMN_NAME),new NotNullConstraint()).addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new PrimaryKeyConstraint(PK_NAME).addColumns(COLUMN_NAME),new NotNullConstraint()).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(COLUMN_NAME,"String_Node_Str",new PrimaryKeyConstraint(PK_NAME).addColumns(COLUMN_NAME),new NotNullConstraint()).addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84225
Project: 84225
Buggy source:
@Test public void execute_cascadeConstraints() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new SqlStatementDatabaseTest(null,new DropTableStatement(null,TABLE_NAME,true)){
    protected boolean expectedException(    Database database,    JDBCException exception){
      return database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof FirebirdDatabase;
    }
    protected void preExecuteAssert(    DatabaseSnapshot snapshot){
      assertNotNull(snapshot.getTable(TABLE_NAME));
    }
    protected void postExecuteAssert(    DatabaseSnapshot snapshot){
      assertNull(snapshot.getTable(TABLE_NAME));
    }
  }
);
}

Fixed version (ground truth):
@Test public void execute_cascadeConstraints() throws Exception {
  new DatabaseTestTemplate().testOnAvailableDatabases(new SqlStatementDatabaseTest(null,new DropTableStatement(null,TABLE_NAME,true)){
    protected boolean expectedException(    Database database,    JDBCException exception){
      return database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof FirebirdDatabase|| database instanceof MSSQLDatabase;
    }
    protected void preExecuteAssert(    DatabaseSnapshot snapshot){
      assertNotNull(snapshot.getTable(TABLE_NAME));
    }
    protected void postExecuteAssert(    DatabaseSnapshot snapshot){
      assertNull(snapshot.getTable(TABLE_NAME));
    }
  }
);
}
Program: 84226
Project: 84226
Buggy source:
protected boolean expectedException(Database database,JDBCException exception){
  return database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof FirebirdDatabase;
}

Fixed version (ground truth):
protected boolean expectedException(Database database,JDBCException exception){
  return database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof FirebirdDatabase|| database instanceof MSSQLDatabase;
}
Program: 84227
Project: 84227
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84228
Project: 84228
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,"String_Node_Str",new NotNullConstraint(),new UniqueConstraint(CONSTRAINT_NAME)),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,"String_Node_Str",new NotNullConstraint(),new UniqueConstraint(CONSTRAINT_NAME)),database);
}
Program: 84229
Project: 84229
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  new JdbcTemplate(database).execute(new CreateViewStatement(null,VIEW_NAME,"String_Node_Str" + TABLE_NAME));
  if (database.supportsSchemas()) {
    new JdbcTemplate(database).execute(new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,"String_Node_Str" + TestContext.ALT_SCHEMA + "String_Node_Str"+ TABLE_NAME));
  }
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  new JdbcTemplate(database).execute(new CreateViewStatement(null,VIEW_NAME,"String_Node_Str" + TABLE_NAME));
  if (database.supportsSchemas()) {
    new JdbcTemplate(database).execute(new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,"String_Node_Str" + TestContext.ALT_SCHEMA + "String_Node_Str"+ TABLE_NAME));
  }
}
Program: 84230
Project: 84230
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn(VARCHAR_COL_NAME,"String_Node_Str").addColumn(DATE_COL_NAME,"String_Node_Str").addColumn(BOOLEAN_COL_NAME,database.getBooleanType()).addColumn(INT_COL_NAME,"String_Node_Str").addColumn(FLOAT_COL_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(VARCHAR_COL_NAME,"String_Node_Str").addColumn(DATE_COL_NAME,"String_Node_Str").addColumn(BOOLEAN_COL_NAME,database.getBooleanType()).addColumn(INT_COL_NAME,"String_Node_Str").addColumn(FLOAT_COL_NAME,"String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn(VARCHAR_COL_NAME,"String_Node_Str").addColumn(DATE_COL_NAME,"String_Node_Str").addColumn(BOOLEAN_COL_NAME,database.getBooleanType()).addColumn(INT_COL_NAME,"String_Node_Str").addColumn(FLOAT_COL_NAME,"String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn(VARCHAR_COL_NAME,"String_Node_Str").addColumn(DATE_COL_NAME,"String_Node_Str").addColumn(BOOLEAN_COL_NAME,database.getBooleanType()).addColumn(INT_COL_NAME,"String_Node_Str").addColumn(FLOAT_COL_NAME,"String_Node_Str"),database);
}
Program: 84231
Project: 84231
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,DATA_TYPE),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,DATA_TYPE),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,DATA_TYPE),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str").addColumn(COL_NAME,DATA_TYPE),database);
}
Program: 84232
Project: 84232
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropTableIfExists(null,NEW_TABLE_NAME,database);
  dropTableIfExists(TestContext.ALT_SCHEMA,NEW_TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropTableIfExists(null,NEW_TABLE_NAME,database);
  dropTableIfExists(TestContext.ALT_SCHEMA,NEW_TABLE_NAME,database);
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84233
Project: 84233
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,NEW_VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,NEW_VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateView(new CreateViewStatement(null,VIEW_NAME,"String_Node_Str" + TABLE_NAME),database);
  dropAndCreateView(new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,"String_Node_Str" + TABLE_NAME),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropViewIfExists(null,NEW_VIEW_NAME,database);
  dropViewIfExists(TestContext.ALT_SCHEMA,NEW_VIEW_NAME,database);
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addPrimaryKeyColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateView(new CreateViewStatement(null,VIEW_NAME,"String_Node_Str" + TABLE_NAME),database);
  dropAndCreateView(new CreateViewStatement(TestContext.ALT_SCHEMA,VIEW_NAME,"String_Node_Str" + TABLE_NAME),database);
}
Program: 84234
Project: 84234
Buggy source:
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
}

Fixed version (ground truth):
protected void setupDatabase(Database database) throws Exception {
  dropAndCreateTable(new CreateTableStatement(null,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
  dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA,TABLE_NAME).addColumn("String_Node_Str","String_Node_Str"),database);
}
Program: 84236
Project: 84236
Buggy source:
public void run(){
  try {
    try {
      if (!connection.getAutoCommit()) {
        connection.rollback();
      }
    }
 catch (    SQLException e) {
      ;
    }
    connection.close();
  }
 catch (  SQLException e) {
    System.out.println("String_Node_Str" + url);
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    try {
      if (!databaseConnection.getAutoCommit()) {
        databaseConnection.rollback();
      }
    }
 catch (    SQLException e) {
      ;
    }
    databaseConnection.close();
  }
 catch (  SQLException e) {
    System.out.println("String_Node_Str" + url);
    e.printStackTrace();
  }
}
Program: 84237
Project: 84237
Buggy source:
public Set<Database> getAvailableDatabases() throws Exception {
  if (availableDatabases == null) {
    availableDatabases=new HashSet<Database>();
    for (    DatabaseConnection conn : getAvailableConnections()) {
      availableDatabases.add(DatabaseFactory.getInstance().findCorrectDatabaseImplementation(conn));
    }
  }
  return availableDatabases;
}

Fixed version (ground truth):
public Set<Database> getAvailableDatabases() throws Exception {
  if (availableDatabases.size() == 0) {
    for (    DatabaseConnection conn : getAvailableConnections()) {
      availableDatabases.add(DatabaseFactory.getInstance().findCorrectDatabaseImplementation(conn));
    }
  }
  return availableDatabases;
}
Program: 84238
Project: 84238
Buggy source:
public String convertRequestedSchemaToSchema(String requestedSchema) throws JDBCException {
  return requestedSchema;
}

Fixed version (ground truth):
public String convertRequestedSchemaToSchema(String requestedSchema) throws JDBCException {
  if (requestedSchema == null) {
    return "String_Node_Str";
  }
  return requestedSchema;
}
Program: 84239
Project: 84239
Buggy source:
public SqlStatement getViewDefinitionSql(String schemaName,String viewName) throws JDBCException {
  String sql="String_Node_Str" + viewName.toUpperCase() + "String_Node_Str";
  if (StringUtils.trimToNull(schemaName) != null) {
    sql+="String_Node_Str" + schemaName + "String_Node_Str";
  }
  return new RawSqlStatement(sql);
}

Fixed version (ground truth):
public SqlStatement getViewDefinitionSql(String schemaName,String viewName) throws JDBCException {
  String sql="String_Node_Str" + viewName.toUpperCase() + "String_Node_Str";
  sql+="String_Node_Str" + convertRequestedSchemaToSchema(schemaName) + "String_Node_Str";
  sql+="String_Node_Str" + getCatalogName() + "String_Node_Str";
  return new RawSqlStatement(sql);
}
Program: 84240
Project: 84240
Buggy source:
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  StringBuffer buffer=new StringBuffer();
  buffer.append("String_Node_Str").append(database.escapeTableName(getSchemaName(),getTableName()));
  if (isCascadeConstraints()) {
    if (database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof FirebirdDatabase) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    if (database instanceof OracleDatabase) {
      buffer.append("String_Node_Str");
    }
 else {
      buffer.append("String_Node_Str");
    }
  }
  return buffer.toString();
}

Fixed version (ground truth):
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  StringBuffer buffer=new StringBuffer();
  buffer.append("String_Node_Str").append(database.escapeTableName(getSchemaName(),getTableName()));
  if (isCascadeConstraints()) {
    if (database instanceof DerbyDatabase || database instanceof DB2Database || database instanceof MSSQLDatabase|| database instanceof FirebirdDatabase) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    if (database instanceof OracleDatabase) {
      buffer.append("String_Node_Str");
    }
 else {
      buffer.append("String_Node_Str");
    }
  }
  return buffer.toString();
}
Program: 84241
Project: 84241
Buggy source:
public ChangeSet(String id,String author,boolean alwaysRun,boolean runOnChange,DatabaseChangeLog databaseChangeLog,String contextList,String dbmsList){
  this.changes=new ArrayList<Change>();
  log=Logger.getLogger(Migrator.DEFAULT_LOG_NAME);
  this.id=id;
  this.author=author;
  this.databaseChangeLog=databaseChangeLog;
  this.alwaysRun=alwaysRun;
  this.runOnChange=runOnChange;
  if (StringUtils.trimToNull(contextList) != null) {
    String[] strings=contextList.toLowerCase().split("String_Node_Str");
    if (contexts == null) {
      contexts=new HashSet<String>();
    }
    for (    String string : strings) {
      contexts.add(string.trim().toLowerCase());
    }
  }
  if (StringUtils.trimToNull(dbmsList) != null) {
    String[] strings=dbmsList.toLowerCase().split("String_Node_Str");
    if (dbmsSet == null) {
      dbmsSet=new HashSet<String>();
    }
    for (    String string : strings) {
      dbmsSet.add(string.trim().toLowerCase());
    }
  }
}

Fixed version (ground truth):
public ChangeSet(String id,String author,boolean alwaysRun,boolean runOnChange,DatabaseChangeLog databaseChangeLog,String contextList,String dbmsList){
  this.changes=new ArrayList<Change>();
  log=Logger.getLogger(Migrator.DEFAULT_LOG_NAME);
  this.id=id;
  this.author=author;
  this.databaseChangeLog=databaseChangeLog;
  this.alwaysRun=alwaysRun;
  this.runOnChange=runOnChange;
  if (StringUtils.trimToNull(contextList) != null) {
    String[] strings=contextList.toLowerCase().split("String_Node_Str");
    contexts=new HashSet<String>();
    for (    String string : strings) {
      contexts.add(string.trim().toLowerCase());
    }
  }
  if (StringUtils.trimToNull(dbmsList) != null) {
    String[] strings=dbmsList.toLowerCase().split("String_Node_Str");
    dbmsSet=new HashSet<String>();
    for (    String string : strings) {
      dbmsSet.add(string.trim().toLowerCase());
    }
  }
}
Program: 84242
Project: 84242
Buggy source:
@SuppressWarnings({"String_Node_Str"}) public boolean isNullabilityDifferent(Column otherColumn){
  if (this.isNullable() == null && otherColumn.isNullable() == null) {
    return false;
  }
  if (this.isNullable() == null & otherColumn.isNullable() != null) {
    return true;
  }
  if (this.isNullable() != null & otherColumn.isNullable() == null) {
    return true;
  }
  return !this.isNullable().equals(otherColumn.isNullable());
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str"}) public boolean isNullabilityDifferent(Column otherColumn){
  if (this.isNullable() == null && otherColumn.isNullable() == null) {
    return false;
  }
  if (this.isNullable() == null && otherColumn.isNullable() != null) {
    return true;
  }
  if (this.isNullable() != null && otherColumn.isNullable() == null) {
    return true;
  }
  return !this.isNullable().equals(otherColumn.isNullable());
}
Program: 84243
Project: 84243
Buggy source:
public int compareTo(ForeignKey o){
  int returnValue=0;
  if (this.getForeignKeyTable() != null & o.getForeignKeyTable() != null) {
    returnValue=this.getForeignKeyTable().compareTo(o.getForeignKeyTable());
  }
  if (returnValue == 0 && this.getForeignKeyColumn() != null & o.getForeignKeyColumn() != null) {
    returnValue=this.getForeignKeyColumn().compareTo(o.getForeignKeyColumn());
  }
  if (returnValue == 0 && this.getPrimaryKeyTable() != null & o.getPrimaryKeyTable() != null) {
    returnValue=this.getPrimaryKeyTable().compareTo(o.getPrimaryKeyTable());
  }
  if (returnValue == 0 && this.getPrimaryKeyColumn() != null & o.getPrimaryKeyColumn() != null) {
    returnValue=this.getPrimaryKeyColumn().compareTo(o.getPrimaryKeyColumn());
  }
  return returnValue;
}

Fixed version (ground truth):
public int compareTo(ForeignKey o){
  int returnValue=0;
  if (this.getForeignKeyTable() != null && o.getForeignKeyTable() != null) {
    returnValue=this.getForeignKeyTable().compareTo(o.getForeignKeyTable());
  }
  if (returnValue == 0 && this.getForeignKeyColumn() != null && o.getForeignKeyColumn() != null) {
    returnValue=this.getForeignKeyColumn().compareTo(o.getForeignKeyColumn());
  }
  if (returnValue == 0 && this.getPrimaryKeyTable() != null && o.getPrimaryKeyTable() != null) {
    returnValue=this.getPrimaryKeyTable().compareTo(o.getPrimaryKeyTable());
  }
  if (returnValue == 0 && this.getPrimaryKeyColumn() != null && o.getPrimaryKeyColumn() != null) {
    returnValue=this.getPrimaryKeyColumn().compareTo(o.getPrimaryKeyColumn());
  }
  return returnValue;
}
Program: 84245
Project: 84245
Buggy source:
public void testAbsolutePathChangeLog() throws Exception {
  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('/','\\');
  }
  Migrator migrator=createMigrator(absolutePathOfChangeLog,new FileSystemFileOpener());
  migrator.dropAll();
  migrator.migrate();
  migrator.migrate();
  migrator.dropAll();
}

Fixed version (ground truth):
public void testAbsolutePathChangeLog() throws Exception {
  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();
  migrator.migrate();
  migrator.migrate();
  migrator.dropAll();
}
Program: 84246
Project: 84246
Buggy source:
protected Migrator createMigrator(String changeLogFile) throws Exception {
  JUnitFileOpener fileOpener=new JUnitFileOpener();
  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 {
  Migrator migrator=new Migrator(changeLogFile,fileOpener);
  migrator.setContexts("String_Node_Str");
  migrator.init(connection);
  return migrator;
}
Program: 84247
Project: 84247
Buggy source:
protected AbstractSimpleChangeLogRunnerTest(String changelogDir,String driverName,String url){
  this.completeChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.rollbackChangeLog="String_Node_Str" + changelogDir + "String_Node_Str";
  this.driverName=driverName;
  this.url=url;
  username="String_Node_Str";
  password="String_Node_Str";
  Logger.getLogger(Migrator.DEFAULT_LOG_NAME).setLevel(Level.OFF);
}

Fixed version (ground truth):
protected AbstractSimpleChangeLogRunnerTest(String changelogDir,String driverName,String url){
  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.driverName=driverName;
  this.url=url;
  username="String_Node_Str";
  password="String_Node_Str";
  Logger.getLogger(Migrator.DEFAULT_LOG_NAME).setLevel(Level.OFF);
}
Program: 84248
Project: 84248
Buggy source:
public Enumeration<URL> getResources(String packageName) throws IOException {
  String directoryPath=(new File(packageName).isAbsolute() || baseDirectory == null) ? packageName : baseDirectory + File.separator + packageName;
  File[] files=new File(directoryPath).listFiles();
  List<URL> results=new ArrayList<URL>();
  for (  File f : files) {
    results.add(new URL("String_Node_Str" + f.getCanonicalPath()));
  }
  final Iterator<URL> it=results.iterator();
  Enumeration<URL> eURL=new Enumeration<URL>(){
    public boolean hasMoreElements(){
      return it.hasNext();
    }
    public URL nextElement(){
      return it.next();
    }
  }
;
  return eURL;
}

Fixed version (ground truth):
public Enumeration<URL> getResources(String packageName) throws IOException {
  String directoryPath=(new File(packageName).isAbsolute() || baseDirectory == null) ? packageName : baseDirectory + File.separator + packageName;
  File[] files=new File(directoryPath).listFiles();
  List<URL> results=new ArrayList<URL>();
  for (  File f : files) {
    results.add(new URL("String_Node_Str" + f.getCanonicalPath()));
  }
  final Iterator<URL> it=results.iterator();
  return new Enumeration<URL>(){
    public boolean hasMoreElements(){
      return it.hasNext();
    }
    public URL nextElement(){
      return it.next();
    }
  }
;
}
Program: 84251
Project: 84251
Buggy source:
@Test public void getUUIDType(){
  assertNull(getDatabase().getUUIDType());
}

Fixed version (ground truth):
@Test public void getUUIDType(){
  assertEquals("String_Node_Str",getDatabase().getUUIDType());
}
Program: 84252
Project: 84252
Buggy source:
@Test public void getUUIDType(){
  assertNull(getDatabase().getUUIDType());
}

Fixed version (ground truth):
@Test public void getUUIDType(){
  assertEquals("String_Node_Str",getDatabase().getUUIDType());
}
Program: 84253
Project: 84253
Buggy source:
protected SqlStatement getViewDefinitionSql(String name) throws JDBCException {
  String sql="String_Node_Str" + name + "String_Node_Str";
  if (getSchemaName() != null) {
    sql+="String_Node_Str" + getSchemaName() + "String_Node_Str";
  }
  if (getCatalogName() != null) {
    sql+="String_Node_Str" + getCatalogName() + "String_Node_Str";
  }
  return new RawSqlStatement(sql);
}

Fixed version (ground truth):
protected SqlStatement getViewDefinitionSql(String viewName) throws JDBCException {
  String sql="String_Node_Str" + viewName + "String_Node_Str";
  if (getSchemaName() != null) {
    sql+="String_Node_Str" + getSchemaName() + "String_Node_Str";
  }
  if (getCatalogName() != null) {
    sql+="String_Node_Str" + getCatalogName() + "String_Node_Str";
  }
  return new RawSqlStatement(sql);
}
Program: 84254
Project: 84254
Buggy source:
public String getViewDefinition(String name) throws JDBCException {
  return (String)new JdbcTemplate(this).queryForObject(getViewDefinitionSql(name),String.class);
}

Fixed version (ground truth):
public String getViewDefinition(String viewName) throws JDBCException {
  return (String)new JdbcTemplate(this).queryForObject(getViewDefinitionSql(viewName),String.class);
}
Program: 84255
Project: 84255
Buggy source:
protected String getUUIDType(){
  return null;
}

Fixed version (ground truth):
protected String getUUIDType(){
  return "String_Node_Str";
}
Program: 84256
Project: 84256
Buggy source:
protected String getUUIDType(){
  return null;
}

Fixed version (ground truth):
protected String getUUIDType(){
  return "String_Node_Str";
}