Program: 75246
Project: 75246
Buggy source:
/** 
 * Invoke prefire() on all DYNAMIC_ACTORS, such as integrators, and emit their tentative outputs. Return true if all the prefire() methods return true and stop() is not called. Otherwise, return false.  Note that prefire() is called on all actors even if one returns false.
 * @return The logical AND of the prefire() of dynamic actors, orfalse if stop() is called.
 */
protected boolean _prefireDynamicActors() throws IllegalActionException {
  CTSchedule schedule=(CTSchedule)getScheduler().getSchedule();
  boolean result=true;
  Iterator actors=schedule.get(CTSchedule.DYNAMIC_ACTORS).actorIterator();
  _setExecutionPhase(CTExecutionPhase.PREFIRINGDYNAMICACTORS_PHASE);
  while (actors.hasNext() && !_stopRequested) {
    Actor actor=(Actor)actors.next();
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)actor).getName());
    boolean ready=actor.prefire();
    if (!ready) {
      _setExecutionPhase(CTExecutionPhase.UNKNOWN_PHASE);
      throw new IllegalActionException((Nameable)actor,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)actor).getName() + "String_Node_Str"+ ready);
    result=result && ready;
  }
  Iterator integrators=schedule.get(CTSchedule.DYNAMIC_ACTORS).actorIterator();
  while (integrators.hasNext() && !_stopRequested) {
    CTDynamicActor dynamic=(CTDynamicActor)integrators.next();
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)dynamic).getName());
    dynamic.emitTentativeOutputs();
  }
  _setExecutionPhase(CTExecutionPhase.UNKNOWN_PHASE);
  return result && !_stopRequested;
}

Fixed version (ground truth):
/** 
 * Invoke prefire() on all DYNAMIC_ACTORS, such as integrators, and emit their tentative outputs. Return true if all the prefire() methods return true and stop() is not called. Otherwise, return false.  Note that prefire() is called on all actors even if one returns false.
 * @return The logical AND of the prefire() of dynamic actors, orfalse if stop() is called.
 */
protected boolean _prefireDynamicActors() throws IllegalActionException {
  CTSchedule schedule=(CTSchedule)getScheduler().getSchedule();
  boolean result=true;
  Iterator actors=schedule.get(CTSchedule.DYNAMIC_ACTORS).actorIterator();
  _setExecutionPhase(CTExecutionPhase.PREFIRINGDYNAMICACTORS_PHASE);
  while (actors.hasNext() && !_stopRequested) {
    Actor actor=(Actor)actors.next();
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)actor).getName());
    boolean ready;
    if (actor instanceof AtomicActor) {
      ready=actor.prefire();
    }
 else {
      actor.fire();
      ready=true;
    }
    if (!ready) {
      _setExecutionPhase(CTExecutionPhase.UNKNOWN_PHASE);
      throw new IllegalActionException((Nameable)actor,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)actor).getName() + "String_Node_Str"+ ready);
    result=result && ready;
  }
  Iterator integrators=schedule.get(CTSchedule.DYNAMIC_ACTORS).actorIterator();
  while (integrators.hasNext() && !_stopRequested) {
    CTDynamicActor dynamic=(CTDynamicActor)integrators.next();
    if (_debugging)     _debug("String_Node_Str" + ((Nameable)dynamic).getName());
    dynamic.emitTentativeOutputs();
  }
  _setExecutionPhase(CTExecutionPhase.UNKNOWN_PHASE);
  return result && !_stopRequested;
}