Program: 65026
Project: 65026
Buggy source:
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,Collection<String> driverClassPath) throws SQLException, OdaException {
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  Exception connFactoryEx=null;
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    try {
      Connection cn=factory.getConnection(driverClass,url,connectionProperties);
      return cn;
    }
 catch (    Exception ex) {
      if (ex instanceof SQLException && INVALID_AUTH_SQL_STATE.equals(((SQLException)ex).getSQLState()))       throw (SQLException)ex;
      connFactoryEx=ex;
    }
  }
  try {
    loadAndRegisterDriver(driverClass,driverClassPath);
  }
 catch (  OdaException loadDriverEx) {
    if (connFactoryEx != null) {
      if (connFactoryEx instanceof SQLException)       throw (SQLException)connFactoryEx;
      throw new OdaException(connFactoryEx);
    }
    throw loadDriverEx;
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + LogUtil.encryptURL(url));
  try {
    Driver driver=DriverManager.getDriver(url);
    if (driver != null)     return driver.connect(url,connectionProperties);
  }
 catch (  SQLException e1) {
    if (INVALID_AUTH_SQL_STATE.equals(e1.getSQLState()))     throw e1;
  }
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  SQLException e) {
    try {
      DriverClassLoader dl=new DriverClassLoader(driverClassPath,Thread.currentThread().getContextClassLoader());
      Class dc=dl.loadClass(driverClass);
      if (dc != null)       return ((Driver)dc.newInstance()).connect(url,connectionProperties);
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(e.getLocalizedMessage()));
    }
 catch (    Exception e1) {
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(e.getLocalizedMessage()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private Connection doConnect(String driverClass,String url,String jndiNameUrl,Properties connectionProperties,Collection<String> driverClassPath) throws SQLException, OdaException {
  Connection jndiDSConnection=getJndiDSConnection(driverClass,jndiNameUrl,connectionProperties);
  if (jndiDSConnection != null)   return jndiDSConnection;
  IConnectionFactory factory=getDriverConnectionFactory(driverClass);
  Exception connFactoryEx=null;
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    try {
      Connection cn=factory.getConnection(driverClass,url,connectionProperties);
      return cn;
    }
 catch (    Exception ex) {
      if (ex instanceof SQLException && INVALID_AUTH_SQL_STATE.equals(((SQLException)ex).getSQLState()))       throw (SQLException)ex;
      connFactoryEx=ex;
    }
  }
  try {
    loadAndRegisterDriver(driverClass,driverClassPath);
  }
 catch (  OdaException loadDriverEx) {
    if (connFactoryEx != null) {
      if (connFactoryEx instanceof SQLException)       throw (SQLException)connFactoryEx;
      throw new OdaException(connFactoryEx);
    }
    throw loadDriverEx;
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + LogUtil.encryptURL(url));
  try {
    Driver driver=DriverManager.getDriver(url);
    if (driver != null)     return driver.connect(url,connectionProperties);
  }
 catch (  SQLException e1) {
    if (INVALID_AUTH_SQL_STATE.equals(e1.getSQLState()))     throw e1;
  }
  try {
    return DriverManager.getConnection(url,connectionProperties);
  }
 catch (  SQLException e) {
    try {
      DriverClassLoader dl=new DriverClassLoader(driverClassPath,Thread.currentThread().getContextClassLoader());
      Class dc=dl.loadClass(driverClass);
      if (dc != null) {
        Connection conn=((Driver)dc.newInstance()).connect(url,connectionProperties);
        if (conn != null)         return conn;
      }
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(e.getLocalizedMessage()));
    }
 catch (    Exception e1) {
      throw new JDBCException(ResourceConstants.CONN_GET_ERROR,null,truncate(e.getLocalizedMessage()));
    }
  }
}