Program: 72531
Project: 72531
Buggy source:
/** 
 * Returns a List jdbc Drivers. The Drivers are searched from predefined directories in the DTE plug-in. Currently it is expected that the jdbc drivers are in the "drivers" directory of the DTE oda.jdbc plug-in.
 * @param driverName
 * @return
 */
public static List getJdbcDriversFromODADir(String driverName){
  if (jdbcDriverInfos != null) {
    if (!driverNameMap.containsValue(jdbcDriverInfos.get(0)))     jdbcDriverInfos.remove(0);
    if (JdbcDriverManagerDialog.needResetPreferences()) {
      resetPreferences();
      JdbcDriverManagerDialog.resetDriverChangedStatus();
    }
    return jdbcDriverInfos;
  }
  jdbcDriverInfos=new ArrayList();
  failLoadFileList=new ArrayList();
  driverNameMap=new HashMap();
  file2Drivers=new Hashtable();
  addDriversFromFiles();
  final String ODBCJDBCDriverName="String_Node_Str";
  JDBCDriverInformation ODBCJDBCInfo=null;
  JDBCDriverInformation driverInfos[]=JDBCDriverInfoManager.getDrivers();
  for (int i=0; i < driverInfos.length; i++) {
    JDBCDriverInformation newInfo=driverInfos[i];
    JDBCDriverInformation existing=(JDBCDriverInformation)driverNameMap.get(newInfo.getDriverClassName());
    if (existing == null) {
      if (newInfo.getDriverClassName().equalsIgnoreCase(ODBCJDBCDriverName)) {
        ODBCJDBCInfo=newInfo;
        continue;
      }
      jdbcDriverInfos.add(newInfo);
      driverNameMap.put(newInfo.getDriverClassName(),newInfo);
    }
 else {
      existing.setDisplayName(newInfo.getDisplayName());
      existing.setUrlFormat(newInfo.getUrlFormat());
    }
  }
  if (ODBCJDBCInfo != null) {
    jdbcDriverInfos.add(ODBCJDBCInfo);
    driverNameMap.put(ODBCJDBCInfo.getDriverClassName(),ODBCJDBCInfo);
  }
  resetPreferences();
  return jdbcDriverInfos;
}

Fixed version (ground truth):
/** 
 * Returns a List jdbc Drivers. The Drivers are searched from predefined directories in the DTE plug-in. Currently it is expected that the jdbc drivers are in the "drivers" directory of the DTE oda.jdbc plug-in.
 * @param driverName
 * @return
 */
public static List getJdbcDriversFromODADir(String driverName){
  if (jdbcDriverInfos != null) {
    if (!driverNameMap.containsValue(jdbcDriverInfos.get(0)))     jdbcDriverInfos.remove(0);
    if (JdbcDriverManagerDialog.needResetPreferences()) {
      resetPreferences();
      JdbcDriverManagerDialog.resetDriverChangedStatus();
    }
    return getDriverList();
  }
  jdbcDriverInfos=new ArrayList();
  failLoadFileList=new ArrayList();
  driverNameMap=new HashMap();
  file2Drivers=new Hashtable();
  addDriversFromFiles();
  final String ODBCJDBCDriverName="String_Node_Str";
  JDBCDriverInformation ODBCJDBCInfo=null;
  JDBCDriverInformation driverInfos[]=JDBCDriverInfoManager.getDrivers();
  for (int i=0; i < driverInfos.length; i++) {
    JDBCDriverInformation newInfo=driverInfos[i];
    JDBCDriverInformation existing=(JDBCDriverInformation)driverNameMap.get(newInfo.getDriverClassName());
    if (existing == null) {
      if (newInfo.getDriverClassName().equalsIgnoreCase(ODBCJDBCDriverName)) {
        ODBCJDBCInfo=newInfo;
        continue;
      }
      jdbcDriverInfos.add(newInfo);
      driverNameMap.put(newInfo.getDriverClassName(),newInfo);
    }
 else {
      existing.setDisplayName(newInfo.getDisplayName());
      existing.setUrlFormat(newInfo.getUrlFormat());
    }
  }
  if (ODBCJDBCInfo != null) {
    jdbcDriverInfos.add(ODBCJDBCInfo);
    driverNameMap.put(ODBCJDBCInfo.getDriverClassName(),ODBCJDBCInfo);
  }
  resetPreferences();
  return getDriverList();
}