Program: 75684
Project: 75684
Buggy source:
/** 
 * Output the current value of the clock.
 * @exception IllegalActionException If the <i>values</i> and<i>offsets</i> parameters do not have the same length, or if the value in the offsets parameter is encountered that is greater than the period, or if there is no director.
 */
public void fire() throws IllegalActionException {
  double periodValue=((DoubleToken)period.getToken()).doubleValue();
  double currentTime=getDirector().getCurrentTime();
  System.out.println("String_Node_Str" + currentTime);
  if (_trigger == false) {
    System.out.println("String_Node_Str" + currentTime);
    _tentativeCycleStartTime=_cycleStartTime;
    _tentativePhase=_phase;
    _tentativeCurrentValue=_currentValue;
  }
  while (_tentativeCycleStartTime + periodValue <= currentTime) {
    _tentativeCycleStartTime+=periodValue;
  }
  _tentativeNextFiringTime=Double.NEGATIVE_INFINITY;
  ArrayToken val=(ArrayToken)(values.getToken());
  if (_offsets.length != val.length()) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  _tentativeCurrentValue=_getValue(_tentativePhase);
  _tentativePhase++;
  if (_tentativePhase >= _offsets.length) {
    _tentativePhase=0;
    _tentativeCycleStartTime+=periodValue;
  }
  if (_offsets[_tentativePhase] >= periodValue) {
    throw new IllegalActionException(this,"String_Node_Str" + _tentativePhase + "String_Node_Str"+ _offsets[_tentativePhase]+ "String_Node_Str"+ "String_Node_Str"+ periodValue);
  }
  _tentativeNextFiringTime=_tentativeCycleStartTime + _offsets[_tentativePhase];
  System.out.println("String_Node_Str" + _tentativeCycleStartTime);
  System.out.println("String_Node_Str" + _tentativePhase);
  System.out.println("String_Node_Str" + _tentativeNextFiringTime);
  output.send(0,_tentativeCurrentValue);
  System.out.println(_tentativeCurrentValue);
}

Fixed version (ground truth):
/** 
 * Output the current value of the clock.
 * @exception IllegalActionException If the <i>values</i> and<i>offsets</i> parameters do not have the same length, or if the value in the offsets parameter is encountered that is greater than the period, or if there is no director.
 */
public void fire() throws IllegalActionException {
  double periodValue=((DoubleToken)period.getToken()).doubleValue();
  double currentTime=getDirector().getCurrentTime();
  System.out.println("String_Node_Str" + currentTime);
  if (!_trigger) {
    if (trigger.hasToken(0)) {
      System.out.println("String_Node_Str");
      _trigger=((BooleanToken)trigger.get(0)).booleanValue();
      System.out.println("String_Node_Str" + _trigger);
      if (_trigger) {
        _tentativeCycleStartTime=currentTime;
        _tentativePhase=0;
        _tentativeCurrentValue=_getValue(_phase);
        System.out.println("String_Node_Str");
        _trigger=true;
      }
    }
  }
 else {
    System.out.println("String_Node_Str" + currentTime);
    _tentativeCycleStartTime=_cycleStartTime;
    _tentativePhase=_phase;
    _tentativeCurrentValue=_currentValue;
  }
  while (_tentativeCycleStartTime + periodValue <= currentTime) {
    _tentativeCycleStartTime+=periodValue;
  }
  _tentativeNextFiringTime=Double.NEGATIVE_INFINITY;
  ArrayToken val=(ArrayToken)(values.getToken());
  if (_offsets.length != val.length()) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  _tentativeCurrentValue=_getValue(_tentativePhase);
  _tentativePhase++;
  if (_tentativePhase >= _offsets.length) {
    _tentativePhase=0;
    _tentativeCycleStartTime+=periodValue;
  }
  if (_offsets[_tentativePhase] >= periodValue) {
    throw new IllegalActionException(this,"String_Node_Str" + _tentativePhase + "String_Node_Str"+ _offsets[_tentativePhase]+ "String_Node_Str"+ "String_Node_Str"+ periodValue);
  }
  _tentativeNextFiringTime=_tentativeCycleStartTime + _offsets[_tentativePhase];
  System.out.println("String_Node_Str" + _tentativeCycleStartTime);
  System.out.println("String_Node_Str" + _tentativePhase);
  System.out.println("String_Node_Str" + _tentativeNextFiringTime);
  output.send(0,_tentativeCurrentValue);
  System.out.println(_tentativeCurrentValue);
}