Program: 10847
Project: 10847
Buggy source:
@Override public void done(final IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (editorPage.isDisposed())       return;
      if (masterDetailsBlock.getMasterPart().getManagedForm().getForm().isDisposed())       return;
      masterDetailsBlock.refreshUI(area);
      IStatus status=event.getResult();
      Throwable exception=status.getException();
      if (!userAction) {
        return;
      }
      if (exception != null) {
        if (exception instanceof CoreException) {
          if (CloudUtil.isNotFoundException((CoreException)exception)) {
            display404Error(status);
            return;
          }
          if (userAction && CloudUtil.isWrongCredentialsException((CoreException)exception)) {
            CloudFoundryCredentialsWizard wizard=new CloudFoundryCredentialsWizard(editorPage.getCloudServer());
            WizardDialog dialog=new WizardDialog(Display.getDefault().getActiveShell(),wizard);
            if (dialog.open() == Dialog.OK) {
              CloudFoundryEditorAction.this.run();
              return;
            }
          }
        }
        editorPage.setMessage(status.getMessage(),IMessageProvider.ERROR);
      }
 else {
        IModule currentModule=editorPage.getMasterDetailsBlock().getCurrentModule();
        if (currentModule != null) {
          ApplicationModule appModule=editorPage.getCloudServer().getApplication(currentModule);
          if (appModule != null && appModule.getErrorMessage() != null) {
            editorPage.setMessage(appModule.getErrorMessage(),IMessageProvider.ERROR);
            return;
          }
        }
        editorPage.setMessage(null,IMessageProvider.NONE);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void done(final IJobChangeEvent event){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (editorPage.isDisposed())       return;
      if (masterDetailsBlock.getMasterPart().getManagedForm().getForm().isDisposed())       return;
      masterDetailsBlock.refreshUI(area);
      IStatus status=event.getResult();
      Throwable exception=status.getException();
      if (!userAction) {
        return;
      }
      if (exception != null) {
        if (exception instanceof CoreException) {
          if (CloudUtil.isNotFoundException((CoreException)exception)) {
            display404Error(status);
            return;
          }
          if (userAction && CloudUtil.isWrongCredentialsException((CoreException)exception)) {
            CloudFoundryCredentialsWizard wizard=new CloudFoundryCredentialsWizard(editorPage.getCloudServer());
            WizardDialog dialog=new WizardDialog(Display.getDefault().getActiveShell(),wizard);
            if (dialog.open() == Dialog.OK) {
              CloudFoundryEditorAction.this.run();
              return;
            }
          }
        }
        setErrorInPage(status);
      }
 else {
        IModule currentModule=editorPage.getMasterDetailsBlock().getCurrentModule();
        if (currentModule != null) {
          ApplicationModule appModule=editorPage.getCloudServer().getApplication(currentModule);
          if (appModule != null && appModule.getErrorMessage() != null) {
            setErrorInPage(appModule.getErrorMessage());
            return;
          }
        }
        setErrorInPage((String)null);
      }
    }
  }
);
}