Program: 72811
Project: 72811
Buggy source:
/** 
 * Schedule a new actor for execution. Find the const actor in the _model that is mapped to this actor and trigger a firing of that one, if the actor is not already in execution. If the actor finished execution, return zero time, otherwise return the next time the model has something to do.
 * @param actor The actor to be scheduled.
 * @param currentPlatformTime The current platform time.
 * @param deadline The deadline of the event.
 * @param executionTime The execution time of the actor.
 * @return Relative time when this aspect has to be executedagain.
 * @exception IllegalActionException Thrown if actor parameters suchas execution time or priority cannot be read.
 */
protected Time _schedule(Actor actor,Time currentPlatformTime,Time deadline,Time executionTime) throws IllegalActionException {
  _lastActorFinished=false;
  getDirector().setModelTime(getExecutiveDirector().localClock.getLocalTime());
  Time time=_lastTimeScheduled.get(actor);
  if ((_justMonitor && (time == null || !time.equals(currentPlatformTime))) || !_currentlyExecuting.contains(actor)) {
    _lastTimeScheduled.put(actor,currentPlatformTime);
    notifyExecutionListeners((NamedObj)actor,getExecutiveDirector().localClock.getLocalTime().getDoubleValue(),ExecutionEventType.START);
    if (_requestPorts.get(actor) == null) {
      throw new IllegalActionException(this,"String_Node_Str" + actor + "String_Node_Str"+ "String_Node_Str");
    }
    ExecutionRequestPort requestPort=(ExecutionRequestPort)getEntity(_requestPorts.get(actor));
    if (requestPort != null) {
      RecordToken recordToken=new RecordToken(new String[]{"String_Node_Str","String_Node_Str"},new Token[]{new ObjectToken(actor),new DoubleToken(executionTime.getDoubleValue())});
      requestPort.value.setToken(recordToken);
      getDirector().fireAtCurrentTime(requestPort);
      getExecutiveDirector().fireAt(this,getDirector().getModelTime());
      _currentlyExecuting.add(actor);
    }
 else {
      throw new IllegalActionException(this,"String_Node_Str" + _requestPorts.get(actor));
    }
  }
  if (_justMonitor) {
    _lastActorFinished=true;
    return new Time(getDirector(),0.0);
  }
 else {
    return Time.POSITIVE_INFINITY;
  }
}

Fixed version (ground truth):
/** 
 * Schedule a new actor for execution. Find the const actor in the _model that is mapped to this actor and trigger a firing of that one, if the actor is not already in execution. If the actor finished execution, return zero time, otherwise return the next time the model has something to do.
 * @param actor The actor to be scheduled.
 * @param currentPlatformTime The current platform time.
 * @param deadline The deadline of the event.
 * @param executionTime The execution time of the actor.
 * @return Relative time when this aspect has to be executedagain.
 * @exception IllegalActionException Thrown if actor parameters suchas execution time or priority cannot be read.
 */
protected Time _schedule(Actor actor,Time currentPlatformTime,Time deadline,Time executionTime) throws IllegalActionException {
  _lastActorFinished=false;
  getDirector().setModelTime(getExecutiveDirector().localClock.getLocalTime());
  Time time=_lastTimeScheduled.get(actor);
  if ((_justMonitor && (time == null || !time.equals(currentPlatformTime))) || !_currentlyExecuting.contains(actor)) {
    _lastTimeScheduled.put(actor,currentPlatformTime);
    notifyExecutionListeners((NamedObj)actor,getExecutiveDirector().localClock.getLocalTime().getDoubleValue(),ExecutionEventType.START);
    if (_requestPorts == null || _requestPorts.get(actor) == null) {
      CompositeExecutionAspectAttributes decoratorAttributes=(CompositeExecutionAspectAttributes)((NamedObj)actor).getDecoratorAttributes(this);
      String portName=((StringParameter)decoratorAttributes.getAttribute("String_Node_Str")).getValueAsString();
      if (portName == null || portName.equals("String_Node_Str")) {
        throw new IllegalActionException(this,"String_Node_Str" + actor + "String_Node_Str"+ "String_Node_Str");
      }
      setRequestPort(actor,portName);
    }
    ExecutionRequestPort requestPort=(ExecutionRequestPort)getEntity(_requestPorts.get(actor));
    if (requestPort != null) {
      RecordToken recordToken=new RecordToken(new String[]{"String_Node_Str","String_Node_Str"},new Token[]{new ObjectToken(actor),new DoubleToken(executionTime.getDoubleValue())});
      requestPort.value.setToken(recordToken);
      getDirector().fireAtCurrentTime(requestPort);
      getExecutiveDirector().fireAt(this,getDirector().getModelTime());
      _currentlyExecuting.add(actor);
    }
 else {
      throw new IllegalActionException(this,"String_Node_Str" + _requestPorts.get(actor));
    }
  }
  if (_justMonitor) {
    _lastActorFinished=true;
    return new Time(getDirector(),0.0);
  }
 else {
    return Time.POSITIVE_INFINITY;
  }
}