Program: 137610
Project: 137610
Buggy source:
/** 
 * Load the driver by lib management system , which will configure the SQL Explorer driver classpath from xml.
 * @param dbType
 * @param dbVersion
 * @param driverClassName
 */
public void loadDriverByLibManageSystem(String dbType,String dbVersion,String driverClassName){
  if (dbType == null || driverClassName == null) {
    return;
  }
  DriverManager driverManager=SQLExplorerPlugin.getDefault().getDriverModel();
  ManagedDriver manDr=driverManager.getDriver(EDriverName.getId(driverClassName));
  if (manDr != null && !manDr.isDriverClassLoaded()) {
    String librariesPath=LibrariesManagerUtils.getLibrariesPath(ECodeLanguage.JAVA);
    List<String> jarNames=EDatabaseVersion4Drivers.getDrivers(dbType,dbVersion);
    Set<String> allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    if (allJarPath.isEmpty()) {
      librariesPath=ExtractMetaDataUtils.getJavaLibPath();
      allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    }
    if (allJarPath.isEmpty()) {
      Project currentProject=ProjectManager.getInstance().getCurrentProject();
      String projectLabel=currentProject.getTechnicalLabel();
      librariesPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
      librariesPath=librariesPath + File.separatorChar + projectLabel+ File.separatorChar+ ERepositoryObjectType.getFolderName(ERepositoryObjectType.LIBS);
      allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    }
    if (!allJarPath.isEmpty()) {
      manDr.getJars().clear();
      manDr.getJars().addAll(allJarPath);
      try {
        driverManager.saveDrivers();
      }
 catch (      ExplorerException e) {
        log.error(e);
      }
    }
    try {
      manDr.registerSQLDriver();
    }
 catch (    ClassNotFoundException e) {
      log.error(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Load the driver by lib management system , which will configure the SQL Explorer driver classpath from xml.
 * @param dbType
 * @param dbVersion
 * @param driverClassName
 */
public void loadDriverByLibManageSystem(String dbType,String dbVersion,String driverClassName){
  if (dbType == null || driverClassName == null) {
    return;
  }
  DriverManager driverManager=SQLExplorerPlugin.getDefault().getDriverModel();
  ManagedDriver manDr=driverManager.getDriver(EDriverName.getId(driverClassName));
  if (manDr != null && !manDr.isDriverClassLoaded()) {
    String librariesPath=LibrariesManagerUtils.getLibrariesPath(ECodeLanguage.JAVA);
    List<String> jarNames=EDatabaseVersion4Drivers.getDrivers(dbType,dbVersion);
    Set<String> allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    if (allJarPath.isEmpty()) {
      librariesPath=ExtractMetaDataUtils.getInstance().getJavaLibPath();
      allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    }
    if (allJarPath.isEmpty()) {
      Project currentProject=ProjectManager.getInstance().getCurrentProject();
      String projectLabel=currentProject.getTechnicalLabel();
      librariesPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
      librariesPath=librariesPath + File.separatorChar + projectLabel+ File.separatorChar+ ERepositoryObjectType.getFolderName(ERepositoryObjectType.LIBS);
      allJarPath=findAllJarPath(new File(librariesPath),jarNames);
    }
    if (!allJarPath.isEmpty()) {
      manDr.getJars().clear();
      manDr.getJars().addAll(allJarPath);
      try {
        driverManager.saveDrivers();
      }
 catch (      ExplorerException e) {
        log.error(e);
      }
    }
    try {
      manDr.registerSQLDriver();
    }
 catch (    ClassNotFoundException e) {
      log.error(e);
    }
  }
}