Program: 121356
Project: 121356
Buggy source:
public void refresh(){
  RunProcessContext activeContext=RunProcessPlugin.getDefault().getRunProcessContextManager().getActiveContext();
  boolean disableAll=false;
  if (activeContext != null) {
    disableAll=activeContext.getProcess().disableRunJobView();
  }
  processContext=activeContext;
  rubjobManager.setProcessContext(processContext);
  if (contextComposite.isDisposed()) {
    return;
  }
  if (activeContext != null && !activeContext.getProcess().getComponentsType().equals(oldJobType)) {
    oldJobType=activeContext.getProcess().getComponentsType();
    setElement();
  }
  contextComposite.setProcess(((activeContext != null) && !disableAll ? activeContext.getProcess() : null));
  rubjobManager.setSelectContext(contextComposite.getSelectedContext());
  if (dc != null && dc == processComposite) {
    processComposite.setProcessContext(activeContext);
  }
 else   if (dc != null && dc == debugTisProcessComposite) {
    debugTisProcessComposite.setProcessContext(activeContext);
    debugTisProcessComposite.setContextComposite(this.contextComposite);
  }
 else   if (dc != null && dc == advanceComposite) {
    advanceComposite.setProcessContext(activeContext);
  }
 else   if (dc != null && dc == targetComposite) {
    targetComposite.setProcessContext(activeContext);
  }
 else   if (dc != null) {
    if (processContext != null && processContext.getProcess() != null) {
      if (dc instanceof MultipleThreadDynamicComposite) {
        if (dc.getElement() != processContext.getProcess()) {
          for (          Control curControl : tabFactory.getTabComposite().getChildren()) {
            curControl.dispose();
          }
          dc=new MultipleThreadDynamicComposite(tabFactory.getTabComposite(),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,currentSelectedTab.getCategory(),(Element)processContext.getProcess(),true,Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
          dc.refresh();
        }
      }
    }
    if (processContext == null || processContext.getProcess() == null) {
      for (      Control curControl : tabFactory.getTabComposite().getChildren()) {
        curControl.dispose();
      }
    }
  }
  if (activeContext != null) {
    String jobName=Messages.getString("String_Node_Str");
    if (activeContext.getProcess().disableRunJobView()) {
      jobName="String_Node_Str";
    }
    jobName=jobName + "String_Node_Str" + activeContext.getProcess().getLabel();
    setTitleToolTip(jobName);
    setPartName(Messages.getString("String_Node_Str",jobName));
    tabFactory.setTitle(jobName,null);
  }
 else {
    setPartName(Messages.getString("String_Node_Str"));
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
  }
}

Fixed version (ground truth):
public void refresh(){
  RunProcessContext activeContext=RunProcessPlugin.getDefault().getRunProcessContextManager().getActiveContext();
  boolean disableAll=false;
  if (activeContext != null) {
    disableAll=activeContext.getProcess().disableRunJobView();
  }
  processContext=activeContext;
  rubjobManager.setProcessContext(processContext);
  if (contextComposite.isDisposed()) {
    return;
  }
  if (activeContext != null && !activeContext.getProcess().getComponentsType().equals(oldJobType)) {
    oldJobType=activeContext.getProcess().getComponentsType();
    setElement();
  }
  contextComposite.setProcess(((activeContext != null) && !disableAll ? activeContext.getProcess() : null));
  rubjobManager.setSelectContext(contextComposite.getSelectedContext());
  if (dc != null && dc == processComposite) {
    processComposite.setProcessContext(activeContext);
  }
 else   if (dc != null && dc == debugTisProcessComposite) {
    debugTisProcessComposite.setProcessContext(activeContext);
    debugTisProcessComposite.setContextComposite(this.contextComposite);
  }
 else   if (dc != null && dc == advanceComposite) {
    advanceComposite.setProcessContext(activeContext);
  }
 else   if (dc != null && dc == targetComposite) {
    targetComposite.setProcessContext(activeContext);
  }
 else   if (dc != null) {
    if (processContext != null && processContext.getProcess() != null) {
      if (dc instanceof MultipleThreadDynamicComposite) {
        if (dc.getElement() != processContext.getProcess()) {
          for (          Control curControl : tabFactory.getTabComposite().getChildren()) {
            curControl.dispose();
          }
          dc=new MultipleThreadDynamicComposite(tabFactory.getTabComposite(),SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,currentSelectedTab.getCategory(),(Element)processContext.getProcess(),true,Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
        }
        dc.refresh();
      }
    }
    if (processContext == null || processContext.getProcess() == null) {
      for (      Control curControl : tabFactory.getTabComposite().getChildren()) {
        curControl.dispose();
      }
    }
  }
  if (activeContext != null) {
    String jobName=Messages.getString("String_Node_Str");
    if (activeContext.getProcess().disableRunJobView()) {
      jobName="String_Node_Str";
    }
    jobName=jobName + "String_Node_Str" + activeContext.getProcess().getLabel();
    setTitleToolTip(jobName);
    setPartName(Messages.getString("String_Node_Str",jobName));
    tabFactory.setTitle(jobName,null);
  }
 else {
    setPartName(Messages.getString("String_Node_Str"));
    tabFactory.setTitle(Messages.getString("String_Node_Str"),null);
  }
}