Program: 73146
Project: 73146
Buggy source:
/** 
 * Transfer data from an input port of the container to the ports it is connected to on the inside. This method extracts tokens from a record token if the  associated port is a network port. 
 * @exception IllegalActionException Not thrown in this base class.
 * @param port The port to transfer tokens from.
 * @return True if at least one data token is transferred.
 */
public boolean transferInputs(IOPort port) throws IllegalActionException {
  boolean result=false;
  for (int channelIndex=0; channelIndex < port.getWidth(); channelIndex++) {
    try {
      if (port.isKnown(channelIndex)) {
        if (port.hasToken(channelIndex)) {
          Token t=port.get(channelIndex);
          if (_debugging) {
            _debug(getName(),"String_Node_Str" + port.getName());
          }
          PtidesDirector director=(PtidesDirector)_getEmbeddedPtidesDirector();
          Port associatedPort=((MirrorPort)port).getAssociatedPort();
          if (associatedPort instanceof NetworkReceiverPort) {
            NetworkReceiverPort networkReceiverPort=(NetworkReceiverPort)associatedPort;
            if (!(t instanceof RecordToken) || ((RecordToken)t).labelSet().size() != 3) {
              throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
            }
            RecordToken record=(RecordToken)t;
            Time recordTimeStamp=new Time(director,((DoubleToken)(record.get(PtidesNetworkType.timestamp))).doubleValue());
            int recordMicrostep=((IntToken)(record.get(PtidesNetworkType.microstep))).intValue();
            Receiver[][] farReceivers=networkReceiverPort.deepGetReceivers();
            if (farReceivers.length > 0) {
              for (int i=0; i < farReceivers[channelIndex].length; i++) {
                director.addInputEvent(new PtidesEvent(networkReceiverPort,channelIndex,recordTimeStamp,recordMicrostep,-1,(Token)record.get(PtidesNetworkType.payload),farReceivers[channelIndex][i]),PtidesDirector._getDoubleParameterValue(networkReceiverPort,"String_Node_Str"));
              }
            }
          }
 else           if (associatedPort instanceof SensorPort) {
            SensorPort sensorPort=(SensorPort)associatedPort;
            Receiver[][] farReceivers=sensorPort.deepGetReceivers();
            if (farReceivers.length > 0) {
              for (int i=0; i < farReceivers[channelIndex].length; i++) {
                director.addInputEvent(new PtidesEvent(sensorPort,channelIndex,getModelTime(),1,-1,t,farReceivers[channelIndex][i]),PtidesDirector._getDoubleParameterValue(sensorPort,"String_Node_Str"));
              }
            }
          }
 else {
            ((MirrorPort)port).getAssociatedPort().sendInside(channelIndex,t);
          }
          result=true;
        }
      }
    }
 catch (    NoTokenException ex) {
      throw new InternalErrorException(this,ex,null);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Transfer data from an input port of the container to the ports it is connected to on the inside. This method extracts tokens from a record token if the  associated port is a network port. 
 * @exception IllegalActionException Not thrown in this base class.
 * @param port The port to transfer tokens from.
 * @return True if at least one data token is transferred.
 */
public boolean transferInputs(IOPort port) throws IllegalActionException {
  boolean result=false;
  PtidesDirector director=(PtidesDirector)_getEmbeddedPtidesDirector();
  for (int channelIndex=0; channelIndex < port.getWidth(); channelIndex++) {
    try {
      if (port.isKnown(channelIndex)) {
        if (port.hasToken(channelIndex)) {
          Token t=port.get(channelIndex);
          if (_debugging) {
            _debug(getName(),"String_Node_Str" + port.getName());
          }
          Port associatedPort=((MirrorPort)port).getAssociatedPort();
          if (associatedPort instanceof NetworkReceiverPort) {
            NetworkReceiverPort networkReceiverPort=(NetworkReceiverPort)associatedPort;
            if (!(t instanceof RecordToken) || ((RecordToken)t).labelSet().size() != 3) {
              throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
            }
            RecordToken record=(RecordToken)t;
            Time recordTimeStamp=new Time(director,((DoubleToken)(record.get(PtidesNetworkType.timestamp))).doubleValue());
            int recordMicrostep=((IntToken)(record.get(PtidesNetworkType.microstep))).intValue();
            Receiver[][] farReceivers=networkReceiverPort.deepGetReceivers();
            if (farReceivers.length > 0) {
              for (int i=0; i < farReceivers[channelIndex].length; i++) {
                director.addInputEvent(new PtidesEvent(networkReceiverPort,channelIndex,recordTimeStamp,recordMicrostep,-1,(Token)record.get(PtidesNetworkType.payload),farReceivers[channelIndex][i]),PtidesDirector._getDoubleParameterValue(networkReceiverPort,"String_Node_Str"));
              }
            }
          }
 else           if (associatedPort instanceof SensorPort) {
            SensorPort sensorPort=(SensorPort)associatedPort;
            Receiver[][] farReceivers=sensorPort.deepGetReceivers();
            if (farReceivers.length > 0) {
              for (int i=0; i < farReceivers[channelIndex].length; i++) {
                director.addInputEvent(new PtidesEvent(sensorPort,channelIndex,director.getModelTime(),1,-1,t,farReceivers[channelIndex][i]),PtidesDirector._getDoubleParameterValue(sensorPort,"String_Node_Str"));
              }
            }
          }
 else {
            ((MirrorPort)port).getAssociatedPort().sendInside(channelIndex,t);
          }
          result=true;
        }
      }
    }
 catch (    NoTokenException ex) {
      throw new InternalErrorException(this,ex,null);
    }
  }
  return result;
}