Program: 10849
Project: 10849
Buggy source:
protected Job getJob(){
  Job job=new Job(getJobName()){
    @Override protected IStatus run(    IProgressMonitor monitor){
      IStatus status=null;
      try {
        IModule module=editorPage.getMasterDetailsBlock().getCurrentModule();
        status=performAction(monitor);
        if (status != null && status.isOK()) {
          if (module != null && TunnelBehaviour.isCaldecottApp(module.getName())) {
            return editorPage.refreshStates(module,RefreshArea.ALL,monitor);
          }
 else {
            return editorPage.refreshStates(module,area,monitor);
          }
        }
      }
 catch (      CoreException e) {
        if (shouldLogException(e)) {
          StatusManager.getManager().handle(new Status(Status.ERROR,CloudFoundryServerUiPlugin.PLUGIN_ID,"String_Node_Str",e),StatusManager.LOG);
        }
        return new Status(Status.CANCEL,CloudFoundryServerUiPlugin.PLUGIN_ID,e.getMessage(),e);
      }
      return status;
    }
  }
;
  job.addJobChangeListener(new JobChangeAdapter(){
    @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);
          }
        }
      }
);
    }
  }
);
  return job;
}

Fixed version (ground truth):
protected Job getJob(){
  Job job=new Job(getJobName()){
    @Override protected IStatus run(    IProgressMonitor monitor){
      IStatus status=null;
      try {
        IModule module=editorPage.getMasterDetailsBlock().getCurrentModule();
        status=performAction(monitor);
        if (status != null && status.isOK()) {
          if (module != null && TunnelBehaviour.isCaldecottApp(module.getName())) {
            return editorPage.refreshStates(module,RefreshArea.ALL,monitor);
          }
 else {
            return editorPage.refreshStates(module,area,monitor);
          }
        }
      }
 catch (      CoreException e) {
        if (shouldLogException(e)) {
          StatusManager.getManager().handle(new Status(Status.ERROR,CloudFoundryServerUiPlugin.PLUGIN_ID,"String_Node_Str",e),StatusManager.LOG);
        }
        return new Status(Status.CANCEL,CloudFoundryServerUiPlugin.PLUGIN_ID,e.getMessage(),e);
      }
      return status;
    }
  }
;
  job.addJobChangeListener(new JobChangeAdapter(){
    @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);
          }
        }
      }
);
    }
  }
);
  return job;
}