Program: 128694
Project: 128694
Buggy source:
/** 
 * checkConnection.
 * @param displayMessageBox
 */
protected void checkConnection(final boolean displayMessageBox){
  try {
    if (tree.getItemCount() > 0) {
      tree.removeAll();
    }
    parentWizardPage.getWizard().getContainer().run(true,true,new IRunnableWithProgress(){
      public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
        managerConnection.check(metadataconnection,true);
        if (managerConnection.getIsValide()) {
          if (useProvider()) {
            provider.updatePackage(metadataconnection);
          }
 else {
            updatePackage(metadataconnection);
          }
          if (ExtractMetaDataUtils.isUseAllSynonyms() || EDatabaseTypeName.ACCESS.getDisplayName().equals(metadataconnection.getDbType())) {
            List<String> itemTableName=ExtractMetaDataFromDataBase.returnTablesFormConnection(metadataconnection,getTableInfoParameters());
            if (ExtractMetaDataUtils.isUseAllSynonyms()) {
              tableNodeList=getTableNodeForAllSynonyms(itemTableName,true);
            }
 else {
              tableNodeList=getTableNodeForAllSynonyms(itemTableName,false);
            }
          }
 else           if (useProvider()) {
            tableNodeList=provider.getTableNodeInfo(metadataconnection);
          }
 else {
            tableNodeList=getTableNodeInfo();
          }
          if (tableNodeList.isEmpty()) {
            if (displayMessageBox) {
              openInfoDialogInUIThread(getShell(),"String_Node_Str","String_Node_Str",true);
            }
          }
 else {
            tableNodeList=filterItemContextSchema(tableNodeList);
            createAllItems(displayMessageBox,null);
          }
        }
 else         if (displayMessageBox) {
          parentWizardPage.getShell().getDisplay().asyncExec(new Runnable(){
            public void run(){
              new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
            }
          }
);
        }
        monitor.done();
      }
    }
);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * checkConnection.
 * @param displayMessageBox
 */
protected void checkConnection(final boolean displayMessageBox){
  try {
    if (tree.getItemCount() > 0) {
      tree.removeAll();
    }
    parentWizardPage.getWizard().getContainer().run(true,true,new IRunnableWithProgress(){
      public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
        if (EDatabaseTypeName.HIVE.getDisplayName().equals(metadataconnection.getDbType())) {
          String key=(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);
          if (HiveConnVersionInfo.MODE_EMBEDDED.getKey().equals(key)) {
            Map<String,String> properties=new HashMap<String,String>();
            properties.put(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_DRIVER_JAR,(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_DRIVER_JAR));
            properties.put("String_Node_Str",metadataconnection.getDbType());
            properties.put("String_Node_Str",(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_URL));
            properties.put("String_Node_Str",(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_USERNAME));
            properties.put("String_Node_Str",(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_PASSWORD));
            properties.put("String_Node_Str",(String)metadataconnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_METASTORE_CONN_DRIVER_NAME));
            properties.put("String_Node_Str",metadataconnection.getDbVersionString());
            properties.put("String_Node_Str",metadataconnection.getAdditionalParams());
            managerConnection.checkForHive(properties);
          }
        }
 else         managerConnection.check(metadataconnection,true);
        if (managerConnection.getIsValide()) {
          if (useProvider()) {
            provider.updatePackage(metadataconnection);
          }
 else {
            updatePackage(metadataconnection);
          }
          if (ExtractMetaDataUtils.isUseAllSynonyms() || EDatabaseTypeName.ACCESS.getDisplayName().equals(metadataconnection.getDbType())) {
            List<String> itemTableName=ExtractMetaDataFromDataBase.returnTablesFormConnection(metadataconnection,getTableInfoParameters());
            if (ExtractMetaDataUtils.isUseAllSynonyms()) {
              tableNodeList=getTableNodeForAllSynonyms(itemTableName,true);
            }
 else {
              tableNodeList=getTableNodeForAllSynonyms(itemTableName,false);
            }
          }
 else           if (useProvider()) {
            tableNodeList=provider.getTableNodeInfo(metadataconnection);
          }
 else {
            tableNodeList=getTableNodeInfo();
          }
          if (tableNodeList.isEmpty()) {
            if (displayMessageBox) {
              openInfoDialogInUIThread(getShell(),"String_Node_Str","String_Node_Str",true);
            }
          }
 else {
            tableNodeList=filterItemContextSchema(tableNodeList);
            createAllItems(displayMessageBox,null);
          }
        }
 else         if (displayMessageBox) {
          parentWizardPage.getShell().getDisplay().asyncExec(new Runnable(){
            public void run(){
              new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
            }
          }
);
        }
        monitor.done();
      }
    }
);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}