Program: 72882
Project: 72882
Buggy source:
/** 
 * Transfer data from the inside receivers of an output port of the container to the ports it is connected to on the outside. Create a RecordToken if the associated port is a NetworkTransmitterPort.
 * @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.
 * @see IOPort#transferOutputs
 */
public boolean transferOutputs(IOPort port) throws IllegalActionException {
  boolean result=false;
  for (int i=0; i < port.getWidthInside(); i++) {
    try {
      while (port.isKnownInside(i) && port.hasTokenInside(i)) {
        Token t=port.getInside(i);
        if (_isAssociatedWithNetworkTransmitter(port)) {
          MetroIIPtidesDirector director=(MetroIIPtidesDirector)((MetroCompositeActor)((MirrorPort)port).getAssociatedPort().getContainer()).getDirector();
          Object[] timestamps=((MetroIIPtidesPort)((MirrorPort)port).getAssociatedPort()).getTimeStampForToken(t);
          Time timestamp=(Time)timestamps[0];
          Time sourceTimestamp=(Time)timestamps[1];
          Token[] values=new Token[]{new DoubleToken(timestamp.getDoubleValue()),new IntToken(director.getMicrostep()),t,new DoubleToken(sourceTimestamp.getDoubleValue())};
          RecordToken record=new RecordToken(PtidesNetworkType.LABELS,values);
          try {
            ((MirrorPort)port).send(i,record);
          }
 catch (          IllegalActionException ex) {
            throw new IllegalActionException(this,ex.getMessage());
          }
        }
 else {
          ((MirrorPort)port).send(i,t);
        }
      }
      result=true;
    }
 catch (    NoTokenException ex) {
      throw new InternalErrorException(this,ex,null);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Transfer data from the inside receivers of an output port of the container to the ports it is connected to on the outside. Create a RecordToken if the associated port is a NetworkTransmitterPort.
 * @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.
 * @see IOPort#transferOutputs
 */
public boolean transferOutputs(IOPort port) throws IllegalActionException {
  boolean result=false;
  for (int i=0; i < port.getWidthInside(); i++) {
    try {
      while (port.isKnownInside(i) && port.hasTokenInside(i)) {
        Token t=port.getInside(i);
        if (_isAssociatedWithNetworkTransmitter(port)) {
          MetroIIPtidesDirector director=(MetroIIPtidesDirector)((MetroIICompositeActor)((MirrorPort)port).getAssociatedPort().getContainer()).getDirector();
          Object[] timestamps=((MetroIIPtidesPort)((MirrorPort)port).getAssociatedPort()).getTimeStampForToken(t);
          Time timestamp=(Time)timestamps[0];
          Time sourceTimestamp=(Time)timestamps[1];
          Token[] values=new Token[]{new DoubleToken(timestamp.getDoubleValue()),new IntToken(director.getMicrostep()),t,new DoubleToken(sourceTimestamp.getDoubleValue())};
          RecordToken record=new RecordToken(PtidesNetworkType.LABELS,values);
          try {
            ((MirrorPort)port).send(i,record);
          }
 catch (          IllegalActionException ex) {
            throw new IllegalActionException(this,ex.getMessage());
          }
        }
 else {
          ((MirrorPort)port).send(i,t);
        }
      }
      result=true;
    }
 catch (    NoTokenException ex) {
      throw new InternalErrorException(this,ex,null);
    }
  }
  return result;
}