Program: 72761
Project: 72761
Buggy source:
public void setNextParticle() throws NameDuplicationException, IllegalActionException {
  Token _result;
  Token processNoiseSample;
  LinkedList newParticle=new LinkedList();
  for (int i=0; i < _stateSpaceSize; i++) {
    Parameter p=(Parameter)(_updateEquations.get(_stateVariables[i])).getAttribute(_stateVariables[i]);
    if (p != null) {
      p.setExpression(_particleValue.get(i).toString());
    }
 else {
      p=new Parameter(_updateEquations.get(_stateVariables[i]),_stateVariables[i]);
      p.setExpression(_particleValue.get(i).toString());
    }
    _tokenMap.put(_stateVariables[i],new DoubleToken((double)_particleValue.get(i)));
    Iterator ci=_controlInputs.keySet().iterator();
    while (ci.hasNext()) {
      String controlVarName=(String)ci.next();
      Parameter c=(Parameter)(_updateEquations.get(_stateVariables[i])).getAttribute(controlVarName);
      if (c != null) {
        c.setExpression(_controlInputs.get(controlVarName).toString());
      }
 else {
        c=new Parameter(_updateEquations.get(_stateVariables[i]),controlVarName);
        c.setExpression(_controlInputs.get(controlVarName).toString());
      }
      _tokenMap.put(controlVarName,new DoubleToken(_controlInputs.get(controlVarName)));
    }
  }
  try {
    _parseTree=_updateTrees.get("String_Node_Str");
    processNoiseSample=_parseTreeEvaluator.evaluateParseTree(_parseTree,_scope);
  }
 catch (  Throwable throwable) {
    throw new IllegalActionException("String_Node_Str");
  }
  if (processNoiseSample == null) {
    throw new IllegalActionException("String_Node_Str" + processNoise.getExpression());
  }
  for (int i=0; i < _stateSpaceSize; i++) {
    try {
      _parseTree=_updateTrees.get(_stateVariables[i]);
      _result=_parseTreeEvaluator.evaluateParseTree(_parseTree,_scope);
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException("String_Node_Str");
    }
    if (_result == null) {
      throw new IllegalActionException("String_Node_Str" + _updateEquations.get(_stateVariables[i]).expression.getExpression());
    }
    double _meanEstimate=((DoubleToken)_result).doubleValue();
    double processNoiseForElement=((DoubleToken)((ArrayToken)processNoiseSample).getElement(i)).doubleValue();
    newParticle.add(_meanEstimate + processNoiseForElement);
  }
  this.setValue(newParticle);
  this.assignWeight();
}

Fixed version (ground truth):
public void setNextParticle() throws NameDuplicationException, IllegalActionException {
  Token _result;
  Token processNoiseSample;
  LinkedList newParticle=new LinkedList();
  for (int i=0; i < _stateSpaceSize; i++) {
    Parameter p=(Parameter)(_updateEquations.get(_stateVariables[i])).getAttribute(_stateVariables[i]);
    if (p != null) {
      p.setExpression(_particleValue.get(i).toString());
    }
 else {
      p=new Parameter(_updateEquations.get(_stateVariables[i]),_stateVariables[i]);
      p.setExpression(_particleValue.get(i).toString());
    }
    _tokenMap.put(_stateVariables[i],new DoubleToken((double)_particleValue.get(i)));
    Iterator ci=_controlInputs.keySet().iterator();
    while (ci.hasNext()) {
      String controlVarName=(String)ci.next();
      Parameter c=(Parameter)(_updateEquations.get(_stateVariables[i])).getAttribute(controlVarName);
      if (c != null) {
        c.setExpression(_controlInputs.get(controlVarName).toString());
      }
 else {
        c=new Parameter(_updateEquations.get(_stateVariables[i]),controlVarName);
        c.setExpression(_controlInputs.get(controlVarName).toString());
      }
      _tokenMap.put(controlVarName,new DoubleToken(_controlInputs.get(controlVarName)));
    }
  }
  try {
    _parseTree=_updateTrees.get("String_Node_Str");
    processNoiseSample=_parseTreeEvaluator.evaluateParseTree(_parseTree,_scope);
  }
 catch (  Throwable throwable) {
    throw new IllegalActionException("String_Node_Str");
  }
  if (processNoiseSample == null) {
    throw new IllegalActionException("String_Node_Str" + processNoise.getExpression());
  }
  for (int i=0; i < _stateSpaceSize; i++) {
    try {
      _parseTree=_updateTrees.get(_stateVariables[i]);
      _result=_parseTreeEvaluator.evaluateParseTree(_parseTree,_scope);
    }
 catch (    Throwable throwable) {
      throw new IllegalActionException("String_Node_Str");
    }
    if (_result == null) {
      throw new IllegalActionException("String_Node_Str" + _updateEquations.get(_stateVariables[i]).expression.getExpression());
    }
    double _meanEstimate=((DoubleToken)_result.add(new DoubleToken(0.0))).doubleValue();
    double processNoiseForElement=((DoubleToken)((ArrayToken)processNoiseSample).getElement(i)).doubleValue();
    newParticle.add(_meanEstimate + processNoiseForElement);
  }
  this.setValue(newParticle);
  this.assignWeight(_measurementEquation,_stateVariables);
}