Program: 76385
Project: 76385
Buggy source:
/** 
 * Simulate the creation of tokens by the given output port when it's actor fires.  If any actors that receive tokens are then ready to fire, given that only actors in the actor list are eing scheduled, then add those actors to the list of actors that are ready to schedule. update the waiting tokens map with the tokens available on each channel of each port.
 */
private void _simulateTokensCreated(IOPort outputPort,CircularList actorList,CircularList readyToScheduleActorList,LLMap waitingTokens) throws IllegalActionException {
  int createdTokens=_getTokenProductionRate(outputPort);
  _debug("String_Node_Str" + createdTokens + "String_Node_Str"+ outputPort.getFullName());
  Enumeration crelations=outputPort.linkedRelations();
  while (crelations.hasMoreElements()) {
    IORelation connectedRelation=(IORelation)crelations.nextElement();
    Enumeration cports=connectedRelation.linkedPorts();
    while (cports.hasMoreElements()) {
      IOPort connectedPort=(IOPort)cports.nextElement();
      ComponentEntity connectedActor=(ComponentEntity)connectedPort.getContainer();
      if (!connectedPort.equals(outputPort)) {
        int[] tokens=(int[])waitingTokens.at(connectedPort);
        int startChannel=_startChannel(connectedPort,connectedRelation);
        for (int i=0; i < connectedRelation.getWidth(); i++) {
          tokens[startChannel++]+=createdTokens;
        }
        int ival=_countUnfulfilledInputs((Actor)connectedActor,actorList,waitingTokens);
        int firingsRemaining=_getFiringCount(connectedActor);
        if ((ival <= 0) && (firingsRemaining > 0)) {
          readyToScheduleActorList.insertLast(connectedActor);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Simulate the creation of tokens by the given output port when its actor fires.  If any actors that receive tokens are then ready to fire, given that only actors in the actor list are being scheduled, then add those actors to the list of actors that are ready to schedule. update the waiting tokens map with the tokens available on each channel of each port.
 */
private void _simulateTokensCreated(IOPort outputPort,int createdTokens,CircularList actorList,CircularList readyToScheduleActorList,LLMap waitingTokens) throws IllegalActionException {
  _debug("String_Node_Str" + createdTokens + "String_Node_Str"+ outputPort.getFullName());
  Receiver[][] creceivers=outputPort.getRemoteReceivers();
  _debug("String_Node_Str" + creceivers.length);
  int sourcechannel;
  for (sourcechannel=0; sourcechannel < creceivers.length; sourcechannel++) {
    _debug("String_Node_Str" + creceivers[sourcechannel].length);
    int destinationreceiver;
    for (destinationreceiver=0; destinationreceiver < creceivers[sourcechannel].length; destinationreceiver++) {
      IOPort connectedPort=(IOPort)creceivers[sourcechannel][destinationreceiver].getContainer();
      ComponentEntity connectedActor=(ComponentEntity)connectedPort.getContainer();
      if (actorList.includes(connectedActor)) {
        int destinationchannel=_getChannel(connectedPort,creceivers[sourcechannel][destinationreceiver]);
        int[] tokens=(int[])waitingTokens.at(connectedPort);
        tokens[destinationchannel]+=createdTokens;
        _debug("String_Node_Str" + destinationchannel + "String_Node_Str"+ connectedPort.getName());
        int ival=_countUnfulfilledInputs((Actor)connectedActor,actorList,waitingTokens);
        int firingsRemaining=_getFiringCount(connectedActor);
        if ((ival <= 0) && (firingsRemaining > 0)) {
          readyToScheduleActorList.insertLast(connectedActor);
        }
      }
    }
  }
}