Program: 74006
Project: 74006
Buggy source:
/** 
 * Prefire method when the enclosing director is not an instance of this same class.
 * @return True if it is OK to fire.
 */
private boolean _prefireWithEnclosingNonContinuousDirector() throws IllegalActionException {
  CompositeActor container=(CompositeActor)getContainer();
  Director executiveDirector=((Actor)container).getExecutiveDirector();
  Time outTime=executiveDirector.getModelTime();
  int localTimeExceedsOutsideTime=_currentTime.compareTo(outTime);
  if (localTimeExceedsOutsideTime > 0) {
    if (!_commitIsPending) {
      throw new IllegalActionException(this,"String_Node_Str" + container.getFullName() + "String_Node_Str"+ "String_Node_Str"+ outTime+ "String_Node_Str"+ _currentTime);
    }
    _currentStepSize=outTime.subtract(_iterationBeginTime).getDoubleValue();
    if (_currentStepSize < 0.0) {
      throw new IllegalActionException(this,"String_Node_Str" + _iterationBeginTime + "String_Node_Str"+ outTime+ "String_Node_Str");
    }
    rollBackToCommittedState();
    _commitIsPending=false;
  }
 else   if (localTimeExceedsOutsideTime == 0 && _commitIsPending) {
    _currentStepSize=0.0;
    return true;
  }
 else   if (localTimeExceedsOutsideTime < 0 && executiveDirector != _enclosingContinuousDirector()) {
    if (_commitIsPending) {
      _commitIsPending=false;
      rollBackToCommittedState();
    }
    _currentTime=outTime;
    if (_debugging) {
      _debug("String_Node_Str" + _currentTime + "String_Node_Str");
    }
    _currentStepSize=0.0;
  }
  Time environmentNextIterationTime=executiveDirector.getModelNextIterationTime();
  Time localTargetTime=_iterationBeginTime.add(_currentStepSize);
  if (environmentNextIterationTime.compareTo(localTargetTime) < 0) {
    _currentStepSize=environmentNextIterationTime.subtract(_currentTime).getDoubleValue();
    if (_debugging) {
      _debug("String_Node_Str" + _currentStepSize);
    }
  }
  if (!_breakpoints.isEmpty()) {
    SuperdenseTime nextBreakpoint=(SuperdenseTime)_breakpoints.first();
    Time breakpointTime=nextBreakpoint.timestamp();
    localTimeExceedsOutsideTime=breakpointTime.compareTo(_currentTime);
    while (localTimeExceedsOutsideTime < 0 || (localTimeExceedsOutsideTime == 0 && nextBreakpoint.index() < _index)) {
      if (_debugging) {
        _debug("String_Node_Str" + breakpointTime);
      }
      _fireAtSkipped(breakpointTime);
      _breakpoints.removeFirst();
      if (_breakpoints.isEmpty()) {
        break;
      }
      nextBreakpoint=(SuperdenseTime)_breakpoints.first();
      breakpointTime=nextBreakpoint.timestamp();
      localTimeExceedsOutsideTime=breakpointTime.compareTo(_currentTime);
    }
    if (localTimeExceedsOutsideTime == 0 && nextBreakpoint.index() == _index) {
      if (_debugging) {
        _debug("String_Node_Str" + nextBreakpoint + "String_Node_Str");
      }
      _breakpoints.removeFirst();
    }
  }
  boolean result=super.prefire();
  if (executiveDirector instanceof SuperdenseTimeDirector) {
    _index=((SuperdenseTimeDirector)executiveDirector).getIndex();
  }
  _resetAllReceivers();
  if (_debugging) {
    _debug("String_Node_Str" + result);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Prefire method when the enclosing director is not an instance of this same class.
 * @return True if it is OK to fire.
 */
private boolean _prefireWithEnclosingNonContinuousDirector() throws IllegalActionException {
  CompositeActor container=(CompositeActor)getContainer();
  Director executiveDirector=((Actor)container).getExecutiveDirector();
  Time outTime=executiveDirector.getModelTime();
  int localTimeExceedsOutsideTime=_currentTime.compareTo(outTime);
  if (localTimeExceedsOutsideTime > 0) {
    if (!_commitIsPending) {
      throw new IllegalActionException(this,"String_Node_Str" + container.getFullName() + "String_Node_Str"+ "String_Node_Str"+ outTime+ "String_Node_Str"+ _currentTime);
    }
    _currentStepSize=outTime.subtract(_iterationBeginTime).getDoubleValue();
    if (_currentStepSize < 0.0) {
      throw new IllegalActionException(this,"String_Node_Str" + _iterationBeginTime + "String_Node_Str"+ outTime+ "String_Node_Str");
    }
    rollBackToCommittedState();
    _commitIsPending=false;
    _redoingSolverIteration=true;
  }
 else   if (localTimeExceedsOutsideTime == 0 && _commitIsPending) {
    _currentStepSize=0.0;
    if (executiveDirector instanceof SuperdenseTimeDirector) {
      _index=((SuperdenseTimeDirector)executiveDirector).getIndex();
    }
    return true;
  }
 else   if (localTimeExceedsOutsideTime < 0) {
    if (_commitIsPending) {
      _commitIsPending=false;
      rollBackToCommittedState();
    }
    _currentTime=outTime;
    if (_debugging) {
      _debug("String_Node_Str" + _currentTime + "String_Node_Str");
    }
    _currentStepSize=0.0;
  }
 else {
    Time environmentNextIterationTime=executiveDirector.getModelNextIterationTime();
    Time localTargetTime=_iterationBeginTime.add(_currentStepSize);
    if (environmentNextIterationTime.compareTo(localTargetTime) < 0) {
      _currentStepSize=environmentNextIterationTime.subtract(_currentTime).getDoubleValue();
      if (_debugging) {
        _debug("String_Node_Str" + _currentStepSize);
      }
    }
    if (executiveDirector instanceof SuperdenseTimeDirector) {
      _index=((SuperdenseTimeDirector)executiveDirector).getIndex();
    }
  }
  if (!_breakpoints.isEmpty()) {
    SuperdenseTime nextBreakpoint=(SuperdenseTime)_breakpoints.first();
    Time breakpointTime=nextBreakpoint.timestamp();
    localTimeExceedsOutsideTime=breakpointTime.compareTo(_currentTime);
    while (localTimeExceedsOutsideTime < 0 || (localTimeExceedsOutsideTime == 0 && nextBreakpoint.index() < _index)) {
      if (_debugging) {
        _debug("String_Node_Str" + breakpointTime);
      }
      _fireAtSkipped(breakpointTime);
      _breakpoints.removeFirst();
      if (_breakpoints.isEmpty()) {
        break;
      }
      nextBreakpoint=(SuperdenseTime)_breakpoints.first();
      breakpointTime=nextBreakpoint.timestamp();
      localTimeExceedsOutsideTime=breakpointTime.compareTo(_currentTime);
    }
    if (localTimeExceedsOutsideTime == 0 && nextBreakpoint.index() == _index) {
      if (_debugging) {
        _debug("String_Node_Str" + nextBreakpoint + "String_Node_Str");
      }
      _breakpoints.removeFirst();
    }
  }
  _synchronizeToRealTime();
  _postfireReturns=true;
  if (_debugging) {
    _debug("String_Node_Str");
  }
  return true;
}