Program: 76266
Project: 76266
Buggy source:
/** 
 * Initialize the guard variables, which are used in the state transition expressions. Then Create receivers and then invoke the preinitialize() methods of all its deeply contained actors. This method is invoked once per execution, before any iteration, and before the initialize() method. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If the preinitialize() method ofone of the associated actors throws it.
 */
public void preinitialize() throws IllegalActionException {
  CompositeActor container=((CompositeActor)getContainer());
  if (container != null) {
    if (_portNameToArrayFIFOQueue == null) {
      _portNameToArrayFIFOQueue=new HashMap();
    }
    Enumeration containPorts=container.getPorts();
    while (containPorts.hasMoreElements()) {
      TypedIOPort aPort=(TypedIOPort)containPorts.nextElement();
      if (_debugging)       _debug("String_Node_Str" + aPort.getName());
      ArrayFIFOQueue guardTokenArray=new ArrayFIFOQueue(getGuardTokenHistory());
      while (!guardTokenArray.isFull()) {
        Token tempToken=new IntToken(0);
        guardTokenArray.put(tempToken);
        if (_debugging)         _debug("String_Node_Str" + "String_Node_Str");
      }
      if (!_portNameToArrayFIFOQueue.containsKey(aPort.getFullName())) {
        _portNameToArrayFIFOQueue.put(aPort.getFullName(),guardTokenArray);
      }
      _createGuardVariables(aPort);
    }
    Enumeration allactors=container.deepGetEntities();
    while (allactors.hasMoreElements()) {
      Actor actor=(Actor)allactors.nextElement();
      if (_debugging)       _debug("String_Node_Str",((NamedObj)actor).getFullName());
      actor.preinitialize();
    }
  }
  if (_debugging)   _debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Initialize the guard variables, which are used in the state transition expressions. Then Create receivers and then invoke the preinitialize() methods of all its deeply contained actors. This method is invoked once per execution, before any iteration, and before the initialize() method. This method is <i>not</i> synchronized on the workspace, so the caller should be.
 * @exception IllegalActionException If the preinitialize() method ofone of the associated actors throws it.
 */
public void preinitialize() throws IllegalActionException {
  CompositeActor container=((CompositeActor)getContainer());
  if (container != null) {
    if (_portNameToArrayFIFOQueue == null) {
      _portNameToArrayFIFOQueue=new HashMap();
    }
    Enumeration containPorts=container.getPorts();
    while (containPorts.hasMoreElements()) {
      TypedIOPort aPort=(TypedIOPort)containPorts.nextElement();
      ArrayFIFOQueue guardTokenArray=new ArrayFIFOQueue(getGuardTokenHistory());
      while (!guardTokenArray.isFull()) {
        Token tempToken=new IntToken(0);
        guardTokenArray.put(tempToken);
      }
      if (!_portNameToArrayFIFOQueue.containsKey(aPort.getFullName())) {
        _portNameToArrayFIFOQueue.put(aPort.getFullName(),guardTokenArray);
      }
      _createGuardVariables(aPort);
    }
    Enumeration allactors=container.deepGetEntities();
    while (allactors.hasMoreElements()) {
      Actor actor=(Actor)allactors.nextElement();
      actor.preinitialize();
    }
  }
}