nus-yam/ex-repair huggingface dataset:
Program: 84104
Project: 84104
Buggy source:
public CreateTableStatement addPrimaryKeyColumn(String columnName,String keyName,String columnType,ColumnConstraint... constraints){
  PrimaryKeyConstraint pkConstraint=new PrimaryKeyConstraint(keyName);
  pkConstraint.addColumns(columnName);
  List<ColumnConstraint> allConstraints=new ArrayList<ColumnConstraint>();
  allConstraints.addAll(Arrays.asList(constraints));
  allConstraints.add(new NotNullConstraint(columnName));
  allConstraints.add(pkConstraint);
  addColumn(columnName,columnType,allConstraints.toArray(new ColumnConstraint[allConstraints.size()]));
  return this;
}

Fixed version (ground truth):
public CreateTableStatement addPrimaryKeyColumn(String columnName,String columnType,String keyName,ColumnConstraint... constraints){
  PrimaryKeyConstraint pkConstraint=new PrimaryKeyConstraint(keyName);
  pkConstraint.addColumns(columnName);
  List<ColumnConstraint> allConstraints=new ArrayList<ColumnConstraint>();
  allConstraints.addAll(Arrays.asList(constraints));
  allConstraints.add(new NotNullConstraint(columnName));
  allConstraints.add(pkConstraint);
  addColumn(columnName,columnType,allConstraints.toArray(new ColumnConstraint[allConstraints.size()]));
  return this;
}
Program: 84108
Project: 84108
Buggy source:
public String escapeColumnNameList(String columnNames){
  StringBuffer sb=new StringBuffer();
  for (  String columnName : columnNames.split("String_Node_Str")) {
    if (sb.length() > 0) {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str").append(columnName).append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
public String escapeColumnNameList(String columnNames){
  StringBuffer sb=new StringBuffer();
  for (  String columnName : columnNames.split("String_Node_Str")) {
    if (sb.length() > 0) {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str").append(columnName.trim()).append("String_Node_Str");
  }
  return sb.toString();
}
Program: 84110
Project: 84110
Buggy source:
public void removeRanStatus(ChangeSet changeSet) throws JDBCException {
  String sql="String_Node_Str";
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getId()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getAuthor()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getFilePath()));
  this.getJdbcTemplate().execute(new RawSqlStatement(sql));
  commit();
}

Fixed version (ground truth):
public void removeRanStatus(ChangeSet changeSet) throws JDBCException {
  String sql="String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName()) + "String_Node_Str";
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getId()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getAuthor()));
  sql=sql.replaceFirst("String_Node_Str",escapeStringForDatabase(changeSet.getFilePath()));
  this.getJdbcTemplate().execute(new RawSqlStatement(sql));
  commit();
}
Program: 84111
Project: 84111
Buggy source:
@Test public void generateStatement_primaryKey() throws Exception {
  AddColumnChange refactoring=new AddColumnChange();
  refactoring.setSchemaName("String_Node_Str");
  refactoring.setTableName("String_Node_Str");
  ColumnConfig column=new ColumnConfig();
  column.setName("String_Node_Str");
  column.setType("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setNullable(Boolean.FALSE);
  constraints.setPrimaryKey(Boolean.TRUE);
  column.setConstraints(constraints);
  refactoring.addColumn(column);
  SqlStatement[] sqlStatements=refactoring.generateStatements(new MockDatabase());
  assertEquals(2,sqlStatements.length);
  assertTrue(sqlStatements[0] instanceof AddColumnStatement);
  assertFalse(((AddColumnStatement)sqlStatements[0]).isPrimaryKey());
}

Fixed version (ground truth):
@Test public void generateStatement_primaryKey() throws Exception {
  AddColumnChange refactoring=new AddColumnChange();
  refactoring.setSchemaName("String_Node_Str");
  refactoring.setTableName("String_Node_Str");
  ColumnConfig column=new ColumnConfig();
  column.setName("String_Node_Str");
  column.setType("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setNullable(Boolean.FALSE);
  constraints.setPrimaryKey(Boolean.TRUE);
  column.setConstraints(constraints);
  refactoring.addColumn(column);
  SqlStatement[] sqlStatements=refactoring.generateStatements(new MockDatabase());
  assertEquals(1,sqlStatements.length);
  assertTrue(sqlStatements[0] instanceof AddColumnStatement);
  assertTrue(((AddColumnStatement)sqlStatements[0]).isPrimaryKey());
}
Program: 84112
Project: 84112
Buggy source:
@Test public void generateStatement_autoIncrement() throws Exception {
  AddColumnChange refactoring=new AddColumnChange();
  refactoring.setSchemaName("String_Node_Str");
  refactoring.setTableName("String_Node_Str");
  ColumnConfig column=new ColumnConfig();
  column.setName("String_Node_Str");
  column.setType("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setNullable(Boolean.FALSE);
  constraints.setPrimaryKey(Boolean.TRUE);
  column.setAutoIncrement(Boolean.TRUE);
  column.setConstraints(constraints);
  refactoring.addColumn(column);
  SqlStatement[] sqlStatements=refactoring.generateStatements(new MockDatabase());
  assertEquals(2,sqlStatements.length);
  assertTrue(sqlStatements[0] instanceof AddColumnStatement);
  assertFalse(((AddColumnStatement)sqlStatements[0]).isPrimaryKey());
}

Fixed version (ground truth):
@Test public void generateStatement_autoIncrement() throws Exception {
  AddColumnChange refactoring=new AddColumnChange();
  refactoring.setSchemaName("String_Node_Str");
  refactoring.setTableName("String_Node_Str");
  ColumnConfig column=new ColumnConfig();
  column.setName("String_Node_Str");
  column.setType("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setNullable(Boolean.FALSE);
  constraints.setPrimaryKey(Boolean.TRUE);
  column.setAutoIncrement(Boolean.TRUE);
  column.setConstraints(constraints);
  refactoring.addColumn(column);
  SqlStatement[] sqlStatements=refactoring.generateStatements(new MockDatabase());
  assertEquals(1,sqlStatements.length);
  assertTrue(sqlStatements[0] instanceof AddColumnStatement);
  assertTrue(((AddColumnStatement)sqlStatements[0]).isPrimaryKey());
  assertTrue(((AddColumnStatement)sqlStatements[0]).isAutoIncrement());
}
Program: 84114
Project: 84114
Buggy source:
private boolean isAutoIncrement(){
  for (  ColumnConstraint constraint : getConstraints()) {
    if (constraint instanceof AutoIncrementConstraint) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isAutoIncrement(){
  for (  ColumnConstraint constraint : getConstraints()) {
    if (constraint instanceof AutoIncrementConstraint) {
      return true;
    }
  }
  return false;
}
Program: 84115
Project: 84115
Buggy source:
public SqlStatement[] generateStatements(Database database) throws UnsupportedChangeException {
  Object defaultValue=null;
  try {
    if (getDefaultValue() != null) {
      defaultValue=getDefaultValue();
    }
 else     if (getDefaultValueBoolean() != null) {
      defaultValue=Boolean.valueOf(getDefaultValueBoolean());
    }
 else     if (getDefaultValueNumeric() != null) {
      defaultValue=NumberFormat.getInstance().parse(getDefaultValueNumeric());
    }
 else     if (getDefaultValueDate() != null) {
      defaultValue=new ISODateFormat().parse(getDefaultValueDate());
    }
  }
 catch (  ParseException e) {
    throw new RuntimeException(e);
  }
  return new SqlStatement[]{new AddDefaultValueStatement(getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName(),getTableName(),getColumnName(),defaultValue)};
}

Fixed version (ground truth):
public SqlStatement[] generateStatements(Database database) throws UnsupportedChangeException {
  Object defaultValue=null;
  if (getDefaultValue() != null) {
    defaultValue=getDefaultValue();
  }
 else   if (getDefaultValueBoolean() != null) {
    defaultValue=Boolean.valueOf(getDefaultValueBoolean());
  }
 else   if (getDefaultValueNumeric() != null) {
    try {
      defaultValue=NumberFormat.getInstance().parse(getDefaultValueNumeric());
    }
 catch (    ParseException e) {
      defaultValue=new ComputedNumericValue(getDefaultValueNumeric());
    }
  }
 else   if (getDefaultValueDate() != null) {
    try {
      defaultValue=new ISODateFormat().parse(getDefaultValueDate());
    }
 catch (    ParseException e) {
      defaultValue=new ComputedDateValue(getDefaultValueDate());
    }
  }
  return new SqlStatement[]{new AddDefaultValueStatement(getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName(),getTableName(),getColumnName(),defaultValue)};
}
Program: 84116
Project: 84116
Buggy source:
public String convertJavaObjectToString(Object value){
  if (value != null) {
    if (value instanceof String) {
      if ("String_Node_Str".equalsIgnoreCase(((String)value))) {
        return null;
      }
      return "String_Node_Str" + ((String)value).replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
    }
 else     if (value instanceof Number) {
      return value.toString();
    }
 else     if (value instanceof Boolean) {
      String returnValue;
      if (((Boolean)value)) {
        returnValue=this.getTrueBooleanValue();
      }
 else {
        returnValue=this.getFalseBooleanValue();
      }
      if (returnValue.matches("String_Node_Str")) {
        return returnValue;
      }
 else {
        return "String_Node_Str" + returnValue + "String_Node_Str";
      }
    }
 else     if (value instanceof java.sql.Date) {
      return this.getDateLiteral(((java.sql.Date)value));
    }
 else     if (value instanceof java.sql.Time) {
      return this.getDateLiteral(((java.sql.Time)value));
    }
 else     if (value instanceof java.sql.Timestamp) {
      return this.getDateLiteral(((java.sql.Timestamp)value));
    }
 else {
      throw new RuntimeException("String_Node_Str" + value.getClass().getName());
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public String convertJavaObjectToString(Object value){
  if (value != null) {
    if (value instanceof String) {
      if ("String_Node_Str".equalsIgnoreCase(((String)value))) {
        return null;
      }
      return "String_Node_Str" + ((String)value).replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
    }
 else     if (value instanceof Number) {
      return value.toString();
    }
 else     if (value instanceof Boolean) {
      String returnValue;
      if (((Boolean)value)) {
        returnValue=this.getTrueBooleanValue();
      }
 else {
        returnValue=this.getFalseBooleanValue();
      }
      if (returnValue.matches("String_Node_Str")) {
        return returnValue;
      }
 else {
        return "String_Node_Str" + returnValue + "String_Node_Str";
      }
    }
 else     if (value instanceof java.sql.Date) {
      return this.getDateLiteral(((java.sql.Date)value));
    }
 else     if (value instanceof java.sql.Time) {
      return this.getDateLiteral(((java.sql.Time)value));
    }
 else     if (value instanceof java.sql.Timestamp) {
      return this.getDateLiteral(((java.sql.Timestamp)value));
    }
 else     if (value instanceof ComputedDateValue) {
      return ((ComputedDateValue)value).getValue();
    }
 else {
      throw new RuntimeException("String_Node_Str" + value.getClass().getName());
    }
  }
 else {
    return null;
  }
}
Program: 84119
Project: 84119
Buggy source:
public UniqueConstraint(String name,Table table,Column... columns){
  this.table=table;
  this.columns.addAll(Arrays.asList(columns));
}

Fixed version (ground truth):
public UniqueConstraint(String name,Table table,Column... columns){
  this.name=name;
  this.table=table;
  this.columns.addAll(Arrays.asList(columns));
}
Program: 84120
Project: 84120
Buggy source:
protected void writeBody(FileWriter fileWriter,Object object,List<Change> ranChanges,List<Change> changesToRun,Migrator migrator) throws IOException {
  if (changesToRun.size() == 0) {
    fileWriter.append("String_Node_Str");
  }
  fileWriter.append("String_Node_Str");
  ChangeSet lastRunChangeSet=null;
  for (  Change change : changesToRun) {
    ChangeSet thisChangeSet=change.getChangeSet();
    if (thisChangeSet.equals(lastRunChangeSet)) {
      continue;
    }
    lastRunChangeSet=thisChangeSet;
    String anchor=thisChangeSet.toString(false).replaceAll("String_Node_Str","String_Node_Str");
    fileWriter.append("String_Node_Str").append(anchor).append("String_Node_Str");
    try {
      thisChangeSet.execute(null);
    }
 catch (    MigrationFailedException e) {
      fileWriter.append("String_Node_Str").append(change.getChangeName()).append("String_Node_Str").append(e.getMessage()).append("String_Node_Str");
    }
  }
  fileWriter.append("String_Node_Str");
}

Fixed version (ground truth):
protected void writeBody(FileWriter fileWriter,Object object,List<Change> ranChanges,List<Change> changesToRun,Migrator migrator) throws IOException {
  if (changesToRun.size() == 0) {
    fileWriter.append("String_Node_Str");
  }
  fileWriter.append("String_Node_Str");
  ChangeSet lastRunChangeSet=null;
  for (  Change change : changesToRun) {
    ChangeSet thisChangeSet=change.getChangeSet();
    if (thisChangeSet.equals(lastRunChangeSet)) {
      continue;
    }
    lastRunChangeSet=thisChangeSet;
    String anchor=thisChangeSet.toString(false).replaceAll("String_Node_Str","String_Node_Str");
    fileWriter.append("String_Node_Str").append(anchor).append("String_Node_Str");
    try {
      thisChangeSet.execute(migrator.getDatabase());
    }
 catch (    MigrationFailedException e) {
      fileWriter.append("String_Node_Str").append(change.getChangeName()).append("String_Node_Str").append(e.getMessage()).append("String_Node_Str");
    }
  }
  fileWriter.append("String_Node_Str");
}
Program: 84121
Project: 84121
Buggy source:
/** 
 * Tags the database changelog with the given string.
 */
public void tag(String tagString) throws JDBCException {
  try {
    int totalRows=this.getJdbcTemplate().queryForInt(new RawSqlStatement("String_Node_Str" + getDatabaseChangeLogTableName()));
    if (totalRows == 0) {
      throw new JDBCException("String_Node_Str");
    }
    Timestamp lastExecutedDate=(Timestamp)this.getJdbcTemplate().queryForObject(createChangeToTagSQL(),Timestamp.class);
    int rowsUpdated=this.getJdbcTemplate().update(createTagSQL(tagString,lastExecutedDate));
    if (rowsUpdated == 0) {
      throw new JDBCException("String_Node_Str");
    }
    this.commit();
  }
 catch (  Exception e) {
    throw new JDBCException(e);
  }
}

Fixed version (ground truth):
/** 
 * Tags the database changelog with the given string.
 */
public void tag(String tagString) throws JDBCException {
  try {
    int totalRows=this.getJdbcTemplate().queryForInt(new RawSqlStatement("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName())));
    if (totalRows == 0) {
      throw new JDBCException("String_Node_Str");
    }
    Timestamp lastExecutedDate=(Timestamp)this.getJdbcTemplate().queryForObject(createChangeToTagSQL(),Timestamp.class);
    int rowsUpdated=this.getJdbcTemplate().update(createTagSQL(tagString,lastExecutedDate));
    if (rowsUpdated == 0) {
      throw new JDBCException("String_Node_Str" + lastExecutedDate.toString());
    }
    this.commit();
  }
 catch (  Exception e) {
    throw new JDBCException(e);
  }
}
Program: 84122
Project: 84122
Buggy source:
/** 
 * Returns SQL to return the date of the most recient changeset execution.
 */
protected SqlStatement createChangeToTagSQL(){
  return new RawSqlStatement("String_Node_Str" + getDatabaseChangeLogTableName());
}

Fixed version (ground truth):
/** 
 * Returns SQL to return the date of the most recient changeset execution.
 */
protected SqlStatement createChangeToTagSQL(){
  return new RawSqlStatement("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName()));
}
Program: 84123
Project: 84123
Buggy source:
/** 
 * Returns the ChangeSets that have been run against the current database.
 */
public List<RanChangeSet> getRanChangeSetList() throws JDBCException {
  try {
    String databaseChangeLogTableName=getDatabaseChangeLogTableName();
    List<RanChangeSet> ranChangeSetList=new ArrayList<RanChangeSet>();
    if (doesChangeLogTableExist()) {
      log.info("String_Node_Str" + databaseChangeLogTableName);
      String sql="String_Node_Str" + databaseChangeLogTableName + "String_Node_Str".toUpperCase();
      Statement statement=getConnection().createStatement();
      ResultSet rs=statement.executeQuery(sql);
      while (rs.next()) {
        String fileName=rs.getString("String_Node_Str");
        String author=rs.getString("String_Node_Str");
        String id=rs.getString("String_Node_Str");
        String md5sum=rs.getString("String_Node_Str");
        Date dateExecuted=rs.getTimestamp("String_Node_Str");
        String tag=rs.getString("String_Node_Str");
        RanChangeSet ranChangeSet=new RanChangeSet(fileName,id,author,md5sum,dateExecuted,tag);
        ranChangeSetList.add(ranChangeSet);
      }
      rs.close();
      statement.close();
    }
    return ranChangeSetList;
  }
 catch (  SQLException e) {
    if (!getJdbcTemplate().executesStatements()) {
      return new ArrayList<RanChangeSet>();
    }
 else {
      throw new JDBCException(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the ChangeSets that have been run against the current database.
 */
public List<RanChangeSet> getRanChangeSetList() throws JDBCException {
  try {
    String databaseChangeLogTableName=escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName());
    List<RanChangeSet> ranChangeSetList=new ArrayList<RanChangeSet>();
    if (doesChangeLogTableExist()) {
      log.info("String_Node_Str" + databaseChangeLogTableName);
      String sql="String_Node_Str" + databaseChangeLogTableName + "String_Node_Str".toUpperCase();
      Statement statement=getConnection().createStatement();
      ResultSet rs=statement.executeQuery(sql);
      while (rs.next()) {
        String fileName=rs.getString("String_Node_Str");
        String author=rs.getString("String_Node_Str");
        String id=rs.getString("String_Node_Str");
        String md5sum=rs.getString("String_Node_Str");
        Date dateExecuted=rs.getTimestamp("String_Node_Str");
        String tag=rs.getString("String_Node_Str");
        RanChangeSet ranChangeSet=new RanChangeSet(fileName,id,author,md5sum,dateExecuted,tag);
        ranChangeSetList.add(ranChangeSet);
      }
      rs.close();
      statement.close();
    }
    return ranChangeSetList;
  }
 catch (  SQLException e) {
    if (!getJdbcTemplate().executesStatements()) {
      return new ArrayList<RanChangeSet>();
    }
 else {
      throw new JDBCException(e);
    }
  }
}
Program: 84125
Project: 84125
Buggy source:
public boolean doesTagExist(String tag) throws JDBCException {
  int count=this.getJdbcTemplate().queryForInt(new RawSqlStatement("String_Node_Str" + getDatabaseChangeLogTableName() + "String_Node_Str"+ tag+ "String_Node_Str"));
  return count > 0;
}

Fixed version (ground truth):
public boolean doesTagExist(String tag) throws JDBCException {
  int count=this.getJdbcTemplate().queryForInt(new RawSqlStatement("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName()) + "String_Node_Str"+ tag+ "String_Node_Str"));
  return count > 0;
}
Program: 84126
Project: 84126
Buggy source:
/** 
 * Returns the run status for the given ChangeSet
 */
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws JDBCException, DatabaseHistoryException {
  if (!doesChangeLogTableExist()) {
    return ChangeSet.RunStatus.NOT_RAN;
  }
  RanChangeSet foundRan=getRanChangeSet(changeSet);
  if (foundRan == null) {
    return ChangeSet.RunStatus.NOT_RAN;
  }
 else {
    if (foundRan.getMd5sum() == null) {
      try {
        log.info("String_Node_Str" + changeSet.toString());
        DatabaseConnection connection=getConnection();
        PreparedStatement updatePstmt=connection.prepareStatement("String_Node_Str" + getDatabaseChangeLogTableName() + "String_Node_Str");
        updatePstmt.setString(1,changeSet.getMd5sum());
        updatePstmt.setString(2,changeSet.getId());
        updatePstmt.setString(3,changeSet.getAuthor());
        updatePstmt.setString(4,changeSet.getFilePath());
        updatePstmt.executeUpdate();
        updatePstmt.close();
        this.commit();
      }
 catch (      SQLException e) {
        throw new JDBCException(e);
      }
      return ChangeSet.RunStatus.ALREADY_RAN;
    }
 else {
      if (foundRan.getMd5sum().equals(changeSet.getMd5sum())) {
        return ChangeSet.RunStatus.ALREADY_RAN;
      }
 else {
        if (changeSet.shouldRunOnChange()) {
          return ChangeSet.RunStatus.RUN_AGAIN;
        }
 else {
          return ChangeSet.RunStatus.INVALID_MD5SUM;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the run status for the given ChangeSet
 */
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws JDBCException, DatabaseHistoryException {
  if (!doesChangeLogTableExist()) {
    return ChangeSet.RunStatus.NOT_RAN;
  }
  RanChangeSet foundRan=getRanChangeSet(changeSet);
  if (foundRan == null) {
    return ChangeSet.RunStatus.NOT_RAN;
  }
 else {
    if (foundRan.getMd5sum() == null) {
      try {
        log.info("String_Node_Str" + changeSet.toString());
        DatabaseConnection connection=getConnection();
        PreparedStatement updatePstmt=connection.prepareStatement("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName()) + "String_Node_Str");
        updatePstmt.setString(1,changeSet.getMd5sum());
        updatePstmt.setString(2,changeSet.getId());
        updatePstmt.setString(3,changeSet.getAuthor());
        updatePstmt.setString(4,changeSet.getFilePath());
        updatePstmt.executeUpdate();
        updatePstmt.close();
        this.commit();
      }
 catch (      SQLException e) {
        throw new JDBCException(e);
      }
      return ChangeSet.RunStatus.ALREADY_RAN;
    }
 else {
      if (foundRan.getMd5sum().equals(changeSet.getMd5sum())) {
        return ChangeSet.RunStatus.ALREADY_RAN;
      }
 else {
        if (changeSet.shouldRunOnChange()) {
          return ChangeSet.RunStatus.RUN_AGAIN;
        }
 else {
          return ChangeSet.RunStatus.INVALID_MD5SUM;
        }
      }
    }
  }
}
Program: 84127
Project: 84127
Buggy source:
/** 
 * Returns SQL to tag the database.  SQL Contains two ?: <ol> <li>tag string</li> <li>date executed</li> </ol>
 */
protected SqlStatement createTagSQL(String tagName,Date dateExecuted){
  UpdateStatement statement=new UpdateStatement(null,getDatabaseChangeLogTableName());
  statement.addNewColumnValue("String_Node_Str",tagName);
  statement.setWhereClause("String_Node_Str");
  statement.addWhereParameter(dateExecuted);
  return statement;
}

Fixed version (ground truth):
/** 
 * Returns SQL to tag the database.  SQL Contains two ?: <ol> <li>tag string</li> <li>date executed</li> </ol>
 */
protected SqlStatement createTagSQL(String tagName,Date dateExecuted){
  UpdateStatement statement=new UpdateStatement(getDefaultSchemaName(),getDatabaseChangeLogTableName());
  statement.addNewColumnValue("String_Node_Str",tagName);
  statement.setWhereClause("String_Node_Str");
  statement.addWhereParameter(dateExecuted);
  return statement;
}
Program: 84129
Project: 84129
Buggy source:
protected SqlStatement getCreateChangeLogLockSQL(){
  return new RawSqlStatement(("String_Node_Str" + getDatabaseChangeLogLockTableName() + "String_Node_Str"+ getBooleanType()+ "String_Node_Str"+ getDateTimeType()+ "String_Node_Str"));
}

Fixed version (ground truth):
protected SqlStatement getCreateChangeLogLockSQL(){
  return new RawSqlStatement(("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogLockTableName()) + "String_Node_Str"+ getBooleanType()+ "String_Node_Str"+ getDateTimeType()+ "String_Node_Str"));
}
Program: 84130
Project: 84130
Buggy source:
protected SqlStatement getCreateChangeLogSQL(){
  return new RawSqlStatement(("String_Node_Str" + getDatabaseChangeLogTableName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ getDateTimeType()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"));
}

Fixed version (ground truth):
protected SqlStatement getCreateChangeLogSQL(){
  return new RawSqlStatement(("String_Node_Str" + escapeTableName(getDefaultSchemaName(),getDatabaseChangeLogTableName()) + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ getDateTimeType()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"));
}
Program: 84132
Project: 84132
Buggy source:
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  if (getTableSchemaName() != null && !database.supportsSchemas()) {
    throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
  }
  if (database instanceof MySQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + getIndexName() + "String_Node_Str"+ database.escapeTableName(getTableSchemaName(),getTableName());
  }
 else   if (database instanceof MSSQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + database.escapeTableName(getTableSchemaName(),getTableName()) + "String_Node_Str"+ getIndexName();
  }
 else   if (database instanceof OracleDatabase) {
    return "String_Node_Str" + getIndexName();
  }
  return "String_Node_Str" + getIndexName();
}

Fixed version (ground truth):
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  String schemaName=getTableSchemaName();
  if (schemaName != null && !database.supportsSchemas()) {
    throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
  }
  if (database instanceof MySQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + getIndexName() + "String_Node_Str"+ database.escapeTableName(schemaName,getTableName());
  }
 else   if (database instanceof MSSQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + database.escapeTableName(schemaName,getTableName()) + "String_Node_Str"+ getIndexName();
  }
  return "String_Node_Str" + database.escapeTableName(schemaName,getIndexName());
}
Program: 84133
Project: 84133
Buggy source:
@Test public void foreignKey_defaultDeferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setReferences("String_Node_Str");
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertFalse(keyConstraint.isDeferrable());
  assertFalse(keyConstraint.isInitiallyDeferred());
}

Fixed version (ground truth):
@Test public void foreignKey_defaultDeferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setReferences("String_Node_Str");
  constraints.setForeignKeyName("String_Node_Str");
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertFalse(keyConstraint.isDeferrable());
  assertFalse(keyConstraint.isInitiallyDeferred());
}
Program: 84134
Project: 84134
Buggy source:
@Test public void foreignKey_deferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setReferences("String_Node_Str");
  constraints.setDeferrable(true);
  constraints.setInitiallyDeferred(true);
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertTrue(keyConstraint.isDeferrable());
  assertTrue(keyConstraint.isInitiallyDeferred());
}

Fixed version (ground truth):
@Test public void foreignKey_deferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setForeignKeyName("String_Node_Str");
  constraints.setReferences("String_Node_Str");
  constraints.setDeferrable(true);
  constraints.setInitiallyDeferred(true);
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertTrue(keyConstraint.isDeferrable());
  assertTrue(keyConstraint.isInitiallyDeferred());
}
Program: 84135
Project: 84135
Buggy source:
@Test public void foreignKey_notDeferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setReferences("String_Node_Str");
  constraints.setDeferrable(false);
  constraints.setInitiallyDeferred(false);
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertFalse(keyConstraint.isDeferrable());
  assertFalse(keyConstraint.isInitiallyDeferred());
}

Fixed version (ground truth):
@Test public void foreignKey_notDeferrable() throws Exception {
  CreateTableChange change=new CreateTableChange();
  ColumnConfig columnConfig=new ColumnConfig();
  columnConfig.setName("String_Node_Str");
  ConstraintsConfig constraints=new ConstraintsConfig();
  constraints.setForeignKeyName("String_Node_Str");
  constraints.setReferences("String_Node_Str");
  constraints.setDeferrable(false);
  constraints.setInitiallyDeferred(false);
  columnConfig.setConstraints(constraints);
  change.addColumn(columnConfig);
  CreateTableStatement statement=(CreateTableStatement)change.generateStatements(new MockDatabase())[0];
  ForeignKeyConstraint keyConstraint=statement.getForeignKeyConstraints().iterator().next();
  assertFalse(keyConstraint.isDeferrable());
  assertFalse(keyConstraint.isInitiallyDeferred());
}
Program: 84136
Project: 84136
Buggy source:
@Test public void listLocks_tableExistsWithLock() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expectLastCall();
  List<Map> locksList=new ArrayList<Map>();
  Map lock=new HashMap();
  lock.put("String_Node_Str",1);
  lock.put("String_Node_Str",new Date());
  lock.put("String_Node_Str",Boolean.TRUE);
  lock.put("String_Node_Str","String_Node_Str");
  locksList.add(lock);
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(1,locks.length);
  verify(database);
  verify(template);
}

Fixed version (ground truth):
@Test public void listLocks_tableExistsWithLock() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expect(database.getDefaultSchemaName()).andReturn("String_Node_Str");
  expect(database.escapeTableName("String_Node_Str","String_Node_Str")).andReturn("String_Node_Str");
  expectLastCall();
  List<Map> locksList=new ArrayList<Map>();
  Map lock=new HashMap();
  lock.put("String_Node_Str",1);
  lock.put("String_Node_Str",new Date());
  lock.put("String_Node_Str",Boolean.TRUE);
  lock.put("String_Node_Str","String_Node_Str");
  locksList.add(lock);
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(1,locks.length);
  verify(database);
  verify(template);
}
Program: 84137
Project: 84137
Buggy source:
@Test public void listLocks_tableExistsNoLocks() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expectLastCall();
  List<Map> locksList=new ArrayList<Map>();
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(0,locks.length);
  verify(database);
  verify(template);
}

Fixed version (ground truth):
@Test public void listLocks_tableExistsNoLocks() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDefaultSchemaName()).andReturn("String_Node_Str");
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expectLastCall();
  expect(database.escapeTableName("String_Node_Str","String_Node_Str")).andReturn("String_Node_Str");
  List<Map> locksList=new ArrayList<Map>();
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(0,locks.length);
  verify(database);
  verify(template);
}
Program: 84138
Project: 84138
Buggy source:
@Test public void listLocks_tableExistsUnlocked() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expectLastCall();
  List<Map> locksList=new ArrayList<Map>();
  Map lock=new HashMap();
  lock.put("String_Node_Str",1);
  lock.put("String_Node_Str",new Date());
  lock.put("String_Node_Str",Boolean.FALSE);
  lock.put("String_Node_Str","String_Node_Str");
  locksList.add(lock);
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(0,locks.length);
  verify(database);
  verify(template);
}

Fixed version (ground truth):
@Test public void listLocks_tableExistsUnlocked() throws Exception {
  Database database=createMock(Database.class);
  JdbcTemplate template=createMock(JdbcTemplate.class);
  expect(database.getJdbcTemplate()).andReturn(template).anyTimes();
  expect(database.doesChangeLogLockTableExist()).andReturn(true);
  expect(database.getDatabaseChangeLogLockTableName()).andReturn("String_Node_Str");
  expectLastCall();
  expect(database.getDefaultSchemaName()).andReturn("String_Node_Str");
  expect(database.escapeTableName("String_Node_Str","String_Node_Str")).andReturn("String_Node_Str");
  List<Map> locksList=new ArrayList<Map>();
  Map lock=new HashMap();
  lock.put("String_Node_Str",1);
  lock.put("String_Node_Str",new Date());
  lock.put("String_Node_Str",Boolean.FALSE);
  lock.put("String_Node_Str","String_Node_Str");
  locksList.add(lock);
  expect(template.queryForList(isA(SqlStatement.class))).andReturn(locksList);
  replay(database);
  replay(template);
  LockHandler handler=LockHandler.getInstance(database);
  DatabaseChangeLogLock[] locks=handler.listLocks();
  assertEquals(0,locks.length);
  verify(database);
  verify(template);
}
Program: 84140
Project: 84140
Buggy source:
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  String schemaName=getTableSchemaName();
  if (schemaName != null && !database.supportsSchemas()) {
    throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
  }
  if (database instanceof MySQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + getIndexName() + "String_Node_Str"+ database.escapeTableName(schemaName,getTableName());
  }
 else   if (database instanceof MSSQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + database.escapeTableName(schemaName,getTableName()) + "String_Node_Str"+ getIndexName();
  }
  return "String_Node_Str" + database.escapeTableName(schemaName,getIndexName());
}

Fixed version (ground truth):
public String getSqlStatement(Database database) throws StatementNotSupportedOnDatabaseException {
  String schemaName=getTableSchemaName();
  if (schemaName != null && !database.supportsSchemas()) {
    throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
  }
  if (database instanceof MySQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + getIndexName() + "String_Node_Str"+ database.escapeTableName(schemaName,getTableName());
  }
 else   if (database instanceof MSSQLDatabase) {
    if (getTableName() == null) {
      throw new StatementNotSupportedOnDatabaseException("String_Node_Str",this,database);
    }
    return "String_Node_Str" + database.escapeTableName(schemaName,getTableName()) + "String_Node_Str"+ getIndexName();
  }
  return "String_Node_Str" + getIndexName();
}
Program: 84141
Project: 84141
Buggy source:
protected Migrator createMigrator(FileOpener fo){
  return new Migrator("String_Node_Str",fo);
}

Fixed version (ground truth):
protected Migrator createMigrator(FileOpener fo) throws MojoExecutionException {
  return new Migrator("String_Node_Str",fo);
}
Program: 84142
Project: 84142
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  getLog().info(MavenUtils.LOG_SEPARATOR);
  String shouldRunProperty=System.getProperty(Migrator.SHOULD_RUN_SYSTEM_PROPERTY);
  if (shouldRunProperty != null && !Boolean.valueOf(shouldRunProperty).booleanValue()) {
    getLog().warn("String_Node_Str" + Migrator.SHOULD_RUN_SYSTEM_PROPERTY + "String_Node_Str");
    return;
  }
  ClassLoader artifactClassLoader=getMavenArtifactClassLoader();
  configureFieldsAndValues(getFileOpener(artifactClassLoader));
  displayMojoSettings();
  checkRequiredParametersAreSpecified();
  Connection connection=null;
  try {
    connection=MavenUtils.getDatabaseConnection(artifactClassLoader,driver,url,username,password);
    Migrator migrator=createMigrator(getFileOpener(artifactClassLoader));
    configureMigrator(migrator,connection);
    getLog().info("String_Node_Str" + url);
    if (promptOnNonLocalDatabase && !migrator.isSafeToRunMigration()) {
      if (migrator.swingPromptForNonLocalDatabase()) {
        throw new LiquibaseException("String_Node_Str");
      }
    }
    performLiquibaseTask(migrator);
  }
 catch (  LiquibaseException e) {
    releaseConnection(connection);
    throw new MojoFailureException(e.getMessage());
  }
  releaseConnection(connection);
  getLog().info(MavenUtils.LOG_SEPARATOR);
  getLog().info("String_Node_Str");
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  getLog().info(MavenUtils.LOG_SEPARATOR);
  String shouldRunProperty=System.getProperty(Migrator.SHOULD_RUN_SYSTEM_PROPERTY);
  if (shouldRunProperty != null && !Boolean.valueOf(shouldRunProperty).booleanValue()) {
    getLog().warn("String_Node_Str" + Migrator.SHOULD_RUN_SYSTEM_PROPERTY + "String_Node_Str");
    return;
  }
  ClassLoader artifactClassLoader=getMavenArtifactClassLoader();
  configureFieldsAndValues(getFileOpener(artifactClassLoader));
  displayMojoSettings();
  checkRequiredParametersAreSpecified();
  Connection connection=null;
  try {
    connection=MavenUtils.getDatabaseConnection(artifactClassLoader,driver,url,username,password);
    Migrator migrator=createMigrator(getFileOpener(artifactClassLoader));
    configureMigrator(migrator,connection);
    getLog().info("String_Node_Str" + url);
    if (isPromptOnNonLocalDatabase() && !migrator.isSafeToRunMigration()) {
      if (migrator.swingPromptForNonLocalDatabase()) {
        throw new LiquibaseException("String_Node_Str");
      }
    }
    performLiquibaseTask(migrator);
  }
 catch (  LiquibaseException e) {
    releaseConnection(connection);
    throw new MojoFailureException(e.getMessage());
  }
  releaseConnection(connection);
  getLog().info(MavenUtils.LOG_SEPARATOR);
  getLog().info("String_Node_Str");
}
Program: 84143
Project: 84143
Buggy source:
private void setFieldValue(Field field,String value) throws IllegalAccessException {
  if (field.getType().equals(Boolean.class)) {
    field.set(this,Boolean.valueOf(value));
  }
 else {
    field.set(this,value);
  }
}

Fixed version (ground truth):
private void setFieldValue(Field field,String value) throws IllegalAccessException {
  if (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class)) {
    field.set(this,Boolean.valueOf(value));
  }
 else {
    field.set(this,value);
  }
}
Program: 84144
Project: 84144
Buggy source:
@Override protected Migrator createMigrator(FileOpener fo){
  return new Migrator(changeLogFile.trim(),fo);
}

Fixed version (ground truth):
@Override protected Migrator createMigrator(FileOpener fo) throws MojoExecutionException {
  Migrator m=new Migrator(changeLogFile.trim(),fo);
  performMigratorConfiguration(m);
  return m;
}
Program: 84145
Project: 84145
Buggy source:
@Override protected void performMigratorConfiguration(Migrator migrator) throws MojoExecutionException {
  Writer w=null;
  try {
    if (!migrationSqlOutputFile.exists()) {
      migrationSqlOutputFile.getParentFile().mkdirs();
    }
    w=new FileWriter(migrationSqlOutputFile);
  }
 catch (  IOException e) {
    getLog().error(e);
    throw new MojoExecutionException("String_Node_Str",e);
  }
  getLog().info("String_Node_Str" + migrationSqlOutputFile.getAbsolutePath());
  if (changeLogSqlOnly) {
    getLog().info("String_Node_Str");
    migrator.setMode(Migrator.Mode.OUTPUT_CHANGELOG_ONLY_SQL_MODE);
  }
 else {
    migrator.setMode(Migrator.Mode.OUTPUT_SQL_MODE);
  }
  migrator.setOutputSQLWriter(w);
}

Fixed version (ground truth):
@Override protected void performMigratorConfiguration(Migrator migrator) throws MojoExecutionException {
  Writer w=null;
  try {
    if (!migrationSqlOutputFile.exists()) {
      migrationSqlOutputFile.getParentFile().mkdirs();
    }
    w=new FileWriter(migrationSqlOutputFile);
  }
 catch (  IOException e) {
    getLog().error(e);
    throw new MojoExecutionException("String_Node_Str",e);
  }
  getLog().info("String_Node_Str" + migrationSqlOutputFile.getAbsolutePath());
  if (changeLogSqlOnly) {
    getLog().info("String_Node_Str");
    migrator.setMode(Migrator.Mode.OUTPUT_CHANGELOG_ONLY_SQL_MODE);
  }
 else {
    getLog().info("String_Node_Str");
    migrator.setMode(Migrator.Mode.OUTPUT_SQL_MODE);
  }
  migrator.setOutputSQLWriter(w);
}
Program: 84146
Project: 84146
Buggy source:
@Test public void resolveEntity() throws Exception {
  MigratorSchemaResolver migratorSchemaResolver=new MigratorSchemaResolver();
  assertNotNull(migratorSchemaResolver.resolveEntity(null,"String_Node_Str"));
  assertNull(migratorSchemaResolver.resolveEntity(null,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void resolveEntity() throws Exception {
  LiquibaseSchemaResolver liquibaseSchemaResolver=new LiquibaseSchemaResolver();
  assertNotNull(liquibaseSchemaResolver.resolveEntity(null,"String_Node_Str"));
  assertNull(liquibaseSchemaResolver.resolveEntity(null,"String_Node_Str"));
}
Program: 84150
Project: 84150
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");
    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());
    }
  }
}

Fixed version (ground truth):
public ChangeSet(String id,String author,boolean alwaysRun,boolean runOnChange,String filePath,String physicalFilePath,String contextList,String dbmsList){
  this.changes=new ArrayList<Change>();
  log=LogFactory.getLogger();
  this.id=id;
  this.author=author;
  this.filePath=filePath;
  this.physicalFilePath=physicalFilePath;
  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: 84151
Project: 84151
Buggy source:
protected String[] getSchemasToDrop() throws JDBCException {
  return new String[]{"String_Node_Str".toUpperCase(),DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection).getSchemaName()};
}

Fixed version (ground truth):
protected String[] getSchemasToDrop() throws JDBCException {
  return new String[]{"String_Node_Str".toUpperCase(),database.getSchemaName()};
}