Program: 73568
Project: 73568
Buggy source:
/** 
 * Advance the current model tag to that of the earliest event in the event queue, and fire all actors that have requested or are triggered to be fired at the current tag. If <i>synchronizeToRealTime</i> is true, then before firing, wait until real time matches or exceeds the timestamp of the event. Note that the default unit for time is seconds. <p> Each actor is fired repeatedly (prefire(), fire()), until either it has no more input tokens, or its prefire() method returns false. Note that if the actor fails to consume its inputs, then this can result in an infinite loop. Each actor that is fired is then postfired once at the conclusion of the iteration. </p><p> If there are no events in the event queue, then the behavior depends on the <i>stopWhenQueueIsEmpty</i> parameter. If it is false, then this thread will stall until events become available in the event queue. Otherwise, time will advance to the stop time and the execution will halt.</p>
 * @exception IllegalActionException If the firing actor throws it, orevent queue is not ready, or an event is missed, or time is set backwards.
 */
public void fire() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str" + getModelTime() + "String_Node_Str"+ _microstep);
  }
  while (true) {
    int result=_fire();
    assert(result <= 1 && result >= -1);
    if (result == 1) {
      continue;
    }
 else     if (result == -1) {
      return;
    }
    _actorFired();
    if (!_checkForNextEvent()) {
      break;
    }
  }
  _stopFireRequested=false;
  if (_debugging) {
    _debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Advance the current model tag to that of the earliest event in the event queue, and fire all actors that have requested or are triggered to be fired at the current tag. If <i>synchronizeToRealTime</i> is true, then before firing, wait until real time matches or exceeds the timestamp of the event. Note that the default unit for time is seconds. <p> Each actor is fired repeatedly (prefire(), fire()), until either it has no more input tokens, or its prefire() method returns false. Note that if the actor fails to consume its inputs, then this can result in an infinite loop. Each actor that is fired is then postfired once at the conclusion of the iteration. </p><p> If there are no events in the event queue, then the behavior depends on the <i>stopWhenQueueIsEmpty</i> parameter. If it is false, then this thread will stall until events become available in the event queue. Otherwise, time will advance to the stop time and the execution will halt.</p>
 * @exception IllegalActionException If the firing actor throws it, orevent queue is not ready, or an event is missed, or time is set backwards.
 */
public void fire() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str" + getModelTime() + "String_Node_Str"+ _microstep);
  }
  while (true) {
    int result=_fire();
    assert(result <= 1 && result >= -1);
    if (result == 1) {
      continue;
    }
 else     if (result == -1) {
      _getNextActuationEvent();
      return;
    }
    _actorFired();
    if (!_checkForNextEvent()) {
      break;
    }
  }
  _stopFireRequested=false;
  if (_debugging) {
    _debug("String_Node_Str");
  }
}