Program: 130099
Project: 130099
Buggy source:
/** 
 * refreshTable. This Methos execute the CreateTable in a Thread task.
 * @param tableItem
 * @param size
 */
private void refreshTable(final TreeItem treeItem,final int size){
  if (threadExecutor == null) {
    return;
  }
  if (!threadExecutor.isThreadRunning(treeItem) && !useProvider()) {
    TableNode node=(TableNode)treeItem.getData();
    if (node.getType() == TableNode.TABLE) {
      IMetadataConnection metadataConn=getIMetadataConnection();
      if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(metadataConn.getDbType())) {
        try {
          HiveConnectionManager.getInstance().checkConnection(metadataConn);
          RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem);
          String value=node.getValue();
          if (!(isExistingNames(value))) {
            threadExecutor.execute(runnable);
          }
        }
 catch (        ClassNotFoundException e) {
          e.printStackTrace();
        }
catch (        InstantiationException e) {
          e.printStackTrace();
        }
catch (        IllegalAccessException e) {
          e.printStackTrace();
        }
catch (        SQLException e) {
          e.printStackTrace();
        }
      }
 else {
        if (managerConnection.check(getIMetadataConnection(),true)) {
          RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem);
          String value=node.getValue();
          if (!(isExistingNames(value))) {
            threadExecutor.execute(runnable);
          }
        }
      }
    }
  }
 else   if (useProvider() && !threadExecutor.isThreadRunning(treeItem)) {
    TableNode node=(TableNode)treeItem.getData();
    if (node.getType() == provider.getRunnableAccessNodeType()) {
      RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem){
        @Override public void run(){
          if (isCanceled()) {
            return;
          }
          checkConnectionIsDone=true;
          Display.getDefault().syncExec(new Runnable(){
            @Override public void run(){
              provider.executeInRunnable(metadataconnection,treeItem.getData(),getConnection());
              if (isCanceled()) {
                return;
              }
              updateUIInThreadIfThread();
            }
          }
);
        }
        @Override public void updateUIInThreadIfThread(){
          if (treeItem.isDisposed()) {
            return;
          }
          if (checkConnectionIsDone) {
            treeItem.setText(3,Messages.getString("String_Node_Str"));
            countSuccess++;
          }
 else {
            updateStatus(IStatus.WARNING,Messages.getString("String_Node_Str"));
            new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
          }
          count++;
          updateStatus(IStatus.OK,null);
          parentWizardPage.setPageComplete(threadExecutor.getQueue().isEmpty() && (threadExecutor.getActiveCount() == 0 || countSuccess == countPending));
        }
      }
;
      String value=node.getValue();
      if (!(isExistingNames(value))) {
        threadExecutor.execute(runnable);
      }
    }
  }
 else {
    RetrieveColumnRunnable runnable=threadExecutor.getRunnable(treeItem);
    runnable.setCanceled(false);
  }
}

Fixed version (ground truth):
/** 
 * refreshTable. This Methos execute the CreateTable in a Thread task.
 * @param tableItem
 * @param size
 */
private void refreshTable(final TreeItem treeItem,final int size){
  if (threadExecutor == null) {
    return;
  }
  if (!threadExecutor.isThreadRunning(treeItem) && !useProvider()) {
    TableNode node=(TableNode)treeItem.getData();
    if (node.getType() == TableNode.TABLE) {
      IMetadataConnection metadataConn=getIMetadataConnection();
      if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(metadataConn.getDbType())) {
        try {
          HiveConnectionManager.getInstance().checkConnection(metadataConn);
          RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem);
          String value=node.getValue();
          if (!(isExistingNames(value))) {
            threadExecutor.execute(runnable);
          }
        }
 catch (        ClassNotFoundException e) {
          e.printStackTrace();
        }
catch (        InstantiationException e) {
          e.printStackTrace();
        }
catch (        IllegalAccessException e) {
          e.printStackTrace();
        }
catch (        SQLException e) {
          e.printStackTrace();
        }
      }
 else {
        if (managerConnection.check(getIMetadataConnection(),true)) {
          RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem);
          String value=node.getValue();
          if (!(isExistingNames(value))) {
            threadExecutor.execute(runnable);
          }
        }
      }
    }
  }
 else   if (useProvider() && !threadExecutor.isThreadRunning(treeItem)) {
    TableNode node=(TableNode)treeItem.getData();
    if (node.getType() == provider.getRunnableAccessNodeType()) {
      RetrieveColumnRunnable runnable=new RetrieveColumnRunnable(treeItem){
        @Override public void run(){
          if (isCanceled()) {
            return;
          }
          checkConnectionIsDone=true;
          Display.getDefault().syncExec(new Runnable(){
            @Override public void run(){
              provider.executeInRunnable(metadataconnection,treeItem.getData(),getConnection());
              if (isCanceled()) {
                return;
              }
              updateUIInThreadIfThread();
            }
          }
);
        }
        @Override public void updateUIInThreadIfThread(){
          if (treeItem.isDisposed()) {
            return;
          }
          if (checkConnectionIsDone) {
            treeItem.setText(3,Messages.getString("String_Node_Str"));
            countSuccess++;
          }
 else {
            updateStatus(IStatus.WARNING,Messages.getString("String_Node_Str"));
            new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
          }
          refreshColumnData(tableNode,treeItem);
          count++;
          updateStatus(IStatus.OK,null);
          parentWizardPage.setPageComplete(threadExecutor.getQueue().isEmpty() && (threadExecutor.getActiveCount() == 0 || countSuccess == countPending));
        }
      }
;
      String value=node.getValue();
      if (!(isExistingNames(value))) {
        threadExecutor.execute(runnable);
      }
    }
  }
 else {
    RetrieveColumnRunnable runnable=threadExecutor.getRunnable(treeItem);
    runnable.setCanceled(false);
  }
}