Program: 73969
Project: 73969
Buggy source:
/** 
 * Invoke postfire() on any state refinements that were fired, then execute the commit actions contained by the last chosen transition, if any, then invoke postfire() on any transition refinements that were fired, and finally set the current state to the destination state of the transition. This will return false if any refinement that is postfired returns false. <p> If any transition was taken in this iteration, and if there is an executive director, and if there is a transition from the new state that is currently enabled, then this method calls fireAtCurrentTime(Actor) on that executive director (this call occurs indirectly in the FSMActor controller). If there is an enabled transition, then the current state is transient, and we will want to spend zero time in it.
 * @return True if the mode controller wishes to be scheduled foranother iteration.
 * @exception IllegalActionException If thrown by any commit actionor there is no controller.
 */
public boolean postfire() throws IllegalActionException {
  boolean result=true;
  if (_debugging) {
    _debug("String_Node_Str",getModelTime().toString());
  }
  Time environmentTime=_getEnvironmentTime();
  for (  Actor stateRefinement : _stateRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",stateRefinement.getName());
    }
    _setTimeForRefinement(stateRefinement);
    if (!stateRefinement.postfire()) {
      _disabledActors.add(stateRefinement);
    }
    setModelTime(environmentTime);
    if (_lastChosenTransition != null && stateRefinement instanceof Suspendable) {
      ((Suspendable)stateRefinement).suspend(environmentTime);
    }
  }
  if (_lastChosenTransition != null) {
    State destinationState=_lastChosenTransition.destinationState();
    if (destinationState != null) {
      TypedActor[] destinationRefinements=destinationState.getRefinement();
      if (destinationRefinements != null) {
        for (        TypedActor destinationRefinement : destinationRefinements) {
          if (destinationRefinement instanceof Suspendable) {
            ((Suspendable)destinationRefinement).resume(environmentTime);
          }
        }
      }
    }
  }
  FSMActor controller=getController();
  result&=controller.postfire();
  for (  Actor transitionRefinement : _transitionRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",transitionRefinement.getName());
    }
    if (!transitionRefinement.postfire()) {
      _disabledActors.add(transitionRefinement);
    }
  }
  _currentLocalReceiverMap=(Map)_localReceiverMaps.get(controller.currentState());
  _resetOutputReceivers();
  return result && !_stopRequested && !_finishRequested;
}

Fixed version (ground truth):
/** 
 * Invoke postfire() on any state refinements that were fired, then execute the commit actions contained by the last chosen transition, if any, then invoke postfire() on any transition refinements that were fired, and finally set the current state to the destination state of the transition. This will return false if any refinement that is postfired returns false. <p> If any transition was taken in this iteration, and if there is an executive director, and if there is a transition from the new state that is currently enabled, then this method calls fireAtCurrentTime(Actor) on that executive director (this call occurs indirectly in the FSMActor controller). If there is an enabled transition, then the current state is transient, and we will want to spend zero time in it.
 * @return True if the mode controller wishes to be scheduled foranother iteration.
 * @exception IllegalActionException If thrown by any commit actionor there is no controller.
 */
public boolean postfire() throws IllegalActionException {
  boolean result=true;
  if (_debugging) {
    _debug("String_Node_Str",getModelTime().toString());
  }
  FSMActor controller=getController();
  Time environmentTime=_getEnvironmentTime();
  for (  Actor stateRefinement : _stateRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",stateRefinement.getName());
    }
    _setTimeForRefinement(stateRefinement);
    if (!stateRefinement.postfire()) {
      _disabledActors.add(stateRefinement);
    }
    setModelTime(environmentTime);
  }
  for (  Actor stateRefinement : controller.currentState().getRefinement()) {
    if (_lastChosenTransition != null && stateRefinement instanceof Suspendable) {
      ((Suspendable)stateRefinement).suspend(environmentTime);
    }
  }
  if (_lastChosenTransition != null) {
    State destinationState=_lastChosenTransition.destinationState();
    if (destinationState != null) {
      TypedActor[] destinationRefinements=destinationState.getRefinement();
      if (destinationRefinements != null) {
        for (        TypedActor destinationRefinement : destinationRefinements) {
          if (destinationRefinement instanceof Suspendable) {
            ((Suspendable)destinationRefinement).resume(environmentTime);
          }
        }
      }
    }
  }
  result&=controller.postfire();
  for (  Actor transitionRefinement : _transitionRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",transitionRefinement.getName());
    }
    if (!transitionRefinement.postfire()) {
      _disabledActors.add(transitionRefinement);
    }
  }
  _currentLocalReceiverMap=(Map)_localReceiverMaps.get(controller.currentState());
  _resetOutputReceivers();
  return result && !_stopRequested && !_finishRequested;
}