Program: 124912
Project: 124912
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");
  Exception executeException=null;
  int timeout=DatabaseConnectionParameterUtil.getDefaultDBConnectionTimeout();
  if (0 < timeout) {
    timeout+=5;
  }
  try {
    checkingDialog.run(executeMessage,null,true,timeout);
  }
 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 Exception {
      return HadoopOperationManager.getInstance().testConnection(connectionBean);
    }
  }
;
  String executeMessage=Messages.getString("String_Node_Str");
  Exception 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;
}