nus-yam/ex-repair huggingface dataset:
Program: 143827
Project: 143827
Buggy source:
private void selectDrawerItem(int position,long feedId){
  Fragment fragment=new EntryListFragment();
  Bundle args=new Bundle();
  args.putParcelable(EntryListFragment.ARG_ENTRIES_URI,Uris.newFeedEntriesUri(feedId));
  fragment.setArguments(args);
  getFragmentManager().beginTransaction().replace(R.id.content,fragment).commit();
  if (drawerListAdapter.getCursor() != null) {
    drawerListView.setItemChecked(position,true);
  }
  drawerLayout.closeDrawer(drawerListView);
  syncLogFragment.setSyncLogUri(Uris.newFeedSyncLogUri(feedId));
}

Fixed version (ground truth):
private void selectDrawerItem(int position,long feedId){
  EntryListFragment entryListFragment=new EntryListFragment();
  Bundle entryListFragmentArgs=new Bundle();
  entryListFragmentArgs.putParcelable(EntryListFragment.ARG_ENTRIES_URI,Uris.newFeedEntriesUri(feedId));
  entryListFragment.setArguments(entryListFragmentArgs);
  syncLogFragment=new SyncLogFragment();
  Bundle syncLogFragmentArgs=new Bundle();
  syncLogFragmentArgs.putParcelable(SyncLogFragment.ARG_SYNC_LOG_URI,Uris.newFeedSyncLogUri(feedId));
  syncLogFragment.setArguments(syncLogFragmentArgs);
  getFragmentManager().beginTransaction().replace(R.id.content,entryListFragment).replace(R.id.sync_log,syncLogFragment).commit();
  if (drawerListAdapter.getCursor() != null) {
    drawerListView.setItemChecked(position,true);
  }
  drawerLayout.closeDrawer(drawerListView);
}
Program: 143828
Project: 143828
Buggy source:
@Override public Loader<Cursor> onCreateLoader(int loader,Bundle args){
  return new CursorLoader(context,syncLogUri,SYNC_LOG_PROJECTION,null,null,null);
}

Fixed version (ground truth):
@Override public Loader<Cursor> onCreateLoader(int loader,Bundle args){
  Uri syncLogUri=getArguments().getParcelable(ARG_SYNC_LOG_URI);
  return new CursorLoader(context,syncLogUri,SYNC_LOG_PROJECTION,null,null,null);
}
Program: 143829
Project: 143829
Buggy source:
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  if (w > 0) {
    setSyncLogUri(syncLogUri);
  }
}

Fixed version (ground truth):
@Override protected void onSizeChanged(int w,int h,int oldw,int oldh){
  if (w > 0) {
    Bundle args=new Bundle();
    args.putLong(SYNC_LOG_LOADER_FIRST_POLL,System.currentTimeMillis() - w * STEP_TIME / syncLogView.step);
    getLoaderManager().restartLoader(SYNC_LOG_LOADER,args,SyncLogFragment.this);
  }
}
Program: 143830
Project: 143830
Buggy source:
/** 
 * Registers a target database on which a task (e.g. update) can be executed.
 * @param database The configuration of the database
 */
public void addDatabase(Database database){
  DbMaintainDatabase dbMaintainDatabase=new DbMaintainDatabase();
  dbMaintainDatabase.setName(database.getName());
  dbMaintainDatabase.setIncluded(database.isIncluded());
  dbMaintainDatabase.setDialect(database.getDialect());
  dbMaintainDatabase.setDriverClassName(database.getDriverClassName());
  dbMaintainDatabase.setUrl(database.getUrl());
  dbMaintainDatabase.setUserName(database.getUserName());
  dbMaintainDatabase.setPassword(database.getPassword());
  dbMaintainDatabase.setSchemaNames(database.getSchemaNames());
  databases.add(dbMaintainDatabase);
}

Fixed version (ground truth):
/** 
 * Registers a target database on which a task (e.g. update) can be executed.
 * @param database The configuration of the database
 */
public void addDatabase(Database database){
  databases.add(database);
}
Program: 143831
Project: 143831
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new CheckScriptUpdatesTask(databases,scriptLocations,scriptEncoding,postProcessingScriptDirectoryName,fromScratchEnabled,autoCreateDbMaintainScriptsTable,allowOutOfSequenceExecutionOfPatches,qualifiers,patchQualifiers,includedQualifiers,excludedQualifiers,scriptFileExtensions,useLastModificationDates);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new CheckScriptUpdatesTask(getDbMaintainDatabases(),scriptLocations,scriptEncoding,postProcessingScriptDirectoryName,fromScratchEnabled,autoCreateDbMaintainScriptsTable,allowOutOfSequenceExecutionOfPatches,qualifiers,patchQualifiers,includedQualifiers,excludedQualifiers,scriptFileExtensions,useLastModificationDates);
}
Program: 143832
Project: 143832
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new CleanDatabaseTask(databases);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new CleanDatabaseTask(getDbMaintainDatabases());
}
Program: 143833
Project: 143833
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new ClearDatabaseTask(databases);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new ClearDatabaseTask(getDbMaintainDatabases());
}
Program: 143834
Project: 143834
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new DisableConstraintsTask(databases);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new DisableConstraintsTask(getDbMaintainDatabases());
}
Program: 143835
Project: 143835
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkDatabaseAsUpToDateTask(databases,scriptLocations,autoCreateDbMaintainScriptsTable,qualifiers,includedQualifiers,excludedQualifiers,scriptFileExtensions);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkDatabaseAsUpToDateTask(getDbMaintainDatabases(),scriptLocations,autoCreateDbMaintainScriptsTable,qualifiers,includedQualifiers,excludedQualifiers,scriptFileExtensions);
}
Program: 143836
Project: 143836
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkErrorScriptPerformedTask(databases);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkErrorScriptPerformedTask(getDbMaintainDatabases());
}
Program: 143837
Project: 143837
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkErrorScriptRevertedTask(databases);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new MarkErrorScriptRevertedTask(getDbMaintainDatabases());
}
Program: 143838
Project: 143838
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new UpdateDatabaseTask(databases,scriptLocations,scriptEncoding,postProcessingScriptDirectoryName,fromScratchEnabled,autoCreateDbMaintainScriptsTable,allowOutOfSequenceExecutionOfPatches,qualifiers,patchQualifiers,includedQualifiers,excludedQualifiers,cleanDb,disableConstraints,updateSequences,useLastModificationDates,scriptFileExtensions,scriptParameterFile);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new UpdateDatabaseTask(getDbMaintainDatabases(),scriptLocations,scriptEncoding,postProcessingScriptDirectoryName,fromScratchEnabled,autoCreateDbMaintainScriptsTable,allowOutOfSequenceExecutionOfPatches,qualifiers,patchQualifiers,includedQualifiers,excludedQualifiers,cleanDb,disableConstraints,updateSequences,useLastModificationDates,scriptFileExtensions,scriptParameterFile);
}
Program: 143839
Project: 143839
Buggy source:
@Override protected DbMaintainTask createDbMaintainTask(){
  return new UpdateSequencesTask(databases,lowestAcceptableSequenceValue);
}

