Program: 76314
Project: 76314
Buggy source:
/** 
 * Advance current time to the next event in the event queue, and fire one or more actors that have events at that time. Each actor is iterated repeatedly (prefire(), fire(), postfire()), until either it has no more input tokens at the current time, or its prefire() method returns false. If there are no events in the event queue, then the behavior depends on whether stopWhenQueueIsEmpty() has been called.  If it has, and was given the argument false, then this thread will stall until inputs become available on the input queue.  Otherwise, time will advance to the stop time and the execution will halt.
 * @exception IllegalActionException If the firing actor throws it.
 */
public void fire() throws IllegalActionException {
  boolean _timeHasNotAdvanced=true;
  while (true) {
    Actor actorToFire=_getActorToFire();
    if (actorToFire == null) {
      if (_debugging)       _debug("String_Node_Str");
      _noMoreActorsToFire=true;
      return;
    }
    if (actorToFire == getContainer()) {
      return;
    }
    boolean refire=false;
    do {
      if (_debugging) {
        _debug("String_Node_Str",((Entity)actorToFire).getName(),"String_Node_Str",Double.toString(getCurrentTime()));
      }
      if (!actorToFire.prefire()) {
        if (_debugging)         _debug("String_Node_Str");
        break;
      }
      actorToFire.fire();
      if (!actorToFire.postfire()) {
        if (_debugging)         _debug("String_Node_Str",((Entity)actorToFire).getName());
        disableActor(actorToFire);
      }
      refire=false;
      Enumeration inputPorts=actorToFire.inputPorts();
      while (inputPorts.hasMoreElements()) {
        IOPort port=(IOPort)inputPorts.nextElement();
        for (int i=0; i < port.getWidth(); i++) {
          if (port.hasToken(i)) {
            refire=true;
            break;
          }
        }
        if (refire == true)         break;
      }
    }
 while (refire);
    try {
      DEEvent next=_eventQueue.get();
      if (next.timeStamp() > getCurrentTime())       break;
 else       if (next.timeStamp() < getCurrentTime()) {
        throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
      }
    }
 catch (    IllegalActionException e) {
      break;
    }
  }
}

Fixed version (ground truth):
/** 
 * Advance current time to the next event in the event queue, and fire one or more actors that have events at that time. Each actor is iterated repeatedly (prefire(), fire(), postfire()), until either it has no more input tokens at the current time, or its prefire() method returns false. If there are no events in the event queue, then the behavior depends on whether stopWhenQueueIsEmpty() has been called.  If it has, and was given the argument false, then this thread will stall until inputs become available on the input queue.  Otherwise, time will advance to the stop time and the execution will halt.
 * @exception IllegalActionException If the firing actor throws it.
 */
public void fire() throws IllegalActionException {
  boolean _timeHasNotAdvanced=true;
  while (true) {
    Actor actorToFire=_dequeueEvents();
    if (actorToFire == null) {
      if (_debugging)       _debug("String_Node_Str");
      _noMoreActorsToFire=true;
      return;
    }
    if (actorToFire == getContainer()) {
      return;
    }
    boolean refire=false;
    do {
      if (_debugging) {
        _debug("String_Node_Str",((Entity)actorToFire).getName(),"String_Node_Str",Double.toString(getCurrentTime()));
      }
      if (!actorToFire.prefire()) {
        if (_debugging)         _debug("String_Node_Str");
        break;
      }
      actorToFire.fire();
      if (!actorToFire.postfire()) {
        if (_debugging)         _debug("String_Node_Str",((Entity)actorToFire).getName());
        disableActor(actorToFire);
      }
      refire=false;
      Enumeration inputPorts=actorToFire.inputPorts();
      while (inputPorts.hasMoreElements()) {
        IOPort port=(IOPort)inputPorts.nextElement();
        for (int i=0; i < port.getWidth(); i++) {
          if (port.hasToken(i)) {
            refire=true;
            break;
          }
        }
        if (refire == true)         break;
      }
    }
 while (refire);
    try {
      DEEvent next=_eventQueue.get();
      if (next.timeStamp() > getCurrentTime())       break;
 else       if (next.timeStamp() < getCurrentTime()) {
        throw new InternalErrorException("String_Node_Str" + "String_Node_Str");
      }
    }
 catch (    IllegalActionException e) {
      break;
    }
  }
}