Program: 75163
Project: 75163
Buggy source:
/** 
 * Preinitialize() methods of all actors deeply contained by the container of this director. The HDF/SDF preinitialize method will compute the initial schedule. Propagate the consumption and production rates of the current state out to the corresponding ports of the container of this director.
 * @exception IllegalActionException If the preinitialize()method of one of the associated actors throws it, or there is no controller.
 */
public void preinitialize() throws IllegalActionException {
  _sendRequest=true;
  _reinitialize=false;
  _getEnclosingDomainActor();
  FSMActor controller=getController();
  State initialState=controller.getInitialState();
  _setCurrentState(initialState);
  _nextIntransientState=transientStateTransition();
  super.preinitialize();
  _setCurrentState(_nextIntransientState);
  TypedActor[] currentRefinements=_nextIntransientState.getRefinement();
  TypedCompositeActor curRefinement=(TypedCompositeActor)(currentRefinements[0]);
  Director refinementDir=curRefinement.getDirector();
  if (!(refinementDir instanceof HDFFSMDirector) && !(refinementDir instanceof SDFDirector)) {
    throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str");
  }
  _updateInputTokenConsumptionRates(curRefinement);
  _updateOutputTokenProductionRates(curRefinement);
  ConstVariableModelAnalysis analysis=ConstVariableModelAnalysis.getAnalysis(this);
  CompositeActor model=(CompositeActor)getContainer();
  for (Iterator ports=model.portList().iterator(); ports.hasNext(); ) {
    IOPort port=(IOPort)ports.next();
    if (!(port instanceof ParameterPort)) {
      if (port.isInput()) {
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
      }
      if (port.isOutput()) {
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Preinitialize() methods of all actors deeply contained by the container of this director. The HDF/SDF preinitialize method will compute the initial schedule. Propagate the consumption and production rates of the current state out to the corresponding ports of the container of this director.
 * @exception IllegalActionException If the preinitialize()method of one of the associated actors throws it, or there is no controller.
 */
public void preinitialize() throws IllegalActionException {
  _sendRequest=true;
  _reinitialize=false;
  _getEnclosingDomainActor();
  FSMActor controller=getController();
  State initialState=controller.getInitialState();
  _setCurrentState(initialState);
  _nextIntransientState=transientStateTransition();
  super.preinitialize();
  _setCurrentState(_nextIntransientState);
  TypedActor[] currentRefinements=_nextIntransientState.getRefinement();
  if (currentRefinements.length != 1) {
    throw new IllegalActionException(this,"String_Node_Str" + controller.currentState().getName());
  }
  TypedCompositeActor curRefinement=(TypedCompositeActor)(currentRefinements[0]);
  Director refinementDir=curRefinement.getDirector();
  _updateInputTokenConsumptionRates(curRefinement);
  _updateOutputTokenProductionRates(curRefinement);
  ConstVariableModelAnalysis analysis=ConstVariableModelAnalysis.getAnalysis(this);
  CompositeActor model=(CompositeActor)getContainer();
  for (Iterator ports=model.portList().iterator(); ports.hasNext(); ) {
    IOPort port=(IOPort)ports.next();
    if (!(port instanceof ParameterPort)) {
      if (port.isInput()) {
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
      }
      if (port.isOutput()) {
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
        _declareReconfigurationDependencyForRefinementRateVariables(analysis,port,"String_Node_Str");
      }
    }
  }
}