Program: 73120
Project: 73120
Buggy source:
/** 
 * Execute actions on the last chosen transition. Change state to the destination state of the last chosen transition.
 * @return True, unless stop() has been called, in which case, false.
 * @exception IllegalActionException If any action throws it.
 */
public boolean postfire() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str");
  }
  Director director=getDirector();
  boolean inModalModel=false;
  if (director instanceof FSMDirector) {
    inModalModel=true;
  }
  Time environmentTime=_getEnvironmentTime();
  for (  Actor stateRefinement : _stateRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",stateRefinement.getName());
    }
    _setTimeForRefinement(stateRefinement);
    if (!stateRefinement.postfire()) {
      _disabledRefinements.add(stateRefinement);
    }
    if (inModalModel) {
      director.setModelTime(environmentTime);
    }
  }
  Actor[] refinements=_currentState.getRefinement();
  if (refinements != null) {
    for (    Actor stateRefinement : refinements) {
      Director refinementDirector=stateRefinement.getDirector();
      if (_lastChosenTransitions.size() != 0 && refinementDirector != director) {
        refinementDirector.suspend();
      }
    }
  }
  if (refinements != null && refinements.length > 0 && _disabledRefinements.size() == refinements.length) {
    if (_lastChosenTransitions.size() == 0) {
      List<Transition> transitionList=_currentState.terminationTransitionList();
      _chooseTransitions(transitionList,false,false);
    }
  }
  if (_lastChosenTransitions.size() != 0) {
    _transitionTaken=true;
    State destinationState=_destinationState();
    if (destinationState != null) {
      TypedActor[] destinationRefinements=destinationState.getRefinement();
      if (destinationRefinements != null) {
        for (        TypedActor destinationRefinement : destinationRefinements) {
          Director refinementDirector=destinationRefinement.getDirector();
          if (refinementDirector != director) {
            refinementDirector.resume();
          }
        }
      }
    }
  }
 else {
    _transitionTaken=false;
  }
  _transitionsPreviouslyChosenInIteration.clear();
  _commitLastChosenTransition();
  for (  Actor transitionRefinement : _transitionRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",transitionRefinement.getName());
    }
    if (!transitionRefinement.postfire()) {
      _disabledRefinements.add(transitionRefinement);
    }
  }
  _inputTokenMap.clear();
  errorMessage.setExpression("String_Node_Str");
  errorClass.setExpression("String_Node_Str");
  errorCause.setToken((Token)null);
  return !_reachedFinalState && !_stopRequested;
}

Fixed version (ground truth):
/** 
 * Execute actions on the last chosen transition. Change state to the destination state of the last chosen transition.
 * @return True, unless stop() has been called, in which case, false.
 * @exception IllegalActionException If any action throws it.
 */
public boolean postfire() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str");
  }
  Director director=getDirector();
  boolean inModalModel=false;
  if (director instanceof FSMDirector) {
    inModalModel=true;
  }
  Time environmentTime=_getEnvironmentTime();
  for (  Actor stateRefinement : _stateRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",stateRefinement.getName());
    }
    _setTimeForRefinement(stateRefinement);
    if (!stateRefinement.postfire()) {
      _disabledRefinements.add(stateRefinement);
    }
    if (inModalModel) {
      director.setModelTime(environmentTime);
    }
  }
  Actor[] refinements=_currentState.getRefinement();
  if (refinements != null) {
    for (    Actor stateRefinement : refinements) {
      Director refinementDirector=stateRefinement.getDirector();
      if (_lastChosenTransitions.size() != 0 && refinementDirector != director) {
        refinementDirector.suspend();
      }
    }
  }
  if (refinements != null && refinements.length > 0 && _disabledRefinements.size() == refinements.length) {
    if (_lastChosenTransitions.size() == 0) {
      List<Transition> transitionList=_currentState.terminationTransitionList();
      _chooseTransitions(transitionList,false,false);
    }
  }
  if (_lastChosenTransitions.size() != 0) {
    _transitionTaken=true;
    State destinationState=_destinationState();
    if (destinationState != null) {
      TypedActor[] destinationRefinements=destinationState.getRefinement();
      if (destinationRefinements != null) {
        for (        TypedActor destinationRefinement : destinationRefinements) {
          Director refinementDirector=destinationRefinement.getDirector();
          if (refinementDirector != director) {
            refinementDirector.resume();
          }
        }
      }
    }
  }
 else {
    _transitionTaken=false;
  }
  _transitionsPreviouslyChosenInIteration.clear();
  _commitLastChosenTransition();
  for (  Actor transitionRefinement : _transitionRefinementsToPostfire) {
    if (_debugging) {
      _debug("String_Node_Str",transitionRefinement.getName());
    }
    if (!transitionRefinement.postfire()) {
      _disabledRefinements.add(transitionRefinement);
    }
  }
  _inputTokenMap.clear();
  errorMessage.setExpression("String_Node_Str");
  errorClass.setExpression("String_Node_Str");
  errorCause.setToken((Token)null);
  _modelErrorHandled=null;
  return !_reachedFinalState && !_stopRequested;
}