Program: 73484
Project: 73484
Buggy source:
/** 
 * Given original fireAt times, and a realTime clock with updated clock drift, create a new list of fireAt times. Also add the old fireAt times into the list of ignored fireAt times.
 * @param originalFireAtTimes The original fireAt times.
 * @param ignoreFireAtTimes The list of ignored fireAt times.
 * @param realTimeClock The real time clock whose clock drift has changed.
 * @return The new list of fireAt times.
 * @exception IllegalActionException If either the original or updated fireAttime is in the past.
 */
private List<Time> _updateFireAtTimes(List<Time> originalFireAtTimes,List<Time> ignoreFireAtTimes,RealTimeClock realTimeClock) throws IllegalActionException {
  List<Time> newFireAtTimes=new LinkedList<Time>();
  for (  Time originalFireAtTime : originalFireAtTimes) {
    if (originalFireAtTime.compareTo(realTimeClock._lastOracleTime) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + originalFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ realTimeClock._lastOracleTime.toString());
    }
    if (originalFireAtTime.compareTo(_getOraclePhysicalTag().timestamp) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + originalFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ _getOraclePhysicalTag().timestamp.toString());
    }
    Time clockDriftDiff=realTimeClock._clockDrift.subtract(realTimeClock._previousClockDrift);
    Time temp1=(realTimeClock._lastOracleTime.multiply(clockDriftDiff)).divide(realTimeClock._clockDrift);
    Time temp2=(originalFireAtTime.multiply(realTimeClock._previousClockDrift)).divide(realTimeClock._clockDrift);
    Time newFireAtTime=temp1.add(temp2);
    if (newFireAtTime.compareTo(realTimeClock._lastOracleTime) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + newFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ realTimeClock._lastOracleTime.toString());
    }
    if (newFireAtTime.compareTo(_getOraclePhysicalTag().timestamp) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + newFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ _getOraclePhysicalTag().timestamp.toString());
    }
    newFireAtTimes.add(newFireAtTime);
    if (ignoreFireAtTimes != null) {
      ignoreFireAtTimes.add(originalFireAtTime);
    }
  }
  Collections.sort(newFireAtTimes);
  if (ignoreFireAtTimes != null) {
    Collections.sort(ignoreFireAtTimes);
  }
  return newFireAtTimes;
}

Fixed version (ground truth):
/** 
 * Given original fireAt times, and a realTime clock with updated clock drift, create a new list of fireAt times. Also add the old fireAt times into the list of ignored fireAt times.
 * @param originalFireAtTimes The original fireAt times.
 * @param ignoreFireAtTimes The list of ignored fireAt times.
 * @param realTimeClock The real time clock whose clock drift has changed.
 * @return The new list of fireAt times.
 * @exception IllegalActionException If either the original or updated fireAttime is in the past.
 */
private List<?> _updateFireAtTimes(List<?> originalFireAtTimes,List<Time> ignoreFireAtTimes,RealTimeClock realTimeClock,Time newClockDrift) throws IllegalActionException {
  List<Time> newFireAtTimes=new LinkedList<Time>();
  for (  Object originalFireAt : originalFireAtTimes) {
    Time originalFireAtTime=null;
    if (originalFireAt instanceof Time) {
      originalFireAtTime=(Time)originalFireAt;
    }
 else     if (originalFireAt instanceof TimedEvent) {
      originalFireAtTime=((TimedEvent)originalFireAt).timeStamp;
    }
 else {
      throw new InternalErrorException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (originalFireAtTime.compareTo(realTimeClock._lastOracleTime) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + originalFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ realTimeClock._lastOracleTime.toString());
    }
    if (originalFireAtTime.compareTo(_getOraclePhysicalTag().timestamp) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + originalFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ _getOraclePhysicalTag().timestamp.toString());
    }
    Time clockDriftDiff=newClockDrift.subtract(realTimeClock._clockDrift);
    Time temp1=(realTimeClock._lastOracleTime.multiply(clockDriftDiff)).divide(newClockDrift);
    Time temp2=(originalFireAtTime.multiply(realTimeClock._clockDrift)).divide(newClockDrift);
    Time newFireAtTime=temp1.add(temp2);
    if (newFireAtTime.compareTo(realTimeClock._lastOracleTime) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + newFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ realTimeClock._lastOracleTime.toString());
    }
    if (newFireAtTime.compareTo(_getOraclePhysicalTag().timestamp) < 0) {
      throw new IllegalActionException(this,"String_Node_Str" + newFireAtTime.toString() + "String_Node_Str"+ "String_Node_Str"+ _getOraclePhysicalTag().timestamp.toString());
    }
    newFireAtTimes.add(newFireAtTime);
    if (ignoreFireAtTimes != null) {
      ignoreFireAtTimes.add(originalFireAtTime);
    }
  }
  Collections.sort(newFireAtTimes);
  if (ignoreFireAtTimes != null) {
    Collections.sort(ignoreFireAtTimes);
  }
  return newFireAtTimes;
}