Program: 89703
Project: 89703
Buggy source:
/** 
 * Properties of the hibernate session are loaded from settings.xml. There is therefore no need for a separate hibernate configuration file.
 */
private static void initialiseFactory(){
  if (sessionFactory == null || sessionFactory.isClosed()) {
    try {
      log.info("String_Node_Str");
      AnnotationConfiguration config=new AnnotationConfiguration();
      config.setProperty(CONNECTION_PROVIDER_CLASS,ORG_HIBERNATE_CONNECTION_C3_P0_CONNECTION_PROVIDER);
      config.setProperty(C3P0_ACQUIRE_INCREMENT,Settings.get(WaybackSettings.C3P0_ACQUIRE_INCREMENT));
      config.setProperty(C3P0_IDLE_TEST_PERIOD,Settings.get(WaybackSettings.C3P0_IDLE_PERIOD));
      config.setProperty(C3P0_MAX_SIZE,Settings.get(WaybackSettings.C3P0_MAX_SIZE));
      config.setProperty(C3P0_MAX_STATEMENTS,Settings.get(WaybackSettings.C3P0_MAX_STATEMENTS));
      config.setProperty(C3P0_MIN_SIZE,Settings.get(WaybackSettings.C3P0_MIN_SIZE));
      config.setProperty(C3P0_TIMEOUT,Settings.get(WaybackSettings.C3P0_TIMEOUT));
      config.setProperty(HIBERNATE_CONNECTION_DRIVER_CLASS,Settings.get(WaybackSettings.HIBERNATE_DB_DRIVER));
      config.setProperty(HIBERNATE_CONNECTION_URL,Settings.get(WaybackSettings.HIBERNATE_DB_URL));
      config.setProperty(HIBERNATE_DIALECT,Settings.get(WaybackSettings.HIBERNATE_DIALECT));
      config.setProperty(HIBERNATE_FORMAT_SQL,Settings.get(WaybackSettings.HIBERNATE_FORMAT_SQL));
      config.setProperty(HIBERNATE_BYTECODE_USE_REFLECTION_OPTIMIZER,Settings.get(WaybackSettings.HIBERNATE_REFLECTION_OPTIMIZER));
      config.setProperty(HIBERNATE_HBM2DDL_AUTO,Settings.get(WaybackSettings.HIBERNATE_HBM2DDL_AUTO));
      config.setProperty(HIBERNATE_TRANSACTION_FACTORY_CLASS,Settings.get(WaybackSettings.HIBERNATE_TRANSACTION_FACTORY));
      config.setProperty(HIBERNATE_SHOW_SQL,Settings.get(WaybackSettings.HIBERNATE_SHOW_SQL));
      log.info("String_Node_Str" + CONNECTION_PROVIDER_CLASS + "String_Node_Str"+ ORG_HIBERNATE_CONNECTION_C3_P0_CONNECTION_PROVIDER+ "String_Node_Str"+ C3P0_ACQUIRE_INCREMENT+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_ACQUIRE_INCREMENT)+ "String_Node_Str"+ C3P0_IDLE_TEST_PERIOD+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_IDLE_PERIOD + "String_Node_Str" + C3P0_MAX_SIZE+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MAX_SIZE)+ "String_Node_Str"+ C3P0_MAX_STATEMENTS+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MAX_STATEMENTS)+ "String_Node_Str"+ C3P0_MIN_SIZE+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MIN_SIZE)+ "String_Node_Str"+ C3P0_TIMEOUT+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_TIMEOUT)+ "String_Node_Str"+ HIBERNATE_CONNECTION_DRIVER_CLASS+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DB_DRIVER)+ "String_Node_Str"+ HIBERNATE_CONNECTION_URL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DB_URL)+ "String_Node_Str"+ HIBERNATE_DIALECT+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DIALECT)+ "String_Node_Str"+ HIBERNATE_FORMAT_SQL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_FORMAT_SQL)+ "String_Node_Str"+ HIBERNATE_BYTECODE_USE_REFLECTION_OPTIMIZER+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_REFLECTION_OPTIMIZER)+ "String_Node_Str"+ HIBERNATE_HBM2DDL_AUTO+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_HBM2DDL_AUTO)+ "String_Node_Str"+ HIBERNATE_TRANSACTION_FACTORY_CLASS+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_TRANSACTION_FACTORY)+ "String_Node_Str"+ HIBERNATE_SHOW_SQL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_SHOW_SQL)));
      if (!Settings.get(WaybackSettings.HIBERNATE_USERNAME).isEmpty()) {
        config.setProperty(HIBERNATE_CONNECTION_USERNAME,Settings.get(WaybackSettings.HIBERNATE_USERNAME));
      }
      if (!Settings.get(WaybackSettings.HIBERNATE_PASSWORD).isEmpty()) {
        config.setProperty(HIBERNATE_CONNECTION_PASSWORD,Settings.get(WaybackSettings.HIBERNATE_PASSWORD));
      }
      config.addAnnotatedClass(ArchiveFile.class);
      sessionFactory=config.buildSessionFactory();
    }
 catch (    Throwable ex) {
      log.fatal("String_Node_Str" + "String_Node_Str",ex);
      throw new IllegalStateException("String_Node_Str" + "String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Properties of the hibernate session are loaded from settings.xml. There is therefore no need for a separate hibernate configuration file.
 */
private static void initialiseFactory(){
  if (sessionFactory == null || sessionFactory.isClosed()) {
    try {
      log.info("String_Node_Str");
      AnnotationConfiguration config=new AnnotationConfiguration();
      config.setProperty(CONNECTION_PROVIDER_CLASS,ORG_HIBERNATE_CONNECTION_C3_P0_CONNECTION_PROVIDER);
      config.setProperty(C3P0_ACQUIRE_INCREMENT,Settings.get(WaybackSettings.C3P0_ACQUIRE_INCREMENT));
      config.setProperty(C3P0_IDLE_TEST_PERIOD,Settings.get(WaybackSettings.C3P0_IDLE_PERIOD));
      config.setProperty(C3P0_MAX_SIZE,Settings.get(WaybackSettings.C3P0_MAX_SIZE));
      config.setProperty(C3P0_MAX_STATEMENTS,Settings.get(WaybackSettings.C3P0_MAX_STATEMENTS));
      config.setProperty(C3P0_MIN_SIZE,Settings.get(WaybackSettings.C3P0_MIN_SIZE));
      config.setProperty(C3P0_TIMEOUT,Settings.get(WaybackSettings.C3P0_TIMEOUT));
      config.setProperty(HIBERNATE_CONNECTION_DRIVER_CLASS,Settings.get(WaybackSettings.HIBERNATE_DB_DRIVER));
      config.setProperty(HIBERNATE_CONNECTION_URL,Settings.get(WaybackSettings.HIBERNATE_DB_URL));
      config.setProperty(HIBERNATE_DIALECT,Settings.get(WaybackSettings.HIBERNATE_DIALECT));
      config.setProperty(HIBERNATE_FORMAT_SQL,Settings.get(WaybackSettings.HIBERNATE_FORMAT_SQL));
      config.setProperty(HIBERNATE_BYTECODE_USE_REFLECTION_OPTIMIZER,Settings.get(WaybackSettings.HIBERNATE_REFLECTION_OPTIMIZER));
      config.setProperty(HIBERNATE_HBM2DDL_AUTO,Settings.get(WaybackSettings.HIBERNATE_HBM2DDL_AUTO));
      config.setProperty(HIBERNATE_TRANSACTION_FACTORY_CLASS,Settings.get(WaybackSettings.HIBERNATE_TRANSACTION_FACTORY));
      config.setProperty(HIBERNATE_SHOW_SQL,Settings.get(WaybackSettings.HIBERNATE_SHOW_SQL));
      log.info("String_Node_Str" + CONNECTION_PROVIDER_CLASS + "String_Node_Str"+ ORG_HIBERNATE_CONNECTION_C3_P0_CONNECTION_PROVIDER+ "String_Node_Str"+ C3P0_ACQUIRE_INCREMENT+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_ACQUIRE_INCREMENT)+ "String_Node_Str"+ C3P0_IDLE_TEST_PERIOD+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_IDLE_PERIOD)+ "String_Node_Str"+ C3P0_MAX_SIZE+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MAX_SIZE)+ "String_Node_Str"+ C3P0_MAX_STATEMENTS+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MAX_STATEMENTS)+ "String_Node_Str"+ C3P0_MIN_SIZE+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_MIN_SIZE)+ "String_Node_Str"+ C3P0_TIMEOUT+ "String_Node_Str"+ Settings.get(WaybackSettings.C3P0_TIMEOUT)+ "String_Node_Str"+ HIBERNATE_CONNECTION_DRIVER_CLASS+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DB_DRIVER)+ "String_Node_Str"+ HIBERNATE_CONNECTION_URL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DB_URL)+ "String_Node_Str"+ HIBERNATE_DIALECT+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_DIALECT)+ "String_Node_Str"+ HIBERNATE_FORMAT_SQL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_FORMAT_SQL)+ "String_Node_Str"+ HIBERNATE_BYTECODE_USE_REFLECTION_OPTIMIZER+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_REFLECTION_OPTIMIZER)+ "String_Node_Str"+ HIBERNATE_HBM2DDL_AUTO+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_HBM2DDL_AUTO)+ "String_Node_Str"+ HIBERNATE_TRANSACTION_FACTORY_CLASS+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_TRANSACTION_FACTORY)+ "String_Node_Str"+ HIBERNATE_SHOW_SQL+ "String_Node_Str"+ Settings.get(WaybackSettings.HIBERNATE_SHOW_SQL));
      if (!Settings.get(WaybackSettings.HIBERNATE_USERNAME).isEmpty()) {
        config.setProperty(HIBERNATE_CONNECTION_USERNAME,Settings.get(WaybackSettings.HIBERNATE_USERNAME));
      }
      if (!Settings.get(WaybackSettings.HIBERNATE_PASSWORD).isEmpty()) {
        config.setProperty(HIBERNATE_CONNECTION_PASSWORD,Settings.get(WaybackSettings.HIBERNATE_PASSWORD));
      }
      config.addAnnotatedClass(ArchiveFile.class);
      sessionFactory=config.buildSessionFactory();
    }
 catch (    Throwable ex) {
      log.fatal("String_Node_Str" + "String_Node_Str",ex);
      throw new IllegalStateException("String_Node_Str" + "String_Node_Str",ex);
    }
  }
}