Program: 128857
Project: 128857
Buggy source:
/** 
 * DOC YeXiaowei Comment method "getConnection".
 * @param jarPath
 * @param driverClassName
 * @param url
 * @param username
 * @param password
 * @return
 */
public List getConnection(String[] jarPath,String driverClassName,String url,String username,String password,String dbType,String dbVersion,String additionalParams) throws Exception {
  List list=new ArrayList();
  HotClassLoader loader;
  boolean flog=EDatabaseVersion4Drivers.containTypeAndVersion(dbType,dbVersion);
  if (flog) {
    loader=(HotClassLoader)classLoadersMap.get(dbType,dbVersion);
    if (loader == null) {
      loader=new HotClassLoader();
      for (int i=0; i < jarPath.length; i++) {
        loader.addPath(jarPath[i]);
      }
      classLoadersMap.put(dbType,dbVersion,loader);
    }
  }
 else {
    loader=HotClassLoader.getInstance();
    for (int i=0; i < jarPath.length; i++) {
      if (jarPath[i].contains("String_Node_Str")) {
        String[] splittedPath=jarPath[i].split("String_Node_Str");
        for (int j=0; j < splittedPath.length; j++) {
          loader.addPath(splittedPath[j]);
        }
      }
 else {
        loader.addPath(jarPath[i]);
      }
    }
  }
  DriverShim wapperDriver=null;
  Connection connection=null;
  try {
    Class<?> driver=Class.forName(driverClassName,true,loader);
    wapperDriver=new DriverShim((Driver)(driver.newInstance()));
    Properties info=new Properties();
    username=username != null ? username : "String_Node_Str";
    password=password != null ? password : "String_Node_Str";
    info.put("String_Node_Str",username);
    info.put("String_Node_Str",password);
    if (additionalParams != null && !"String_Node_Str".equals(additionalParams) && dbType.toUpperCase().contains("String_Node_Str")) {
      additionalParams=additionalParams.replaceAll("String_Node_Str","String_Node_Str");
      info.load(new java.io.ByteArrayInputStream(additionalParams.getBytes()));
      connection=wapperDriver.connect(url,info);
    }
 else {
      if (dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()) && additionalParams.indexOf(SHUTDOWN_PARAM) == -1) {
        url=url + SHUTDOWN_PARAM;
      }
      if (dbType.equals(EDatabaseTypeName.MSSQL.getDisplayName())) {
        connection=ConnectionUtils.createConnection(url,(Driver)(driver.newInstance()),info);
      }
 else {
        connection=wapperDriver.connect(url,info);
      }
    }
    list.add(connection);
    list.add(wapperDriver);
    return list;
  }
 catch (  Throwable e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "getConnection".
 * @param jarPath
 * @param driverClassName
 * @param url
 * @param username
 * @param password
 * @return
 */
public List getConnection(String[] jarPath,String driverClassName,String url,String username,String password,String dbType,String dbVersion,String additionalParams) throws Exception {
  List list=new ArrayList();
  HotClassLoader loader;
  boolean flog=EDatabaseVersion4Drivers.containTypeAndVersion(dbType,dbVersion);
  if (flog) {
    loader=(HotClassLoader)classLoadersMap.get(dbType,dbVersion);
    if (loader == null) {
      loader=new HotClassLoader();
      for (      String element : jarPath) {
        loader.addPath(element);
      }
      classLoadersMap.put(dbType,dbVersion,loader);
    }
  }
 else {
    loader=HotClassLoader.getInstance();
    for (    String element : jarPath) {
      if (element.contains("String_Node_Str")) {
        String[] splittedPath=element.split("String_Node_Str");
        for (        String element2 : splittedPath) {
          loader.addPath(element2);
        }
      }
 else {
        loader.addPath(element);
      }
    }
  }
  DriverShim wapperDriver=null;
  Connection connection=null;
  try {
    Class<?> driver=Class.forName(driverClassName,true,loader);
    wapperDriver=new DriverShim((Driver)(driver.newInstance()));
    Properties info=new Properties();
    username=username != null ? username : "String_Node_Str";
    password=password != null ? password : "String_Node_Str";
    info.put("String_Node_Str",username);
    info.put("String_Node_Str",password);
    if (dbType.equals(EDatabaseTypeName.ACCESS.getXmlName()) || dbType.equals(EDatabaseTypeName.GODBC.getXmlName())) {
      Charset systemCharset=CharsetToolkit.getInternalSystemCharset();
      if (systemCharset != null && systemCharset.displayName() != null) {
        info.put("String_Node_Str",systemCharset.displayName());
      }
    }
    if (additionalParams != null && !"String_Node_Str".equals(additionalParams) && dbType.toUpperCase().contains("String_Node_Str")) {
      additionalParams=additionalParams.replaceAll("String_Node_Str","String_Node_Str");
      info.load(new java.io.ByteArrayInputStream(additionalParams.getBytes()));
      connection=wapperDriver.connect(url,info);
    }
 else {
      if (dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()) && additionalParams.indexOf(SHUTDOWN_PARAM) == -1) {
        url=url + SHUTDOWN_PARAM;
      }
      if (dbType.equals(EDatabaseTypeName.MSSQL.getDisplayName())) {
        connection=ConnectionUtils.createConnection(url,(Driver)(driver.newInstance()),info);
      }
 else {
        connection=wapperDriver.connect(url,info);
      }
    }
    list.add(connection);
    list.add(wapperDriver);
    return list;
  }
 catch (  Throwable e) {
    throw new RuntimeException(e);
  }
}