Program: 72326
Project: 72326
Buggy source:
/** 
 * Invoke the specified function after the specified amount of time.  Unlike the public method, this method uses the specified id.  The time will be added to the current time of the director, and fireAt() request will be made of the director. If the director cannot fulfill the request, this method will throw an exception. Note that if you want real-time behavior, then the director's synchronizeToRealTime parameter needs to be set to true.
 * @param function The function to invoke.
 * @param milliseconds The number of milliseconds in the future to invoke it.
 * @param id The id for the callback function.
 * @return A unique ID for this callback.
 * @exception IllegalActionException If the director cannot respect the request.
 */
private synchronized void _setTimeout(final Runnable function,long milliseconds,Integer id) throws IllegalActionException {
  Director director=getDirector();
  Time currentTime=director.getModelTime();
  if (currentTime == null) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  Attribute sync=director.getAttribute("String_Node_Str");
  if (sync instanceof Parameter) {
    Token token=((Parameter)sync).getToken();
    if (token instanceof BooleanToken && !((BooleanToken)token).booleanValue()) {
      try {
        MessageHandler.warning("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      }
 catch (      CancelException e) {
        throw new IllegalActionException(this,"String_Node_Str");
      }
    }
  }
  final Time callbackTime=currentTime.add(milliseconds * 0.001);
  Time responseTime=director.fireAt(this,callbackTime);
  if (!responseTime.equals(callbackTime)) {
    throw new IllegalActionException(this,"String_Node_Str" + callbackTime + "String_Node_Str"+ responseTime+ "String_Node_Str");
  }
  _pendingTimeoutFunctions.put(id,function);
  Queue<Integer> ids=_pendingTimeoutIDs.get(callbackTime);
  if (ids == null) {
    ids=new LinkedList<Integer>();
    _pendingTimeoutIDs.put(callbackTime,ids);
  }
  ids.add(id);
}

Fixed version (ground truth):
/** 
 * Invoke the specified function after the specified amount of time.  Unlike the public method, this method uses the specified id.  The time will be added to the current time of the director, and fireAt() request will be made of the director. If the director cannot fulfill the request, this method will throw an exception. Note that if you want real-time behavior, then the director's synchronizeToRealTime parameter needs to be set to true.
 * @param function The function to invoke.
 * @param milliseconds The number of milliseconds in the future to invoke it.
 * @param id The id for the callback function.
 * @return A unique ID for this callback.
 * @exception IllegalActionException If the director cannot respect the request.
 */
private synchronized void _setTimeout(final Runnable function,long milliseconds,Integer id) throws IllegalActionException {
  Director director=getDirector();
  Time currentTime=director.getModelTime();
  if (currentTime == null) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  Attribute sync=director.getAttribute("String_Node_Str");
  if (sync instanceof Parameter) {
    Token token=((Parameter)sync).getToken();
    if (token instanceof BooleanToken && !((BooleanToken)token).booleanValue()) {
      if (!_timeWarningIssued) {
        _timeWarningIssued=true;
        try {
          MessageHandler.warning("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
        }
 catch (        CancelException e) {
          throw new IllegalActionException(this,"String_Node_Str");
        }
      }
    }
  }
  final Time callbackTime=currentTime.add(milliseconds * 0.001);
  Time responseTime=director.fireAt(this,callbackTime);
  if (!responseTime.equals(callbackTime)) {
    throw new IllegalActionException(this,"String_Node_Str" + callbackTime + "String_Node_Str"+ responseTime+ "String_Node_Str");
  }
  _pendingTimeoutFunctions.put(id,function);
  Queue<Integer> ids=_pendingTimeoutIDs.get(callbackTime);
  if (ids == null) {
    ids=new LinkedList<Integer>();
    _pendingTimeoutIDs.put(callbackTime,ids);
  }
  ids.add(id);
}