Program: 127955
Project: 127955
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);
          if (HiveConnVersionInfo.MODE_EMBEDDED.getKey().equals(key)) {
            try {
              HiveConnectionManager.getInstance().checkConnection(metadataconnection);
              managerConnection.setValide(true);
            }
 catch (            Exception e) {
              e.printStackTrace();
            }
          }
 else           if (HiveConnVersionInfo.MODE_STANDALONE.getKey().equals(key)) {
            managerConnection.check(metadataconnection,true);
          }
        }
 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()) {
          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);
  }
}