Program: 75841
Project: 75841
Buggy source:
private void _updateOutputTokenProductionRates(TypedCompositeActor actor) throws IllegalActionException {
  CompositeActor refineOutPortContainer=(CompositeActor)actor.getContainer();
  List containerPortList=refineOutPortContainer.outputPortList();
  Iterator containerPorts=containerPortList.iterator();
  while (containerPorts.hasNext()) {
    IOPort containerPort=(IOPort)containerPorts.next();
    _setTokenProductionRate(refineOutPortContainer,containerPort,0);
  }
  Iterator refineOutPorts=actor.outputPortList().iterator();
  while (refineOutPorts.hasNext()) {
    IOPort refineOutPort=(IOPort)refineOutPorts.next();
    if (_debug_info)     System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineOutPort.getFullName());
    Iterator outPortsOutside=refineOutPort.deepConnectedOutPortList().iterator();
    if (!outPortsOutside.hasNext()) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    while (outPortsOutside.hasNext()) {
      IOPort outputPortOutside=(IOPort)outPortsOutside.next();
      if (_debug_info)       System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ outputPortOutside.getFullName());
      ComponentEntity thisPortContainer=(ComponentEntity)outputPortOutside.getContainer();
      if (thisPortContainer.getFullName() == refineOutPortContainer.getFullName()) {
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ outputPortOutside.getFullName());
        List listOfPorts=refineOutPort.insidePortList();
        int refineOutPortRate;
        if (listOfPorts.isEmpty()) {
          refineOutPortRate=0;
        }
 else {
          IOPort portWithRateInfo=(IOPort)listOfPorts.get(0);
          refineOutPortRate=_getTokenProductionRate(portWithRateInfo);
        }
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineOutPortRate);
        _setTokenProductionRate(refineOutPortContainer,outputPortOutside,refineOutPortRate);
      }
    }
  }
}

Fixed version (ground truth):
private void _updateOutputTokenProductionRates(TypedCompositeActor actor) throws IllegalActionException {
  if (_debug_info)   System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ actor.getName());
  CompositeActor refineOutPortContainer=(CompositeActor)actor.getContainer();
  List containerPortList=refineOutPortContainer.outputPortList();
  Iterator containerPorts=containerPortList.iterator();
  while (containerPorts.hasNext()) {
    IOPort containerPort=(IOPort)containerPorts.next();
    _setTokenProductionRate(refineOutPortContainer,containerPort,0);
  }
  Iterator refineOutPorts=actor.outputPortList().iterator();
  while (refineOutPorts.hasNext()) {
    IOPort refineOutPort=(IOPort)refineOutPorts.next();
    if (_debug_info) {
      System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineOutPort.getFullName()+ "String_Node_Str"+ SDFScheduler.getTokenProductionRate(refineOutPort));
    }
    Iterator outPortsOutside=refineOutPort.deepConnectedOutPortList().iterator();
    if (!outPortsOutside.hasNext()) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    while (outPortsOutside.hasNext()) {
      IOPort outputPortOutside=(IOPort)outPortsOutside.next();
      if (_debug_info)       System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ outputPortOutside.getFullName());
      ComponentEntity thisPortContainer=(ComponentEntity)outputPortOutside.getContainer();
      if (thisPortContainer.getFullName() == refineOutPortContainer.getFullName()) {
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ outputPortOutside.getFullName());
        int portRateToSet=SDFScheduler.getTokenProductionRate(refineOutPort);
        SDFScheduler.setTokenProductionRate(outputPortOutside,portRateToSet);
      }
    }
  }
}