Program: 72631
Project: 72631
Buggy source:
/** 
 * Read date tokens from the input and store them until the real time equals the date in the token. If the date token on the input contains a date in the past, an exception is thrown.
 * @exception Thrown if the input date in the date token lies in the past.
 */
@Override public void fire() throws IllegalActionException {
  super.fire();
  long systemTime=System.currentTimeMillis();
  Time time=_director.getModelTime();
  if (_outputTokensForChannel != null && _outputTokensForChannel.size() > 0) {
    Time t=(Collections.min(_outputTokensForChannel.keySet()));
    if (t.compareTo(time) == 0) {
      List<Integer> channels=_outputTokensForChannel.get(t);
      for (int i=0; i < channels.size(); i++) {
        output.send(channels.get(i),new DateToken(systemTime));
      }
      _outputTokensForChannel.remove(t);
    }
  }
  for (int channel=0; channel < input.getWidth(); channel++) {
    if (input.hasToken(0)) {
      DateToken token=(DateToken)input.get(0);
      if (token.getCalendarInstance().getTimeInMillis() < systemTime) {
        throw new IllegalActionException(this,"String_Node_Str" + token.toString() + "String_Node_Str");
      }
 else {
        Time fireTime=new Time(_director,(token.getCalendarInstance().getTimeInMillis() - _director.getRealStartTimeMillis()) * _director.localClock.getTimeResolution());
        _director.fireAt(this,fireTime);
        if (_outputTokensForChannel == null) {
          _outputTokensForChannel=new HashMap<Time,List<Integer>>();
        }
        List<Integer> channels=_outputTokensForChannel.get(fireTime);
        if (channels == null) {
          channels=new ArrayList<Integer>();
        }
        channels.add(channel);
        _outputTokensForChannel.put(fireTime,channels);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Read date tokens from the input and store them until the real time equals the date in the token. If the date token on the input contains a date in the past, an exception is thrown.
 * @exception IllegalActionException Thrown if the input date in the date token lies in the past.
 */
@Override public void fire() throws IllegalActionException {
  super.fire();
  long systemTime=System.currentTimeMillis();
  Time time=_director.getModelTime();
  if (_outputTokensForChannel != null && _outputTokensForChannel.size() > 0) {
    Time t=(Collections.min(_outputTokensForChannel.keySet()));
    if (t.compareTo(time) == 0) {
      List<Integer> channels=_outputTokensForChannel.get(t);
      for (int i=0; i < channels.size(); i++) {
        output.send(channels.get(i),new DateToken(systemTime));
      }
      _outputTokensForChannel.remove(t);
    }
  }
  for (int channel=0; channel < input.getWidth(); channel++) {
    if (input.hasToken(0)) {
      DateToken token=(DateToken)input.get(0);
      if (token.getCalendarInstance().getTimeInMillis() < systemTime) {
        throw new IllegalActionException(this,"String_Node_Str" + token.toString() + "String_Node_Str");
      }
 else {
        long realTimeDifference=token.getCalendarInstance().getTimeInMillis() - _director.getRealStartTimeMillis();
        Time fireTime=new Time(_director,realTimeDifference * _director.localClock.getTimeResolution());
        _director.fireAt(this,fireTime);
        if (_outputTokensForChannel == null) {
          _outputTokensForChannel=new HashMap<Time,List<Integer>>();
        }
        List<Integer> channels=_outputTokensForChannel.get(fireTime);
        if (channels == null) {
          channels=new ArrayList<Integer>();
        }
        channels.add(channel);
        _outputTokensForChannel.put(fireTime,channels);
      }
    }
  }
}