Program: 72759
Project: 72759
Buggy source:
/** 
 * If the argument is any parameter other than <i>stateVariableNames</i> <i>t</i>, or any parameter matching an input port, then request reinitialization.
 * @param attribute The attribute that changed.
 * @exception IllegalActionException If the numerator and thedenominator matrix is not a row vector.
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  super.attributeChanged(attribute);
  if (attribute instanceof Parameter && attribute != t && attribute != stateVariableNames) {
    TypedIOPort port=(TypedIOPort)getPort(attribute.getName());
    if (port == null || !port.isInput()) {
      _requestInitialization();
    }
  }
 else   if (attribute == stateVariableNames) {
    ArrayToken names=(ArrayToken)stateVariableNames.getToken();
    try {
      for (int i=0; i < names.length(); i++) {
        String stateName=((StringToken)names.getElement(i)).stringValue();
        if (this.getAttribute(stateName) == null || stateName.length() != 0) {
          Parameter y=new Parameter(this,stateName);
          y.setExpression("String_Node_Str");
          y.setVisibility(Settable.EXPERT);
        }
      }
    }
 catch (    NameDuplicationException e) {
      System.err.println("String_Node_Str" + this.getName());
    }
  }
  if (attribute == particleCount) {
    int proposed=((IntToken)(particleCount.getToken())).intValue();
    if (proposed > 0) {
      Nparticles=proposed;
      particles=new Particle[Nparticles];
    }
  }
 else   if (attribute == measurementCovariance) {
    double[][] proposed=((MatrixToken)measurementCovariance.getToken()).doubleMatrix();
    _Sigma=proposed;
  }
 else   if (attribute == bootstrap) {
    doBootstrap=((BooleanToken)bootstrap.getToken()).booleanValue();
  }
 else   if (attribute == seed) {
    long seedValue;
    if (seed != null) {
      seedValue=((LongToken)seed.getToken()).longValue();
      _seed=seedValue;
      _createRandomGenerator();
    }
  }
 else {
    super.attributeChanged(attribute);
  }
  _upToDate=false;
}

Fixed version (ground truth):
/** 
 * If the argument is any parameter other than <i>stateVariableNames</i> <i>t</i>, or any parameter matching an input port, then request reinitialization.
 * @param attribute The attribute that changed.
 * @exception IllegalActionException If the numerator and thedenominator matrix is not a row vector.
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  super.attributeChanged(attribute);
  if (attribute instanceof Parameter && attribute != t && attribute != stateVariableNames) {
    TypedIOPort port=(TypedIOPort)getPort(attribute.getName());
    if (port == null || !port.isInput()) {
      _requestInitialization();
    }
  }
 else   if (attribute == stateVariableNames) {
    ArrayToken names=(ArrayToken)stateVariableNames.getToken();
    try {
      for (int i=0; i < names.length(); i++) {
        String stateName=((StringToken)names.getElement(i)).stringValue();
        if (this.getAttribute(stateName) == null && stateName.length() != 0) {
          Parameter y=new Parameter(this,stateName);
          y.setExpression("String_Node_Str");
          y.setVisibility(Settable.EXPERT);
        }
      }
    }
 catch (    NameDuplicationException e) {
      System.err.println("String_Node_Str" + this.getName());
    }
  }
  if (attribute == particleCount) {
    int proposed=((IntToken)(particleCount.getToken())).intValue();
    if (proposed > 0) {
      Nparticles=proposed;
      particles=new Particle[Nparticles];
    }
  }
 else   if (attribute == measurementCovariance) {
    double[][] proposed=((MatrixToken)measurementCovariance.getToken()).doubleMatrix();
    _Sigma=proposed;
  }
 else   if (attribute == bootstrap) {
    doBootstrap=((BooleanToken)bootstrap.getToken()).booleanValue();
  }
 else {
    super.attributeChanged(attribute);
  }
  _upToDate=false;
}