Program: 65834
Project: 65834
Buggy source:
/** 
 * Implementation of getConnection() methods. Gets connection from either java.sql.DriverManager,  or from IConnectionFactory defined in the extension
 */
private synchronized 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);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  loadAndRegisterDriver(driverClass,driverClassPath);
  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 ("String_Node_Str".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);
  if (factory != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + driverClass + "String_Node_Str"+ LogUtil.encryptURL(url));
    return factory.getConnection(driverClass,url,connectionProperties);
  }
  loadAndRegisterDriver(driverClass,driverClassPath);
  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 ("String_Node_Str".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()));
    }
  }
}