Program: 75974
Project: 75974
Buggy source:
/** 
 * Invoke a specified number of iterations of this actor. Each iteration causes the filter to consume an input token and compute a single output token. An invocation of this method therefore applies the filter to <i>count</i> successive input tokens. <p> This method should be called instead of the usual prefire(), fire(), postfire() methods when this actor is used in a domain that supports vectorized actors.  This leads to more efficient execution.
 * @param count The number of iterations to perform.
 * @return COMPLETED if the actor was successfully iterated thespecified number of times. Otherwise, return NOT_READY, and do not consume any input tokens.
 * @exception IllegalActionException If iterating cannot beperformed.
 */
public int iterate(int count) throws IllegalActionException {
  if (count > _resultArray.length) {
    _resultArray=new DoubleToken[count];
  }
  double xCur;
  double yCur;
  double wn;
  if (input.hasToken(0,count)) {
    Token[] inArray=input.get(0,count);
    for (int i=0; i < count; i++) {
      xCur=((DoubleToken)(inArray[i])).doubleValue();
      wn=xCur;
      for (int j=1; j < _denominator.length; j++) {
        wn+=_denominator[j] * _stateVector[(_curTap + j) % _stateVector.length];
      }
      _stateVector[_curTap]=wn;
      yCur=0;
      for (int k=0; k < _numerator.length; k++) {
        yCur+=_numerator[k] * _stateVector[(_curTap + k) % _stateVector.length];
      }
      _resultArray[i]=new DoubleToken(yCur);
      if (--_curTap < 0)       _curTap=_stateVector.length - 1;
    }
    output.send(0,_resultArray,count);
    return COMPLETED;
  }
 else {
    return NOT_READY;
  }
}

Fixed version (ground truth):
/** 
 * Invoke a specified number of iterations of this actor. Each iteration causes the filter to consume an input token and compute a single output token. An invocation of this method therefore applies the filter to <i>count</i> successive input tokens. <p> This method should be called instead of the usual prefire(), fire(), postfire() methods when this actor is used in a domain that supports vectorized actors.  This leads to more efficient execution.
 * @param count The number of iterations to perform.
 * @return COMPLETED if the actor was successfully iterated thespecified number of times. Otherwise, return NOT_READY, and do not consume any input tokens.
 * @exception IllegalActionException If iterating cannot beperformed.
 */
public int iterate(int count) throws IllegalActionException {
  if (count > _resultArray.length) {
    _resultArray=new DoubleToken[count];
  }
  double xCurrent;
  double yCurrent;
  double window;
  if (input.hasToken(0,count)) {
    Token[] inArray=input.get(0,count);
    for (int i=0; i < count; i++) {
      xCurrent=((DoubleToken)(inArray[i])).doubleValue();
      window=xCurrent;
      for (int j=1; j < _denominator.length; j++) {
        window+=_denominator[j] * _stateVector[(_currentTap + j) % _stateVector.length];
      }
      _stateVector[_currentTap]=window;
      yCurrent=0;
      for (int k=0; k < _numerator.length; k++) {
        yCurrent+=_numerator[k] * _stateVector[(_currentTap + k) % _stateVector.length];
      }
      _resultArray[i]=new DoubleToken(yCurrent);
      if (--_currentTap < 0)       _currentTap=_stateVector.length - 1;
    }
    output.send(0,_resultArray,count);
    return COMPLETED;
  }
 else {
    return NOT_READY;
  }
}