Program: 127344
Project: 127344
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(){
      @Override 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);
          try {
            HiveConnectionManager.getInstance().checkConnection(metadataconnection);
            managerConnection.setValide(true);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
 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(){
            @Override 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(){
      @Override 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);
          try {
            HiveConnectionManager.getInstance().checkConnection(metadataconnection);
            managerConnection.setValide(true);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
 else {
          managerConnection.check(metadataconnection,true);
        }
        if (managerConnection.getIsValide()) {
          boolean useAllSyn=ExtractMetaDataUtils.getInstance().isUseAllSynonyms();
          if (useProvider()) {
            provider.updatePackage(metadataconnection);
          }
 else {
            updatePackage(metadataconnection);
          }
          if (useAllSyn || EDatabaseTypeName.ACCESS.getDisplayName().equals(metadataconnection.getDbType())) {
            List<String> itemTableName=ExtractMetaDataFromDataBase.returnTablesFormConnection(metadataconnection,getTableInfoParameters());
            if (useAllSyn) {
              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(){
            @Override public void run(){
              new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
            }
          }
);
        }
        monitor.done();
      }
    }
);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}