Program: 124900
Project: 124900
Buggy source:
protected ConnectionStatus checkConnection(boolean displayDialog){
  final HDFSConnectionBean connectionBean=getConnectionBean();
  AProgressMonitorDialogWithCancel<ConnectionStatus> checkingDialog=new AProgressMonitorDialogWithCancel<ConnectionStatus>(getShell()){
    @Override protected ConnectionStatus runWithCancel(    IProgressMonitor monitor) throws Exception {
      return HadoopOperationManager.getInstance().testConnection(connectionBean);
    }
  }
;
  String executeMessage=Messages.getString("String_Node_Str");
  Throwable executeException=null;
  try {
    checkingDialog.run(executeMessage,null,true,AProgressMonitorDialogWithCancel.ENDLESS_WAIT_TIME);
  }
 catch (  Exception e) {
    executeException=e;
  }
  ConnectionStatus connectionStatus=checkingDialog.getExecuteResult();
  if (checkingDialog.isUserCanncelled()) {
    return connectionStatus;
  }
  if (checkingDialog.getExecuteException() != null) {
    executeException=checkingDialog.getExecuteException();
  }
  String connectException=null;
  if (executeException != null) {
    if (executeException instanceof InterruptedException) {
      CommonExceptionHandler.process(executeException,Priority.WARN);
      return connectionStatus;
    }
    hdfsSettingIsValide=false;
    connectException=executeException.getMessage();
  }
 else {
    hdfsSettingIsValide=connectionStatus.getResult();
    connectException=connectionStatus.getMessageException();
  }
  if (hdfsSettingIsValide) {
    if (!isReadOnly()) {
      updateStatus(IStatus.OK,null);
    }
    if (displayDialog) {
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",connectionItem.getProperty().getDisplayName()));
    }
  }
 else {
    String mainMsg=Messages.getString("String_Node_Str");
    if (!isReadOnly()) {
      updateStatus(IStatus.WARNING,mainMsg);
    }
    if (displayDialog) {
      new ErrorDialogWidthDetailArea(getShell(),Activator.PLUGIN_ID,mainMsg,connectException);
    }
  }
  return connectionStatus;
}

Fixed version (ground truth):
protected ConnectionStatus checkConnection(boolean displayDialog){
  final HDFSConnectionBean connectionBean=getConnectionBean();
  AProgressMonitorDialogWithCancel<ConnectionStatus> checkingDialog=new AProgressMonitorDialogWithCancel<ConnectionStatus>(getShell()){
    @Override protected ConnectionStatus runWithCancel(    IProgressMonitor monitor) throws Throwable {
      return HadoopOperationManager.getInstance().testConnection(connectionBean);
    }
  }
;
  String executeMessage=Messages.getString("String_Node_Str");
  Throwable executeException=null;
  try {
    checkingDialog.run(executeMessage,null,true,AProgressMonitorDialogWithCancel.ENDLESS_WAIT_TIME);
  }
 catch (  Exception e) {
    executeException=e;
  }
  ConnectionStatus connectionStatus=checkingDialog.getExecuteResult();
  if (checkingDialog.isUserCanncelled()) {
    return connectionStatus;
  }
  if (checkingDialog.getExecuteException() != null) {
    executeException=checkingDialog.getExecuteException();
  }
  String connectException=null;
  if (executeException != null) {
    if (executeException instanceof InterruptedException) {
      CommonExceptionHandler.process(executeException,Priority.WARN);
      return connectionStatus;
    }
    hdfsSettingIsValide=false;
    connectException=executeException.getMessage();
  }
 else {
    hdfsSettingIsValide=connectionStatus.getResult();
    connectException=connectionStatus.getMessageException();
  }
  if (hdfsSettingIsValide) {
    if (!isReadOnly()) {
      updateStatus(IStatus.OK,null);
    }
    if (displayDialog) {
      MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",connectionItem.getProperty().getDisplayName()));
    }
  }
 else {
    String mainMsg=Messages.getString("String_Node_Str");
    if (!isReadOnly()) {
      updateStatus(IStatus.WARNING,mainMsg);
    }
    if (displayDialog) {
      new ErrorDialogWidthDetailArea(getShell(),Activator.PLUGIN_ID,mainMsg,connectException);
    }
  }
  return connectionStatus;
}