Program: 137633
Project: 137633
Buggy source:
/** 
 * Method "createConnection".
 * @param url the database url
 * @param driverClassName the Driver classname
 * @param props properties passed to the driver manager for getting the connection (normally at least a "user" and"password" property should be included)
 * @return the connection
 * @throws SQLException
 * @throws InstantiationException
 * @throws IllegalAccessException
 * @throws ClassNotFoundException
 * @throws IOException
 */
public static java.sql.Connection createConnection(String url,String driverClassName,Properties props) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
  Driver driver=getClassDriver(driverClassName,url,props);
  if (driver != null) {
    DriverManager.registerDriver(driver);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + driverClassName);
      log.debug("String_Node_Str");
      Enumeration<Driver> drivers=DriverManager.getDrivers();
      while (drivers.hasMoreElements()) {
        log.debug(drivers.nextElement());
      }
    }
    java.sql.Connection connection=null;
    if (driverClassName.equals(EDriverName.HSQLDEFAULTURL.getDbDriver())) {
      try {
        Class.forName("String_Node_Str");
      }
 catch (      ClassNotFoundException e) {
        log.error(e,e);
      }
      if (isTimeout()) {
        DriverManager.setLoginTimeout(LOGIN_TIMEOUT_SECOND);
      }
      connection=DriverManager.getConnection(url,props);
    }
 else {
      connection=createConnectionWithTimeout(driver,url,props);
    }
    return connection;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Method "createConnection".
 * @param url the database url
 * @param driverClassName the Driver classname
 * @param props properties passed to the driver manager for getting the connection (normally at least a "user" and"password" property should be included)
 * @return the connection
 * @throws SQLException
 * @throws InstantiationException
 * @throws IllegalAccessException
 * @throws ClassNotFoundException
 * @throws IOException
 */
public static java.sql.Connection createConnection(String url,String driverClassName,Properties props) throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
  Driver driver=getClassDriver(driverClassName,url,props);
  if (driver != null) {
    DriverManager.registerDriver(driver);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + driverClassName);
      log.debug("String_Node_Str");
      Enumeration<Driver> drivers=DriverManager.getDrivers();
      while (drivers.hasMoreElements()) {
        log.debug(drivers.nextElement());
      }
    }
    java.sql.Connection connection=null;
    if (driverClassName.equals(EDatabase4DriverClassName.HSQLDB.getDriverClass())) {
      try {
        Class.forName(EDatabase4DriverClassName.HSQLDB.getDriverClass());
      }
 catch (      ClassNotFoundException e) {
        log.error(e,e);
      }
      if (isTimeout()) {
        DriverManager.setLoginTimeout(LOGIN_TIMEOUT_SECOND);
      }
      connection=DriverManager.getConnection(url,props);
    }
 else {
      connection=createConnectionWithTimeout(driver,url,props);
    }
    return connection;
  }
  return null;
}