Program: 75840
Project: 75840
Buggy source:
private void _updateInputTokenConsumptionRates(TypedCompositeActor actor) throws IllegalActionException {
  if (_debug_info)   System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ actor.getFullName());
  CompositeActor refineInPortContainer=(CompositeActor)actor.getContainer();
  List containerPortList=refineInPortContainer.inputPortList();
  Iterator containerPorts=containerPortList.iterator();
  while (containerPorts.hasNext()) {
    IOPort containerPort=(IOPort)containerPorts.next();
    _setTokenConsumptionRate(refineInPortContainer,containerPort,0);
  }
  Iterator refineInPorts=actor.inputPortList().iterator();
  while (refineInPorts.hasNext()) {
    IOPort refineInPort=(IOPort)refineInPorts.next();
    if (_debug_info)     System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineInPort.getFullName());
    Iterator inPortsOutside=refineInPort.deepConnectedInPortList().iterator();
    if (!inPortsOutside.hasNext()) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    while (inPortsOutside.hasNext()) {
      IOPort inputPortOutside=(IOPort)inPortsOutside.next();
      if (_debug_info)       System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ inputPortOutside.getFullName());
      ComponentEntity thisPortContainer=(ComponentEntity)inputPortOutside.getContainer();
      if (thisPortContainer.getFullName() == refineInPortContainer.getFullName()) {
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ inputPortOutside.getFullName());
        List listOfPorts=refineInPort.insidePortList();
        int refineInPortRate;
        if (listOfPorts.isEmpty()) {
          refineInPortRate=0;
        }
 else {
          IOPort portWithRateInfo=(IOPort)listOfPorts.get(0);
          refineInPortRate=_getTokenConsumptionRate(portWithRateInfo);
        }
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + refineInPort.getFullName()+ "String_Node_Str"+ _getTokenConsumptionRate(refineInPort));
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineInPortRate);
        _setTokenConsumptionRate(refineInPortContainer,inputPortOutside,refineInPortRate);
      }
    }
  }
}

Fixed version (ground truth):
private void _updateInputTokenConsumptionRates(TypedCompositeActor actor) throws IllegalActionException {
  if (_debug_info)   System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ actor.getFullName());
  CompositeActor refineInPortContainer=(CompositeActor)actor.getContainer();
  List containerPortList=refineInPortContainer.inputPortList();
  Iterator containerPorts=containerPortList.iterator();
  while (containerPorts.hasNext()) {
    IOPort containerPort=(IOPort)containerPorts.next();
    _setTokenConsumptionRate(refineInPortContainer,containerPort,0);
  }
  Iterator refineInPorts=actor.inputPortList().iterator();
  while (refineInPorts.hasNext()) {
    IOPort refineInPort=(IOPort)refineInPorts.next();
    if (_debug_info)     System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ refineInPort.getFullName());
    Iterator inPortsOutside=refineInPort.deepConnectedInPortList().iterator();
    if (!inPortsOutside.hasNext()) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
    while (inPortsOutside.hasNext()) {
      IOPort inputPortOutside=(IOPort)inPortsOutside.next();
      if (_debug_info)       System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ inputPortOutside.getFullName());
      ComponentEntity thisPortContainer=(ComponentEntity)inputPortOutside.getContainer();
      if (thisPortContainer.getFullName() == refineInPortContainer.getFullName()) {
        if (_debug_info)         System.out.println(getName() + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ inputPortOutside.getFullName());
        int portRateToSet=SDFScheduler.getTokenConsumptionRate(refineInPort);
        SDFScheduler.setTokenConsumptionRate(inputPortOutside,portRateToSet);
      }
    }
  }
}