Program: 89577
Project: 89577
Buggy source:
/** 
 * When nodata is true, restore schema only PLUS the ordertemplates table in the harvestdb.
 * @param nodata
 * @throws Exception
 */
protected void replaceDatabasesWithProd(boolean nodata) throws Exception {
  String dropAdminDB="String_Node_Str";
  String createAdminDB="String_Node_Str";
  String dropHarvestDB="String_Node_Str";
  String createHarvestDB="String_Node_Str";
  addFixture("String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,dropHarvestDB);
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createHarvestDB);
  addFixture("String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,dropAdminDB);
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createAdminDB);
  addFixture("String_Node_Str");
  if (nodata) {
    addFixture("String_Node_Str");
    String createRelationsAdminDB="String_Node_Str";
    String populateSchemaversionsAdminDB="String_Node_Str";
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createRelationsAdminDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchemaversionsAdminDB);
    addFixture("String_Node_Str");
    String createRelationsHarvestDB="String_Node_Str";
    String populateSchemaVersionsHarvestDB="String_Node_Str";
    String populateOrdertemplatesHarvestDB="String_Node_Str";
    String populateSchedulesDB="String_Node_Str";
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createRelationsHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchemaVersionsHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateOrdertemplatesHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchedulesDB);
  }
 else {
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,"String_Node_Str" + TESTNAME.toLowerCase() + "String_Node_Str");
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,"String_Node_Str" + TESTNAME.toLowerCase() + "String_Node_Str");
  }
  addFixture("String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * When nodata is true, restore schema only PLUS the ordertemplates table in the harvestdb.
 * @param nodata
 * @throws Exception
 */
protected void replaceDatabasesWithProd(boolean nodata) throws Exception {
  String dropAdminDB="String_Node_Str";
  String createAdminDB="String_Node_Str";
  String dropHarvestDB="String_Node_Str";
  String createHarvestDB="String_Node_Str";
  addFixture("String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,dropHarvestDB);
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createHarvestDB);
  addFixture("String_Node_Str");
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,dropAdminDB);
  environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createAdminDB);
  addFixture("String_Node_Str");
  if (nodata) {
    addFixture("String_Node_Str");
    String createRelationsAdminDB="String_Node_Str";
    String populateSchemaversionsAdminDB="String_Node_Str";
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createRelationsAdminDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchemaversionsAdminDB);
    addFixture("String_Node_Str");
    String createRelationsHarvestDB="String_Node_Str";
    String populateSchemaVersionsHarvestDB="String_Node_Str";
    String populateOrdertemplatesHarvestDB="String_Node_Str";
    String populateSchedulesDB="String_Node_Str";
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,createRelationsHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchemaVersionsHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateOrdertemplatesHarvestDB);
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,populateSchedulesDB);
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
  }
 else {
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,"String_Node_Str" + TESTNAME.toLowerCase() + "String_Node_Str");
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,"String_Node_Str" + TESTNAME.toLowerCase() + "String_Node_Str");
    addFixture("String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
    environmentManager.runTestXCommand(TestEnvironment.CHECKSUM_SERVER,"String_Node_Str");
  }
}