Program: 73447
Project: 73447
Buggy source:
/** 
 * Update all future fireAt times. This method should be used when the clock drift for a particular (platform or execution) clock changes, then the future fireAt times will also change. Also keep track of the list of ignored future fireAt times, so that when this director is woken up at those times, the director will not fire.
 * @param realTimeClock The realTimeClock of interest.
 * @throws IllegalActionException If either the original or updated fireAttime is in the past.
 */
public void updateClockDrift(int clockID,Time newClockDrift) throws IllegalActionException {
  if (newClockDrift.compareTo(_zero) < 0) {
    throw new IllegalActionException(PtidesBasicDirector.this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
  RealTimeClock realTimeClock=null;
  if (clockID == PtidesBasicDirector.PLATFORM_TIMER) {
    realTimeClock=_platformTimeClock;
  }
 else   if (clockID == PtidesBasicDirector.EXECUTION_TIMER) {
    realTimeClock=_executionTimeClock;
  }
 else {
    throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  if (realTimeClock._clockDrift.compareTo(newClockDrift) != 0) {
    if (realTimeClock == _executionTimeClock) {
      _futureExecutionFireAtTimes=(List<Time>)_updateFireAtTimes(_futureExecutionFireAtTimes,_ignoredExecutionFireAtTimes,realTimeClock,newClockDrift);
    }
 else     if (realTimeClock == _platformTimeClock) {
      _futurePlatformFireAtTimes=(List<Time>)_updateFireAtTimes(_futurePlatformFireAtTimes,_ignoredPlatformFireAtTimes,realTimeClock,newClockDrift);
      _timedInterruptTimes=(List<TimedEvent>)_updateFireAtTimes(_timedInterruptTimes,null,realTimeClock,newClockDrift);
    }
 else {
      throw new InternalErrorException(this,null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
    Time newOracleTime=_getOraclePhysicalTag().timestamp;
    realTimeClock._lastPlatformTime=_getPlatformPhysicalTimeForOraclePhysicalTime(newOracleTime,realTimeClock._lastOracleTime,realTimeClock._clockDrift,realTimeClock._lastPlatformTime);
    realTimeClock._lastOracleTime=newOracleTime;
    realTimeClock._clockDrift=newClockDrift;
  }
}

Fixed version (ground truth):
/** 
 * Update all future fireAt times. This method should be used when the clock drift for a particular (platform or execution) clock changes, then the future fireAt times will also change. Also keep track of the list of ignored future fireAt times, so that when this director is woken up at those times, the director will not fire.
 * @param clockID an int specifying the ID of the clock.
 * @param newClockDrift a Time object that indicates the new drift of thatparticular clock.
 * @throws IllegalActionException If either the original or updated fireAttime is in the past.
 */
public void updateClockDrift(int clockID,Time newClockDrift) throws IllegalActionException {
  if (newClockDrift.compareTo(_zero) < 0) {
    throw new IllegalActionException(PtidesBasicDirector.this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
  RealTimeClock realTimeClock=null;
  if (clockID == PtidesBasicDirector.PLATFORM_TIMER) {
    realTimeClock=_platformTimeClock;
  }
 else   if (clockID == PtidesBasicDirector.EXECUTION_TIMER) {
    realTimeClock=_executionTimeClock;
  }
 else {
    throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  if (realTimeClock._clockDrift.compareTo(newClockDrift) != 0) {
    if (realTimeClock == _executionTimeClock) {
      _futureExecutionFireAtTimes=(List<Time>)_updateFireAtTimes(_futureExecutionFireAtTimes,_ignoredExecutionFireAtTimes,realTimeClock,newClockDrift);
    }
 else     if (realTimeClock == _platformTimeClock) {
      _futurePlatformFireAtTimes=(List<Time>)_updateFireAtTimes(_futurePlatformFireAtTimes,_ignoredPlatformFireAtTimes,realTimeClock,newClockDrift);
      _timedInterruptTimes=(List<TimedEvent>)_updateFireAtTimes(_timedInterruptTimes,null,realTimeClock,newClockDrift);
    }
 else {
      throw new InternalErrorException(this,null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
    Time newOracleTime=_getOraclePhysicalTag().timestamp;
    realTimeClock._lastPlatformTime=_getPlatformPhysicalTimeForOraclePhysicalTime(newOracleTime,realTimeClock._lastOracleTime,realTimeClock._clockDrift,realTimeClock._lastPlatformTime);
    realTimeClock._lastOracleTime=newOracleTime;
    realTimeClock._clockDrift=newClockDrift;
  }
}