Program: 76120
Project: 76120
Buggy source:
/** 
 * Execute the directed (sub)system to the fire end time. If this is a top-level director, the fire end time if the current time at the beginning of the fire() method plus the the step size of one successful step. Otherwise, it executes until one of the following conditions is satisfied. 1) The fire end time computed in the prefire() method is reached. 2) An event is generated. It saves the state of the system at the current time of the executive director as the "known good" state, and runs ahead of that time. The "known good" state is used for roll back.
 * @exception IllegalActionException If thrown by the ODE solver,or the prefire(), fire(), or postfire() methods of an actor.
 */
public void fire() throws IllegalActionException {
  if (_isTopLevel()) {
    super.fire();
    return;
  }
  CompositeActor ca=(CompositeActor)getContainer();
  Director exe=ca.getExecutiveDirector();
  if (_isEventPhase()) {
    if (_debugging)     _debug(getFullName(),"String_Node_Str");
    _eventPhaseExecution();
    _setEventPhase(false);
    if (_debugging)     _debug(getFullName(),"String_Node_Str" + exe.getCurrentTime(),"String_Node_Str");
    exe.fireAt(ca,exe.getCurrentTime());
    return;
  }
 else {
    while (true) {
      if (isBPIteration()) {
        _markStates();
      }
      _setIterationBeginTime(getCurrentTime());
      fireAt(null,getIterationEndTime());
      setCurrentStepSize(getSuggestedNextStepSize());
      _processBreakpoints();
      if (_debugging)       _debug(getName(),"String_Node_Str" + getCurrentStepSize() + "String_Node_Str"+ getCurrentTime()+ "String_Node_Str"+ (getCurrentStepSize() + getCurrentTime()));
      _fireOneIteration();
      if (_isStoppedByEvent()) {
        if (_debugging) {
          _debug(getFullName() + "String_Node_Str","String_Node_Str" + getCurrentTime(),"String_Node_Str" + getCurrentTime(),"String_Node_Str");
        }
        exe.fireAt(ca,getCurrentTime());
        _setEventPhase(true);
        return;
      }
 else       if (Math.abs(getCurrentTime() - getIterationEndTime()) < getTimeResolution()) {
        if (_debugging) {
          _debug(getFullName() + "String_Node_Str","String_Node_Str" + getCurrentTime(),"String_Node_Str" + getIterationEndTime(),"String_Node_Str");
        }
        exe.fireAt(ca,getIterationEndTime());
        _setEventPhase(false);
        return;
      }
 else {
        throw new InternalErrorException("String_Node_Str" + getFullName());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Execute the directed (sub)system to the fire end time. If this is a top-level director, the fire end time if the current time at the beginning of the fire() method plus the the step size of one successful step. Otherwise, it executes until one of the following conditions is satisfied. 1) The fire end time computed in the prefire() method is reached. 2) An event is generated. It saves the state of the system at the current time of the executive director as the "known good" state, and runs ahead of that time. The "known good" state is used for roll back.
 * @exception IllegalActionException If thrown by the ODE solver,or the prefire(), fire(), or postfire() methods of an actor.
 */
public void fire() throws IllegalActionException {
  if (_isTopLevel()) {
    super.fire();
    return;
  }
  CompositeActor ca=(CompositeActor)getContainer();
  Director exe=ca.getExecutiveDirector();
  if (_isEventPhase()) {
    if (_debugging)     _debug(getFullName(),"String_Node_Str");
    _eventPhaseExecution();
    _setEventPhase(false);
    if (_debugging)     _debug(getFullName(),"String_Node_Str" + exe.getCurrentTime(),"String_Node_Str");
    exe.fireAt(ca,exe.getCurrentTime());
    return;
  }
 else {
    while (true) {
      if (isBPIteration()) {
        _markStates();
      }
      _setIterationBeginTime(getCurrentTime());
      fireAt(null,getIterationEndTime());
      setCurrentStepSize(getSuggestedNextStepSize());
      _processBreakpoints();
      if (_debugging)       _debug(getName(),"String_Node_Str" + getCurrentStepSize() + "String_Node_Str"+ getCurrentTime()+ "String_Node_Str"+ (getCurrentStepSize() + getCurrentTime()));
      _fireOneIteration();
      if (_isStoppedByEvent()) {
        if (_debugging) {
          _debug(getFullName() + "String_Node_Str","String_Node_Str" + getCurrentTime(),"String_Node_Str" + getCurrentTime(),"String_Node_Str");
        }
        exe.fireAt(ca,getCurrentTime());
        _setEventPhase(true);
        return;
      }
 else       if (Math.abs(getCurrentTime() - getIterationEndTime()) < getTimeResolution()) {
        if (_debugging) {
          _debug(getFullName() + "String_Node_Str","String_Node_Str" + getCurrentTime(),"String_Node_Str" + getIterationEndTime(),"String_Node_Str");
        }
        exe.fireAt(ca,getIterationEndTime());
        _setEventPhase(false);
        return;
      }
    }
  }
}