Program: 74717
Project: 74717
Buggy source:
/** 
 * Consume at most one token from each input and update the counter appropriately. Send the current value of the counter to the output.  If there are no input tokens available, no output will be produced.  If a token is consumed from only the <i>increment</i> port the output value will be one more than the previous output value.  If a token consumed from only the <i>decrement</i> port the output value will be one less than the previous output value.  If a token is consumed from both input ports, then the output value will be the same as the previous output value.  If the fire method is invoked multiple times in one iteration, then only the input read on the last invocation in the iteration will affect future outputs of the counter.
 * @exception IllegalActionException If there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  _latestCount=_count;
  _consumed=false;
  for (int i=0; i < increment.getWidth(); i++) {
    if (increment.hasToken(i)) {
      increment.get(i);
      _latestCount=_latestCount + 1;
      _consumed=true;
    }
  }
  for (int i=0; i < decrement.getWidth(); i++) {
    if (decrement.hasToken(i)) {
      decrement.get(i);
      _latestCount--;
      _consumed=true;
    }
  }
  if (_consumed) {
    Precision precision=new Precision(((Parameter)getAttribute("String_Node_Str")).getExpression());
    Overflow overflow=Overflow.getName(((Parameter)getAttribute("String_Node_Str")).getExpression().toLowerCase());
    Rounding rounding=Rounding.getName(((Parameter)getAttribute("String_Node_Str")).getExpression().toLowerCase());
    FixPoint result=new FixPoint(_latestCount,new FixPointQuantization(precision,overflow,rounding));
    System.out.println(_latestCount);
    System.out.println(result);
    Token outputToken=new FixToken(result);
    System.out.println(outputToken);
    output.send(0,outputToken);
  }
}

Fixed version (ground truth):
/** 
 * Consume at most one token from each input and update the counter appropriately. Send the current value of the counter to the output.  If there are no input tokens available, no output will be produced.  If a token is consumed from only the <i>increment</i> port the output value will be one more than the previous output value.  If a token consumed from only the <i>decrement</i> port the output value will be one less than the previous output value.  If a token is consumed from both input ports, then the output value will be the same as the previous output value.  If the fire method is invoked multiple times in one iteration, then only the input read on the last invocation in the iteration will affect future outputs of the counter.
 * @exception IllegalActionException If there is no director.
 */
public void fire() throws IllegalActionException {
  super.fire();
  _latestCount=_count;
  _consumed=false;
  for (int i=0; i < increment.getWidth(); i++) {
    if (increment.hasToken(i)) {
      increment.get(i);
      _latestCount=_latestCount + 1;
      _consumed=true;
    }
  }
  for (int i=0; i < decrement.getWidth(); i++) {
    if (decrement.hasToken(i)) {
      decrement.get(i);
      _latestCount--;
      _consumed=true;
    }
  }
  if (_consumed) {
    Precision precision=new Precision(((Parameter)getAttribute("String_Node_Str")).getExpression());
    Overflow overflow=Overflow.getName(((Parameter)getAttribute("String_Node_Str")).getExpression().toLowerCase());
    Rounding rounding=Rounding.getName(((Parameter)getAttribute("String_Node_Str")).getExpression().toLowerCase());
    FixPoint result=new FixPoint(_latestCount,new FixPointQuantization(precision,overflow,rounding));
    System.out.println(_latestCount);
    System.out.println(result);
    Token outputToken=new FixToken(result);
    System.out.println(outputToken);
    sendOutput(output,0,outputToken);
  }
}