Fixed version (ground truth):
@Override protected DbMaintainTask createDbMaintainTask(){
  return new UpdateSequencesTask(getDbMaintainDatabases(),lowestAcceptableSequenceValue);
}
Program: 143840
Project: 143840
Buggy source:
/** 
 * Verifies that, if the dbmaintain_scripts table doesn't exist yet, and the autoCreateExecutedScriptsInfoTable property is set to true, we start with a from scratch update
 */
@Test public void noInitialFromScratchUpdateIfFromScratchDisabled(){
  disableFromScratch();
  createTable(BEFORE_INITIAL_TABLE);
  createScripts(INCREMENTAL_1);
  updateDatabase();
  assertTableExists(BEFORE_INITIAL_TABLE);
}

Fixed version (ground truth):
/** 
 * Verifies that, if the dbmaintain_scripts table doesn't exist yet, and the autoCreateExecutedScriptsInfoTable property is set to true, we don't start with a from scratch update
 */
@Test public void noInitialFromScratchUpdateIfFromScratchDisabled(){
  disableFromScratch();
  createTable(BEFORE_INITIAL_TABLE);
  createScripts(INCREMENTAL_1);
  updateDatabase();
  assertTableExists(BEFORE_INITIAL_TABLE);
}
Program: 143841
Project: 143841
Buggy source:
/** 
 * Test for adding a hotfix script that has an index smaller than an existing index. Out of sequence is not allowed so the update should have failed.
 */
@Test(expected=DbMaintainException.class) public void addPatchScript_outOfSequenceNotAllowed(){
  createScripts(INCREMENTAL_2);
  updateDatabase();
  createPatchScript(INCREMENTAL_1);
  updateDatabase();
}

Fixed version (ground truth):
/** 
 * Test for adding a patch script that has an index smaller than an existing index. Out of sequence is not allowed so the update should have failed.
 */
@Test(expected=DbMaintainException.class) public void addPatchScript_outOfSequenceNotAllowed(){
  createScripts(INCREMENTAL_2);
  updateDatabase();
  createPatchScript(INCREMENTAL_1);
  updateDatabase();
}
Program: 143842
Project: 143842
Buggy source:
private void updateDatabase(){
  MainFactory mainFactory=new MainFactory(configuration);
  DbMaintainer dbMaintainer=mainFactory.createDbMaintainer();
  dbMaintainer.updateDatabase(false);
}

Fixed version (ground truth):
private boolean updateDatabase(){
  MainFactory mainFactory=new MainFactory(configuration);
  DbMaintainer dbMaintainer=mainFactory.createDbMaintainer();
  return dbMaintainer.updateDatabase(false);
}
Program: 143843
Project: 143843
Buggy source:
/** 
 * Test for adding a hotfix script that has an index smaller than an existing index. Out of sequence is allowed, the hotfix script should have been executed (with a warning)
 */
@Test public void addPatchScript_outOfSequenceAllowed(){
  allowOutOfSequenceExecutionOfPatches();
  createScripts(INCREMENTAL_2);
  updateDatabase();
  createPatchScript(INCREMENTAL_1);
  updateDatabase();
}

Fixed version (ground truth):
/** 
 * Test for adding a patch script that has an index smaller than an existing index. Out of sequence is allowed, the patch script should have been executed (with a warning)
 */
@Test public void addPatchScript_outOfSequenceAllowed(){
  allowOutOfSequenceExecutionOfPatches();
  createScripts(INCREMENTAL_2);
  updateDatabase();
  createPatchScript(INCREMENTAL_1);
  updateDatabase();
}
Program: 143844
Project: 143844
Buggy source:
@Test public void updateIncremental_fromScratchEnabled(){
  enableFromScratch();
  createScripts(INCREMENTAL_1,INCREMENTAL_2);
  updateDatabase();
  updateScript(INCREMENTAL_1);
  updateDatabase();
  assertScriptsNotExecuted(INCREMENTAL_1);
  assertUpdatedScriptsExecuted(INCREMENTAL_1);
}

Fixed version (ground truth):
@Test public void updateIncremental_fromScratchEnabled(){
  enableFromScratch();
  createScripts(INCREMENTAL_1,INCREMENTAL_2);
  updateDatabase();
  updateScript(INCREMENTAL_1);
  updateDatabase();
  assertScriptsNotExecuted(INCREMENTAL_1);
  assertUpdatedScriptsExecuted(INCREMENTAL_1);
  boolean updatePerformed=updateDatabase();
  assertFalse(updatePerformed);
}
Program: 143846
Project: 143846
Buggy source:
public DBClearer createInstance(){
  Set<DbItemIdentifier> itemsToPreserve=getItemsToPreserve();
  MainFactory mainFactory=factoryWithDatabaseContext.getMainFactory();
  ConstraintsDisabler constraintsDisabler=mainFactory.createConstraintsDisabler();
  ExecutedScriptInfoSource executedScriptInfoSource=mainFactory.createExecutedScriptInfoSource();
  return new DefaultDBClearer(getDatabases(),itemsToPreserve,constraintsDisabler,executedScriptInfoSource);
}

Fixed version (ground truth):
public DBClearer createInstance(){
  Set<DbItemIdentifier> itemsToPreserve=getItemsToPreserve();
  MainFactory mainFactory=factoryWithDatabaseContext.getMainFactory();
  ConstraintsDisabler constraintsDisabler=mainFactory.createConstraintsDisabler();
  return new DefaultDBClearer(getDatabases(),itemsToPreserve,constraintsDisabler);
}
Program: 143847
Project: 143847
Buggy source:
/** 
 * @param databases                The db support instances, not null
 * @param itemsToPreserve          The schema's, tables, triggers etc that should not be dropped, not null
 * @param constraintsDisabler      Disables of constraints before clearing the database, not null
 */
public DefaultDBClearer(Databases databases,Set<DbItemIdentifier> itemsToPreserve,ConstraintsDisabler constraintsDisabler,ExecutedScriptInfoSource executedScriptInfoSource){
  this.databases=databases;
  this.itemsToPreserve=itemsToPreserve;
  this.constraintsDisabler=constraintsDisabler;
  this.executedScriptInfoSource=executedScriptInfoSource;
  assertItemsToPreserveExist(itemsToPreserve);
}

