Program: 121726
Project: 121726
Buggy source:
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=ExtractMetaDataUtils.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=ExtractMetaDataUtils.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if ((driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())|| dbType.equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName())|| dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName())|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) && wapperDriver != null) {
      try {
        if (conn != null && !conn.isClosed() && dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName())) {
          conn.close();
        }
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}

Fixed version (ground truth):
private void getConnFromNode(){
  DriverShim wapperDriver=null;
  try {
    List list=null;
    if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
      list=ExtractMetaDataUtils.connect(trueDBTypeForJDBC,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
 else {
      driverJarPath="String_Node_Str";
      list=ExtractMetaDataUtils.connect(dbType,url,username,pwd,driverClassName,driverJarPath,dbVersion,additionalParams);
    }
    if (list != null && list.size() > 0) {
      for (int i=0; i < list.size(); i++) {
        if (list.get(i) instanceof Connection) {
          conn=(Connection)list.get(i);
        }
        if (list.get(i) instanceof DriverShim) {
          wapperDriver=(DriverShim)list.get(i);
        }
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    if ((driverClassName.equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())|| dbType.equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName())|| dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName())|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) && wapperDriver != null) {
      try {
        if (conn != null && !conn.isClosed() && (dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()))) {
          conn.close();
        }
        wapperDriver.connect("String_Node_Str",null);
      }
 catch (      SQLException e) {
      }
    }
  }
}