Program: 135948
Project: 135948
Buggy source:
/** 
 * Process the obligation message. If the status of the message is not  {@link #TO_BE_PROVED} then it creates a marker for that obligationby calling  {@link #createObligationMarker(ObligationStatusMessage)}. Else, it prepares the necessary data structure for computing proof step statuses. The proverJob is the instance of   {@link ProverJob} used to launch the proverand passed to listeners of TLAPM output for that launch. It provides access to information about launch parameters and other useful data structures.
 * @param message
 * @param nodeToProve the step or module on which the prover was launched
 */
public static void processObligationMessage(ObligationStatusMessage message,final ProverJob proverJob){
  if (message.getStatus().equals(TO_BE_PROVED)) {
    if (proverJob.noToBeProved) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      proverJob.noToBeProved=false;
    }
    proverJob.getObMessageList().add(message);
  }
 else {
    if (proverJob.isToBeProvedOnly()) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          for (Iterator it=proverJob.getObMessageList().iterator(); it.hasNext(); ) {
            ObligationStatusMessage message=(ObligationStatusMessage)it.next();
            IMarker obMarker=createObligationMarker(message.getID(),message.getLocation());
            ObligationStatus obStatus=new ObligationStatus(null,obMarker,ColorPredicate.TO_BE_PROVED_STATE,message.getLocation(),0);
            proverJob.getObsMap().put(new Integer(message.getID()),obStatus);
          }
        }
      }
;
      try {
        proverJob.module.getWorkspace().run(runnable,null,IWorkspace.AVOID_UPDATE,null);
      }
 catch (      CoreException e) {
        ProverUIActivator.logError("String_Node_Str",e);
      }
      proverJob.setToBeProvedOnly(false);
      System.out.println("String_Node_Str" + System.currentTimeMillis());
    }
    final ObligationStatus obStatus=(ObligationStatus)proverJob.getObsMap().get(new Integer(message.getID()));
    if (obStatus.getParent() == null) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      for (Iterator it=proverJob.getObs().iterator(); it.hasNext(); ) {
        ObligationStatus obligation=(ObligationStatus)it.next();
        int searchLine=obligation.getTLAPMLocation().beginLine();
        while (true) {
          StepTuple stepTuple=(StepTuple)proverJob.getLeafStepMap().get(new Integer(searchLine));
          if (stepTuple != null) {
            obligation.setParent(stepTuple);
            stepTuple.addChild(obligation);
            break;
          }
          searchLine--;
        }
      }
      System.out.println("String_Node_Str" + System.currentTimeMillis());
    }
    obStatus.updateObligation(message);
    UIHelper.runUIAsync(new Runnable(){
      public void run(){
        ObligationsView.updateObligationView(obStatus);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * Process the obligation message. If the status of the message is not  {@link #TO_BE_PROVED} then it creates a marker for that obligationby calling  {@link #createObligationMarker(ObligationStatusMessage)}. Else, it prepares the necessary data structure for computing proof step statuses. The proverJob is the instance of   {@link ProverJob} used to launch the proverand passed to listeners of TLAPM output for that launch. It provides access to information about launch parameters and other useful data structures.
 * @param message
 * @param nodeToProve the step or module on which the prover was launched
 */
public static void processObligationMessage(ObligationStatusMessage message,final ProverJob proverJob){
  if (message.getStatus().equals(TO_BE_PROVED)) {
    if (proverJob.noToBeProved) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      proverJob.noToBeProved=false;
    }
    proverJob.getObMessageList().add(message);
  }
 else {
    if (proverJob.isToBeProvedOnly()) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
        public void run(        IProgressMonitor monitor) throws CoreException {
          for (Iterator it=proverJob.getObMessageList().iterator(); it.hasNext(); ) {
            ObligationStatusMessage message=(ObligationStatusMessage)it.next();
            IMarker obMarker=createObligationMarker(message.getID(),message.getLocation());
            ObligationStatus obStatus=new ObligationStatus(null,obMarker,ColorPredicate.TO_BE_PROVED_STATE,message.getLocation(),message.getID());
            proverJob.getObsMap().put(new Integer(message.getID()),obStatus);
          }
        }
      }
;
      try {
        proverJob.module.getWorkspace().run(runnable,null,IWorkspace.AVOID_UPDATE,null);
      }
 catch (      CoreException e) {
        ProverUIActivator.logError("String_Node_Str",e);
      }
      proverJob.setToBeProvedOnly(false);
      System.out.println("String_Node_Str" + System.currentTimeMillis());
    }
    final ObligationStatus obStatus=(ObligationStatus)proverJob.getObsMap().get(new Integer(message.getID()));
    if (obStatus.getParent() == null) {
      System.out.println("String_Node_Str" + System.currentTimeMillis());
      for (Iterator it=proverJob.getObs().iterator(); it.hasNext(); ) {
        ObligationStatus obligation=(ObligationStatus)it.next();
        int searchLine=obligation.getTLAPMLocation().beginLine();
        while (true) {
          StepTuple stepTuple=(StepTuple)proverJob.getLeafStepMap().get(new Integer(searchLine));
          if (stepTuple != null) {
            obligation.setParent(stepTuple);
            stepTuple.addChild(obligation);
            break;
          }
          searchLine--;
        }
      }
      System.out.println("String_Node_Str" + System.currentTimeMillis());
    }
    obStatus.updateObligation(message);
    UIHelper.runUIAsync(new Runnable(){
      public void run(){
        ObligationsView.updateObligationView(obStatus);
      }
    }
);
  }
}