Fixed version (ground truth):
/** 
 * @param databases                The db support instances, not null
 * @param itemsToPreserve          The schema's, tables, triggers etc that should not be dropped, not null
 * @param constraintsDisabler      Disables of constraints before clearing the database, not null
 */
public DefaultDBClearer(Databases databases,Set<DbItemIdentifier> itemsToPreserve,ConstraintsDisabler constraintsDisabler){
  this.databases=databases;
  this.itemsToPreserve=itemsToPreserve;
  this.constraintsDisabler=constraintsDisabler;
  assertItemsToPreserveExist(itemsToPreserve);
}
Program: 143848
Project: 143848
Buggy source:
/** 
 * When we throw an exception on the first pass then it is ignored and we try another pass (which succeeds).
 */
@Test public void testClearDatabase_IgnoreFirstErrorOnDropTable() throws Exception {
  database.onceRaises(new RuntimeException("String_Node_Str")).dropTable(SCHEMA,"String_Node_Str");
  defaultDBClearer.clearDatabase();
}

Fixed version (ground truth):
/** 
 * When we throw an exception on the first pass then it is ignored and we try another pass (which succeeds).
 */
@Test public void testClearDatabase_IgnoreFirstErrorOnDropTable() throws Exception {
  database.onceRaises(RuntimeException.class).dropTable(SCHEMA,"String_Node_Str");
  defaultDBClearer.clearDatabase();
}
Program: 143849
Project: 143849
Buggy source:
/** 
 * Configures the tested object.
 */
@Before public void setUp() throws Exception {
  Databases databases=new Databases(asList(database.getMock()),new ArrayList<String>());
  defaultDBClearer=new DefaultDBClearer(databases,new HashSet<DbItemIdentifier>(),constraintsDisabler.getMock(),executedScriptInfoSource.getMock());
  database.returns(tableNames).getTableNames(SCHEMA);
  database.returns(asSet(SCHEMA)).getSchemaNames();
}

Fixed version (ground truth):
/** 
 * Configures the tested object.
 */
@Before public void setUp() throws Exception {
  Databases databases=new Databases(asList(database.getMock()),new ArrayList<String>());
  defaultDBClearer=new DefaultDBClearer(databases,new HashSet<DbItemIdentifier>(),constraintsDisabler.getMock());
  database.returns(tableNames).getTableNames(SCHEMA);
  database.returns(asSet(SCHEMA)).getSchemaNames();
}
Program: 143850
Project: 143850
Buggy source:
/** 
 * Configures the tested object. Creates a test table, index, view and sequence
 */
@Before public void setUp() throws Exception {
  databases=getDatabases("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  defaultDatabase=databases.getDefaultDatabase();
  dataSource=defaultDatabase.getDataSource();
  cleanupTestDatabase();
  createTestDatabase();
  Set<DbItemIdentifier> itemsToPreserve=new HashSet<DbItemIdentifier>();
  itemsToPreserve.add(parseSchemaIdentifier("String_Node_Str",databases));
  itemsToPreserve.add(parseItemIdentifier(TABLE,"String_Node_Str",databases));
  itemsToPreserve.add(parseItemIdentifier(TABLE,defaultDatabase.quoted("String_Node_Str") + "String_Node_Str" + defaultDatabase.quoted("String_Node_Str"),databases));
  itemsToPreserve.add(parseItemIdentifier(VIEW,"String_Node_Str",databases));
  itemsToPreserve.add(parseItemIdentifier(VIEW,"String_Node_Str" + defaultDatabase.quoted("String_Node_Str"),databases));
  itemsToPreserve.add(parseItemIdentifier(SEQUENCE,"String_Node_Str",databases));
  itemsToPreserve.add(parseItemIdentifier(SEQUENCE,defaultDatabase.quoted("String_Node_Str") + "String_Node_Str",databases));
  ConstraintsDisabler constraintsDisabler=new DefaultConstraintsDisabler(databases);
  ExecutedScriptInfoSource executedScriptInfoSource=getDefaultExecutedScriptInfoSource(defaultDatabase,true);
  defaultDBClearer=new DefaultDBClearer(databases,itemsToPreserve,constraintsDisabler,executedScriptInfoSource);
}

Fixed version (ground truth):
/** 
 * Configures the tested object. Creates a test table, index, view and sequence
 */
@Before public void setUp() throws Exception {
  databases=getDatabases("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  defaultDatabase=databases.getDefaultDatabase();
  dataSource=defaultDatabase.getDataSource();
  cleanupTestDatabase();
  createTestDatabase();
  Set<DbItemIdentifier> itemsToPreserve=asSet(parseSchemaIdentifier("String_Node_Str",databases),parseItemIdentifier(TABLE,"String_Node_Str",databases),parseItemIdentifier(TABLE,defaultDatabase.quoted("String_Node_Str") + "String_Node_Str" + defaultDatabase.quoted("String_Node_Str"),databases),parseItemIdentifier(VIEW,"String_Node_Str",databases),parseItemIdentifier(VIEW,"String_Node_Str" + defaultDatabase.quoted("String_Node_Str"),databases),parseItemIdentifier(SEQUENCE,"String_Node_Str",databases),parseItemIdentifier(SEQUENCE,defaultDatabase.quoted("String_Node_Str") + "String_Node_Str",databases));
  ConstraintsDisabler constraintsDisabler=new DefaultConstraintsDisabler(databases);
  defaultDBClearer=new DefaultDBClearer(databases,itemsToPreserve,constraintsDisabler);
}
Program: 143851
Project: 143851
Buggy source:
@Before public void setUp() throws Exception {
  databases=getDatabases("String_Node_Str","String_Node_Str","String_Node_Str");
  defaultDatabase=databases.getDefaultDatabase();
  dataSource=defaultDatabase.getDataSource();
  ConstraintsDisabler constraintsDisabler=new DefaultConstraintsDisabler(databases);
  ExecutedScriptInfoSource executedScriptInfoSource=getDefaultExecutedScriptInfoSource(defaultDatabase,true);
  defaultDBClearer=new DefaultDBClearer(databases,new HashSet<DbItemIdentifier>(),constraintsDisabler,executedScriptInfoSource);
  dropTestDatabase();
  createTestDatabase();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  databases=getDatabases("String_Node_Str","String_Node_Str","String_Node_Str");
  defaultDatabase=databases.getDefaultDatabase();
  dataSource=defaultDatabase.getDataSource();
  ConstraintsDisabler constraintsDisabler=new DefaultConstraintsDisabler(databases);
  defaultDBClearer=new DefaultDBClearer(databases,new HashSet<DbItemIdentifier>(),constraintsDisabler);
  dropTestDatabase();
  createTestDatabase();
}
Program: 143853
Project: 143853
Buggy source:
/** 
 * @return a set with the available DbSupport instances, one for each configured database
 */
protected Set<DbSupport> getDbSupports(){
  Set<DbSupport> result=new HashSet<DbSupport>();
  for (  DbSupport dbSupport : nameDbSupportMap.values()) {
    if (dbSupport != null) {
      result.add(dbSupport);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return a set with the available DbSupport instances, one for each configured database
 */
protected Set<DbSupport> getDbSupports(){
  Set<DbSupport> result=new HashSet<DbSupport>();
  for (  DbSupport dbSupport : getNameDbSupportMap().values()) {
    if (dbSupport != null) {
      result.add(dbSupport);
    }
  }
  return result;
}
Program: 143854
Project: 143854
Buggy source:
protected ScriptRunner createSqlPlusScriptRunner(Class<ScriptRunner> clazz){
  String sqlPlusCommand=PropertyUtils.getString(PROPERTY_SQL_PLUS_COMMAND,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{DbSupport.class,Map.class,String.class},new Object[]{defaultDbSupport,nameDbSupportMap,sqlPlusCommand});
}

Fixed version (ground truth):
protected ScriptRunner createSqlPlusScriptRunner(Class<ScriptRunner> clazz){
  String sqlPlusCommand=PropertyUtils.getString(PROPERTY_SQL_PLUS_COMMAND,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{DbSupport.class,Map.class,String.class},new Object[]{getDefaultDbSupport(),getNameDbSupportMap(),sqlPlusCommand});
}
Program: 143855
Project: 143855
Buggy source:
public DBClearer createDbClearer(){
  Class<DefaultDBClearer> clazz=getConfiguredClass(DefaultDBClearer.class,configuration);
  DefaultDBClearer dbClearer=createInstanceOfType(clazz,false,new Class<?>[]{Map.class},new Object[]{getNameDbSupportMap()});
  Set<DbItemIdentifier> schemasToPreserve=getSchemasToPreserve(PROPERTY_PRESERVE_SCHEMAS);
  for (  DbItemIdentifier schemaToPreserve : schemasToPreserve) {
    dbClearer.addItemToPreserve(schemaToPreserve,true);
  }
  String executedScriptsTableName=getString(PROPERTY_EXECUTED_SCRIPTS_TABLE_NAME,configuration);
  dbClearer.addItemToPreserve(DbItemIdentifier.parseItemIdentifier(TABLE,executedScriptsTableName,defaultDbSupport,nameDbSupportMap),false);
  addItemsToPreserve(dbClearer,TABLE,PROPERTY_PRESERVE_TABLES);
  addItemsToPreserve(dbClearer,VIEW,PROPERTY_PRESERVE_VIEWS);
  addItemsToPreserve(dbClearer,MATERIALZED_VIEW,PROPERTY_PRESERVE_MATERIALIZED_VIEWS);
  addItemsToPreserve(dbClearer,SYNONYM,PROPERTY_PRESERVE_SYNONYMS);
  addItemsToPreserve(dbClearer,SEQUENCE,PROPERTY_PRESERVE_SEQUENCES);
  addItemsToPreserve(dbClearer,TRIGGER,PROPERTY_PRESERVE_TRIGGERS);
  addItemsToPreserve(dbClearer,TYPE,PROPERTY_PRESERVE_TYPES);
  return dbClearer;
}

Fixed version (ground truth):
public DBClearer createDbClearer(){
  Class<DefaultDBClearer> clazz=getConfiguredClass(DefaultDBClearer.class,configuration);
  DefaultDBClearer dbClearer=createInstanceOfType(clazz,false,new Class<?>[]{Map.class},new Object[]{getNameDbSupportMap()});
  Set<DbItemIdentifier> schemasToPreserve=getSchemasToPreserve(PROPERTY_PRESERVE_SCHEMAS);
  for (  DbItemIdentifier schemaToPreserve : schemasToPreserve) {
    dbClearer.addItemToPreserve(schemaToPreserve,true);
  }
  String executedScriptsTableName=getString(PROPERTY_EXECUTED_SCRIPTS_TABLE_NAME,configuration);
  dbClearer.addItemToPreserve(DbItemIdentifier.parseItemIdentifier(TABLE,executedScriptsTableName,getDefaultDbSupport(),getNameDbSupportMap()),false);
  addItemsToPreserve(dbClearer,TABLE,PROPERTY_PRESERVE_TABLES);
  addItemsToPreserve(dbClearer,VIEW,PROPERTY_PRESERVE_VIEWS);
  addItemsToPreserve(dbClearer,MATERIALZED_VIEW,PROPERTY_PRESERVE_MATERIALIZED_VIEWS);
  addItemsToPreserve(dbClearer,SYNONYM,PROPERTY_PRESERVE_SYNONYMS);
  addItemsToPreserve(dbClearer,SEQUENCE,PROPERTY_PRESERVE_SEQUENCES);
  addItemsToPreserve(dbClearer,TRIGGER,PROPERTY_PRESERVE_TRIGGERS);
  addItemsToPreserve(dbClearer,TYPE,PROPERTY_PRESERVE_TYPES);
  return dbClearer;
}
Program: 143856
Project: 143856
Buggy source:
protected void appendToCurrentLine(Character currentChar){
  if (currentChar != null)   currentLine.append(currentChar);
}

Fixed version (ground truth):
protected void appendToCurrentLine(Character currentChar){
  if (currentChar == null) {
  }
 else   if (CARRIAGE_RETURN.equals(currentChar))   currentLine.append(NEWLINE);
 else   if (CARRIAGE_RETURN.equals(previousChar) && NEWLINE.equals(currentChar)) {
  }
 else   currentLine.append(currentChar);
}
Program: 143857
Project: 143857
Buggy source:
protected void appendToStatementWithoutCommentsAndWhitespace(Character currentChar,HandleNextCharacterResult handleNextCharacterResult){
  if (handleNextCharacterResult.isExecutable()) {
    statementWithoutCommentsAndWhitespace.append(currentChar);
  }
 else {
    if (isWhitespace(currentChar) && statementWithoutCommentsAndWhitespace.length() > 0 && getLastCharacter(statementWithoutCommentsAndWhitespace) != ' ') {
      statementWithoutCommentsAndWhitespace.append(' ');
    }
  }
}

Fixed version (ground truth):
protected void appendToStatementWithoutCommentsAndWhitespace(Character currentChar,HandleNextCharacterResult handleNextCharacterResult){
  if (handleNextCharacterResult.isExecutable()) {
    statementInUppercaseWithoutCommentsAndWhitespace.append(Character.toUpperCase(currentChar));
  }
 else {
    if (isWhitespace(currentChar) && statementInUppercaseWithoutCommentsAndWhitespace.length() > 0 && getLastCharacter(statementInUppercaseWithoutCommentsAndWhitespace) != ' ') {
      statementInUppercaseWithoutCommentsAndWhitespace.append(' ');
    }
  }
}
Program: 143858
Project: 143858
Buggy source:
protected HandleNextCharacterResult moveToStoredProcedureStateResult(Character currentChar,StatementBuilder statementBuilder){
  if (isWhitespace(currentChar) && storedProcedureMatcher.isStartOfStoredProcedure(statementBuilder.getStatementWithoutCommentsOrWhitespace())) {
    return toInStoredProcedureStateResult;
  }
  return null;
}

Fixed version (ground truth):
protected HandleNextCharacterResult moveToStoredProcedureStateResult(Character currentChar,StatementBuilder statementBuilder){
  if (isWhitespace(currentChar) && storedProcedureMatcher.isStartOfStoredProcedure(statementBuilder.getStatementInUppercaseWithoutCommentsOrWhitespace())) {
    return toInStoredProcedureStateResult;
  }
  return null;
}
Program: 143859
Project: 143859
Buggy source:
public static boolean isNewLineCharacter(Character currentChar){
  return CARRIAGE_RETURN.equals(currentChar) || LINE_FEED.equals(currentChar);
}

Fixed version (ground truth):
public static boolean isNewLineCharacter(Character currentChar){
  return CARRIAGE_RETURN.equals(currentChar) || NEW_LINE.equals(currentChar);
}
Program: 143860
Project: 143860
Buggy source:
public static QualifierEvaluator getTrivialQualifierEvaluator(){
  return new QualifierEvaluator(){
    @Override public boolean evaluate(    Set<Qualifier> qualifiers){
      return true;
    }
  }
;
}

Fixed version (ground truth):
public static QualifierEvaluator getTrivialQualifierEvaluator(){
  return new QualifierEvaluator(){
    public boolean evaluate(    Set<Qualifier> qualifiers){
      return true;
    }
  }
;
}
Program: 143861
Project: 143861
Buggy source:
@Override public boolean evaluate(Set<Qualifier> qualifiers){
  return true;
}

Fixed version (ground truth):
public boolean evaluate(Set<Qualifier> qualifiers){
  return true;
}
Program: 143862
Project: 143862
Buggy source:
public ConstraintsDisabler createConstraintsDisabler(){
  return new DefaultConstraintsDisabler(nameDbSupportMap.values());
}

Fixed version (ground truth):
public ConstraintsDisabler createConstraintsDisabler(){
  return new DefaultConstraintsDisabler(getDbSupports());
}
Program: 143863
Project: 143863
Buggy source:
public DbMaintainer createDbMaintainer(){
  ScriptRunner scriptRunner=createScriptRunner();
  ScriptSource scriptSource=createScriptSource();
  ExecutedScriptInfoSource executedScriptInfoSource=createExecutedScriptInfoSource();
  boolean cleanDbEnabled=PropertyUtils.getBoolean(PROPERTY_CLEANDB_ENABLED,configuration);
  boolean fromScratchEnabled=PropertyUtils.getBoolean(PROPERTY_FROM_SCRATCH_ENABLED,configuration);
  boolean keepRetryingAfterError=PropertyUtils.getBoolean(PROPKEY_KEEP_RETRYING_AFTER_ERROR_ENABLED,configuration);
  boolean updateSequencesEnabled=PropertyUtils.getBoolean(PROPERTY_UPDATE_SEQUENCES_ENABLED,configuration);
  DBCleaner dbCleaner=createDbCleaner();
  DBClearer dbClearer=createDbClearer();
  ConstraintsDisabler constraintsDisabler=createConstraintsDisabler();
  SequenceUpdater sequenceUpdater=createSequenceUpdater();
  Class<DbMaintainer> clazz=ConfigUtils.getConfiguredClass(DbMaintainer.class,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{ScriptRunner.class,ScriptSource.class,ExecutedScriptInfoSource.class,boolean.class,boolean.class,boolean.class,boolean.class,boolean.class,DBClearer.class,DBCleaner.class,ConstraintsDisabler.class,SequenceUpdater.class},new Object[]{scriptRunner,scriptSource,executedScriptInfoSource,fromScratchEnabled,keepRetryingAfterError,cleanDbEnabled,disableConstraintsEnabled,updateSequencesEnabled,dbClearer,dbCleaner,constraintsDisabler,sequenceUpdater});
}

Fixed version (ground truth):
public DbMaintainer createDbMaintainer(){
  ScriptRunner scriptRunner=createScriptRunner();
  ScriptSource scriptSource=createScriptSource();
  ExecutedScriptInfoSource executedScriptInfoSource=createExecutedScriptInfoSource();
  boolean cleanDbEnabled=PropertyUtils.getBoolean(PROPERTY_CLEANDB_ENABLED,configuration);
  boolean fromScratchEnabled=PropertyUtils.getBoolean(PROPERTY_FROM_SCRATCH_ENABLED,configuration);
  boolean keepRetryingAfterError=PropertyUtils.getBoolean(PROPERTY_KEEP_RETRYING_AFTER_ERROR_ENABLED,configuration);
  boolean disableConstraintsEnabled=PropertyUtils.getBoolean(PROPERTY_DISABLE_CONSTRAINTS_ENABLED,configuration);
  boolean updateSequencesEnabled=PropertyUtils.getBoolean(PROPERTY_UPDATE_SEQUENCES_ENABLED,configuration);
  DBCleaner dbCleaner=createDbCleaner();
  DBClearer dbClearer=createDbClearer();
  ConstraintsDisabler constraintsDisabler=createConstraintsDisabler();
  SequenceUpdater sequenceUpdater=createSequenceUpdater();
  Class<DbMaintainer> clazz=ConfigUtils.getConfiguredClass(DbMaintainer.class,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{ScriptRunner.class,ScriptSource.class,ExecutedScriptInfoSource.class,boolean.class,boolean.class,boolean.class,boolean.class,boolean.class,DBClearer.class,DBCleaner.class,ConstraintsDisabler.class,SequenceUpdater.class},new Object[]{scriptRunner,scriptSource,executedScriptInfoSource,fromScratchEnabled,keepRetryingAfterError,cleanDbEnabled,disableConstraintsEnabled,updateSequencesEnabled,dbClearer,dbCleaner,constraintsDisabler,sequenceUpdater});
}
Program: 143864
Project: 143864
Buggy source:
public DbMaintainer createDbMaintainer(){
  ScriptRunner scriptRunner=createScriptRunner();
  ScriptSource scriptSource=createScriptSource();
  ExecutedScriptInfoSource executedScriptInfoSource=createExecutedScriptInfoSource();
  boolean cleanDbEnabled=PropertyUtils.getBoolean(PROPKEY_CLEANDB_ENABLED,configuration);
  boolean fromScratchEnabled=PropertyUtils.getBoolean(PROPKEY_FROM_SCRATCH_ENABLED,configuration);
  boolean disableConstraintsEnabled=PropertyUtils.getBoolean(PROPKEY_DISABLE_CONSTRAINTS_ENABLED,configuration);
  boolean updateSequencesEnabled=PropertyUtils.getBoolean(PROPKEY_UPDATE_SEQUENCES_ENABLED,configuration);
  DBCleaner dbCleaner=createDbCleaner();
  DBClearer dbClearer=createDbClearer();
  ConstraintsDisabler constraintsDisabler=createConstraintsDisabler();
  SequenceUpdater sequenceUpdater=createSequenceUpdater();
  Class<DbMaintainer> clazz=ConfigUtils.getConfiguredClass(DbMaintainer.class,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{ScriptRunner.class,ScriptSource.class,ExecutedScriptInfoSource.class,boolean.class,boolean.class,boolean.class,boolean.class,DBClearer.class,DBCleaner.class,ConstraintsDisabler.class,SequenceUpdater.class},new Object[]{scriptRunner,scriptSource,executedScriptInfoSource,fromScratchEnabled,cleanDbEnabled,disableConstraintsEnabled,updateSequencesEnabled,dbClearer,dbCleaner,constraintsDisabler,sequenceUpdater});
}

Fixed version (ground truth):
public DbMaintainer createDbMaintainer(){
  ScriptRunner scriptRunner=createScriptRunner();
  ScriptSource scriptSource=createScriptSource();
  ExecutedScriptInfoSource executedScriptInfoSource=createExecutedScriptInfoSource();
  boolean cleanDbEnabled=PropertyUtils.getBoolean(PROPKEY_CLEANDB_ENABLED,configuration);
  boolean fromScratchEnabled=PropertyUtils.getBoolean(PROPKEY_FROM_SCRATCH_ENABLED,configuration);
  boolean keepRetryingAfterError=PropertyUtils.getBoolean(PROPKEY_KEEP_RETRYING_AFTER_ERROR_ENABLED,configuration);
  boolean disableConstraintsEnabled=PropertyUtils.getBoolean(PROPKEY_DISABLE_CONSTRAINTS_ENABLED,configuration);
  boolean updateSequencesEnabled=PropertyUtils.getBoolean(PROPKEY_UPDATE_SEQUENCES_ENABLED,configuration);
  DBCleaner dbCleaner=createDbCleaner();
  DBClearer dbClearer=createDbClearer();
  ConstraintsDisabler constraintsDisabler=createConstraintsDisabler();
  SequenceUpdater sequenceUpdater=createSequenceUpdater();
  Class<DbMaintainer> clazz=ConfigUtils.getConfiguredClass(DbMaintainer.class,configuration);
  return createInstanceOfType(clazz,false,new Class<?>[]{ScriptRunner.class,ScriptSource.class,ExecutedScriptInfoSource.class,boolean.class,boolean.class,boolean.class,boolean.class,boolean.class,DBClearer.class,DBCleaner.class,ConstraintsDisabler.class,SequenceUpdater.class},new Object[]{scriptRunner,scriptSource,executedScriptInfoSource,fromScratchEnabled,keepRetryingAfterError,cleanDbEnabled,disableConstraintsEnabled,updateSequencesEnabled,dbClearer,dbCleaner,constraintsDisabler,sequenceUpdater});
}
Program: 143866
Project: 143866
Buggy source:
protected ScriptUpdates(Map<ScriptUpdateType,SortedSet<ScriptUpdate>> regularScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> irregularScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> patchScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> postprocessingScriptUpdates){
  this.regularScriptUpdates=regularScriptUpdates;
  this.irregularScriptUpdates=irregularScriptUpdates;
  this.patchScriptUpdates=patchScriptUpdates;
  this.postprocessingScriptUpdates=postprocessingScriptUpdates;
}

Fixed version (ground truth):
protected ScriptUpdates(Map<ScriptUpdateType,SortedSet<ScriptUpdate>> regularScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> irregularScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> repeatableScriptDeletions,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> regularPatchScriptUpdates,Map<ScriptUpdateType,SortedSet<ScriptUpdate>> postprocessingScriptUpdates){
  this.regularScriptUpdates=regularScriptUpdates;
  this.irregularScriptUpdates=irregularScriptUpdates;
  this.repeatableScriptDeletions=repeatableScriptDeletions;
  this.regularPatchScriptUpdates=regularPatchScriptUpdates;
  this.postprocessingScriptUpdates=postprocessingScriptUpdates;
}
Program: 143867
Project: 143867
Buggy source:
public SortedSet<ScriptUpdate> getRegularPatchScriptUpdates(){
  SortedSet<ScriptUpdate> result=new TreeSet<ScriptUpdate>();
  for (  ScriptUpdateType patchScriptUpdateType : ScriptUpdateType.getPatchScriptUpdateTypes()) {
    result.addAll(patchScriptUpdates.get(patchScriptUpdateType));
  }
  return result;
}

Fixed version (ground truth):
public SortedSet<ScriptUpdate> getRegularPatchScriptUpdates(){
  SortedSet<ScriptUpdate> result=new TreeSet<ScriptUpdate>();
  for (  ScriptUpdateType patchScriptUpdateType : ScriptUpdateType.getPatchScriptUpdateTypes()) {
    result.addAll(regularPatchScriptUpdates.get(patchScriptUpdateType));
  }
  return result;
}
Program: 143869
Project: 143869
Buggy source:
@Test public void testErrorInIncrementalScript(){
  enableFromScratch();
  createInitialScripts();
  errorInInitialScript();
  newIncrementalScript();
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str");
  }
  assertTablesDontExist(INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str",INITIAL_INCREMENTAL_2);
  }
  assertTablesDontExist(INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
  fixErrorInInitialScript();
  updateDatabase();
  assertTablesExist(INITIAL_INCREMENTAL_1,INITIAL_REPEATABLE,INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
}

Fixed version (ground truth):
@Test public void testErrorInIncrementalScript(){
  enableFromScratch();
  createInitialScripts();
  errorInInitialScript();
  newIncrementalScript();
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str");
  }
  assertTablesDontExist(INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str",INITIAL_INCREMENTAL_2 + "String_Node_Str");
  }
  assertTablesDontExist(INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
  fixErrorInInitialScript();
  updateDatabase();
  assertTablesExist(INITIAL_INCREMENTAL_1,INITIAL_REPEATABLE,INITIAL_INCREMENTAL_2,NEW_INCREMENTAL_1);
}
Program: 143870
Project: 143870
Buggy source:
@Test public void testErrorInRepeatableScript(){
  createInitialScripts();
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
  }
  try {
    updateDatabase();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str","String_Node_Str",INITIAL_REPEATABLE + "String_Node_Str");
  }
  updateDatabase();
  assertTablesExist(INITIAL_INCREMENTAL_1,INITIAL_REPEATABLE,INITIAL_INCREMENTAL_2);
}

Fixed version (ground truth):
@Test public void testErrorInRepeatableScript(){
  enableFromScratch();
  createInitialScripts();
  errorInRepeatableScript();
  try {
    updateDatabase();
    fail();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str",INITIAL_REPEATABLE + "String_Node_Str");
  }
  try {
    updateDatabase();
    fail();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str",INITIAL_REPEATABLE + "String_Node_Str");
  }
  updateIncrementalScript();
  try {
    updateDatabase();
    fail();
  }
 catch (  DbMaintainException e) {
    assertMessageContains(e.getMessage(),"String_Node_Str",INITIAL_REPEATABLE + "String_Node_Str");
  }
  fixErrorInRepeatableScript();
  updateDatabase();
  assertTablesExist(UPDATED_INCREMENTAL_1,INITIAL_REPEATABLE,INITIAL_INCREMENTAL_2);
}
Program: 143871
Project: 143871
Buggy source:
/** 
 * Deletions of repeatable scripts are currently not registered! Nothing is done if a repeatable script is deleted: this is ignored. This must be fixed in the future! TODO
 */
@Test public void repeatableScriptDeleted(){
  executedScripts(REPEATABLE_1,REPEATABLE_2);
  scripts(REPEATABLE_1);
  calculateScriptUpdates();
  assertNoScriptUpdates();
}

Fixed version (ground truth):
@Test public void repeatableScriptDeleted(){
  executedScripts(REPEATABLE_1,REPEATABLE_2);
  scripts(REPEATABLE_1);
  calculateScriptUpdates();
  assertRepeatableScriptDeletion(REPEATABLE_2);
}
Program: 143872
Project: 143872
Buggy source:
/** 
 * todo check javadoc <p/> Checks whether the database should be updated from scratch or just incrementally. The database needs to be rebuilt in following cases: <ul> <li>Some existing scripts were modified.</li> <li>The last update of the database was unsuccessful.</li> </ul>
 * @param currentVersion         The current database version, not null
 * @param alreadyExecutedScripts The current set of executed scripts, not null
 * @return True if a from scratch rebuild is needed, false otherwise
 */
protected boolean shouldUpdateDatabaseFromScratch(ScriptIndexes currentVersion,Set<ExecutedScript> alreadyExecutedScripts){
  if (scriptSource.isIncrementalScriptModified(currentVersion,alreadyExecutedScripts)) {
    if (fromScratchEnabled) {
      logger.info("String_Node_Str");
      return true;
    }
    throw new DbMaintainException("String_Node_Str" + "String_Node_Str");
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the database should be updated from scratch or just incrementally. The database needs to be rebuilt in following cases: <ul> <li>Some existing scripts were modified.</li> <li>The last update of the database was unsuccessful.</li> </ul> The database will only be rebuilt from scratch if from scratch is enabled. If the keep retrying is set to false, the database will only be rebuilt again after an unsuccessful build when a change is made to the script files. Otherwise it will not attempt to rebuild the database.
 * @param currentVersion         The current database version, not null
 * @param alreadyExecutedScripts The scripts that were already applied on the database, not null
 * @return True if a from scratch rebuild is needed, false otherwise
 */
protected boolean shouldUpdateDatabaseFromScratch(ScriptIndexes currentVersion,Set<ExecutedScript> alreadyExecutedScripts){
  if (scriptSource.isIncrementalScriptModified(currentVersion,alreadyExecutedScripts)) {
    if (!fromScratchEnabled) {
      throw new DbMaintainException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    logger.info("String_Node_Str");
    return true;
  }
  if (errorInIndexedScriptDuringLastUpdate(alreadyExecutedScripts)) {
    if (fromScratchEnabled) {
      if (!keepRetryingAfterError) {
        throw new DbMaintainException("String_Node_Str" + PROPKEY_KEEP_RETRYING_AFTER_ERROR_ENABLED + "String_Node_Str"+ "String_Node_Str");
      }
      logger.info("String_Node_Str" + "String_Node_Str");
      return true;
    }
 else {
      logger.warn("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      return false;
    }
  }
  return false;
}
Program: 143873
Project: 143873
Buggy source:
public DefaultDbMaintainer(ScriptRunner scriptRunner,ScriptSource scriptSource,ExecutedScriptInfoSource executedScriptInfoSource,boolean fromScratchEnabled,boolean cleanDbEnabled,boolean disableConstraintsEnabled,boolean updateSequencesEnabled,DBClearer dbClearer,DBCleaner dbCleaner,ConstraintsDisabler constraintsDisabler,SequenceUpdater sequenceUpdater){
  this.scriptRunner=scriptRunner;
  this.scriptSource=scriptSource;
  this.executedScriptInfoSource=executedScriptInfoSource;
  this.fromScratchEnabled=fromScratchEnabled;
  this.cleanDbEnabled=cleanDbEnabled;
  this.disableConstraintsEnabled=disableConstraintsEnabled;
  this.updateSequencesEnabled=updateSequencesEnabled;
  this.dbClearer=dbClearer;
  this.dbCleaner=dbCleaner;
  this.constraintsDisabler=constraintsDisabler;
  this.sequenceUpdater=sequenceUpdater;
}

Fixed version (ground truth):
public DefaultDbMaintainer(ScriptRunner scriptRunner,ScriptSource scriptSource,ExecutedScriptInfoSource executedScriptInfoSource,boolean fromScratchEnabled,boolean keepRetryingAfterError,boolean cleanDbEnabled,boolean disableConstraintsEnabled,boolean updateSequencesEnabled,DBClearer dbClearer,DBCleaner dbCleaner,ConstraintsDisabler constraintsDisabler,SequenceUpdater sequenceUpdater){
  this.scriptRunner=scriptRunner;
  this.scriptSource=scriptSource;
  this.executedScriptInfoSource=executedScriptInfoSource;
  this.fromScratchEnabled=fromScratchEnabled;
  this.keepRetryingAfterError=keepRetryingAfterError;
  this.cleanDbEnabled=cleanDbEnabled;
  this.disableConstraintsEnabled=disableConstraintsEnabled;
  this.updateSequencesEnabled=updateSequencesEnabled;
  this.dbClearer=dbClearer;
  this.dbCleaner=dbCleaner;
  this.constraintsDisabler=constraintsDisabler;
  this.sequenceUpdater=sequenceUpdater;
}
Program: 143874
Project: 143874
Buggy source:
/** 
 * Constructor for DefaultScriptRunner.
 * @param scriptParserFactory
 * @param defaultDbSupport
 * @param nameDbSupportMap
 * @param sqlHandler 
 */
public DefaultScriptRunner(ScriptParserFactory scriptParserFactory,DbSupport defaultDbSupport,Map<String,DbSupport> nameDbSupportMap,SQLHandler sqlHandler){
  this.scriptParserFactory=scriptParserFactory;
  this.defaultDbSupport=defaultDbSupport;
  this.nameDbSupportMap=nameDbSupportMap;
  this.sqlHandler=sqlHandler;
}

Fixed version (ground truth):
/** 
 * Constructor for DefaultScriptRunner.
 * @param scriptParserFactory
 * @param defaultDbSupport
 * @param nameDbSupportMap
 * @param sqlHandler
 */
public DefaultScriptRunner(ScriptParserFactory scriptParserFactory,DbSupport defaultDbSupport,Map<String,DbSupport> nameDbSupportMap,SQLHandler sqlHandler){
  this.scriptParserFactory=scriptParserFactory;
  this.defaultDbSupport=defaultDbSupport;
  this.nameDbSupportMap=nameDbSupportMap;
  this.sqlHandler=sqlHandler;
}
Program: 143876
Project: 143876
Buggy source:
@Override public void newRevision(Object arg0){
  SIGHRevisionEntity revisionEntity=(SIGHRevisionEntity)arg0;
  if (!processReplicationChange(revisionEntity)) {
    if (!processJSFChange(revisionEntity)) {
      throw new KarakuRuntimeException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void newRevision(Object arg0){
  SIGHRevisionEntity revisionEntity=(SIGHRevisionEntity)arg0;
  if (!processReplicationChange(revisionEntity) && !processJSFChange(revisionEntity)) {
    throw new KarakuRuntimeException("String_Node_Str");
  }
}
Program: 143877
Project: 143877
Buggy source:
/** 
 * Verifica si esta activado JPA y si no es así lo deshabilita.
 */
private void checkState(){
  if (this.properties.getBoolean(KARAKU_JPA_ENABLED,true)) {
    this.enabled=true;
  }
 else {
    log.info("String_Node_Str");
    this.enabled=false;
    log.info("String_Node_Str");
    this.liquibase=false;
    return;
  }
  if (this.properties.getBoolean("String_Node_Str",true)) {
    this.liquibase=true;
  }
 else {
    log.info("String_Node_Str");
    this.liquibase=false;
  }
}

Fixed version (ground truth):
/** 
 * Verifica si esta activado JPA y si no es así lo deshabilita.
 */
private void checkState(){
  if (this.properties.getBoolean(KARAKU_JPA_ENABLED,true)) {
    this.enabled=true;
  }
 else {
    LOG.info("String_Node_Str");
    this.enabled=false;
    LOG.info("String_Node_Str");
    this.liquibase=false;
    return;
  }
  if (this.properties.getBoolean("String_Node_Str",true)) {
    this.liquibase=true;
  }
 else {
    LOG.info("String_Node_Str");
    this.liquibase=false;
  }
}
Program: 143878
Project: 143878
Buggy source:
private Jaxb2Marshaller getJaxb2Marshaller(){
  if (!(properties.get(KARAKU_WS_CLIENT_ENABLED).equals("String_Node_Str"))) {
    return null;
  }
  Pattern pattern=Pattern.compile(properties.get(KARAKU_WS_CLIENT_PACKAGES_TO_SCAN,DEFAULT_PACKAGES_TO_SCAN_EXPRESSION));
  Package[] packages=Package.getPackages();
  List<String> packagesFound=new ArrayList<String>();
  for (  Package pa : packages) {
    Matcher matcher=pattern.matcher(pa.getName());
    if (matcher.matches()) {
      log.info("String_Node_Str" + pa.getName());
      packagesFound.add(pa.getName());
    }
  }
  String paquetes=properties.get(KARAKU_WS_CLIENT_PACKAGES_TO_SCAN_SPACES,"String_Node_Str").trim();
  if (!"String_Node_Str".equals(paquetes)) {
    for (    String pa : paquetes.split("String_Node_Str")) {
      packagesFound.add(pa);
    }
  }
  try {
    Class<?> clazz=Class.forName("String_Node_Str");
    Object o=clazz.newInstance();
    String[] clases=packagesFound.toArray(new String[0]);
    clazz.getMethod("String_Node_Str",String[].class).invoke(o,(Object)clases);
    return (Jaxb2Marshaller)o;
  }
 catch (  ClassNotFoundException e) {
    throw new KarakuRuntimeException("String_Node_Str" + "String_Node_Str",e);
  }
catch (  Exception e) {
    throw new KarakuRuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private Jaxb2Marshaller getJaxb2Marshaller(){
  if (!(properties.get(KARAKU_WS_CLIENT_ENABLED).equals("String_Node_Str"))) {
    return null;
  }
  Pattern pattern=Pattern.compile(properties.get(KARAKU_WS_CLIENT_PACKAGES_TO_SCAN,DEFAULT_PACKAGES_TO_SCAN_EXPRESSION));
  Package[] packages=Package.getPackages();
  List<String> packagesFound=new ArrayList<String>();
  for (  Package pa : packages) {
    Matcher matcher=pattern.matcher(pa.getName());
    if (matcher.matches()) {
      log.info("String_Node_Str" + pa.getName());
      packagesFound.add(pa.getName());
    }
  }
  addSpecificPackages(packagesFound);
  return instanciateMarshaller(packagesFound);
}