Program: 75902
Project: 75902
Buggy source:
/** 
 * Resolves the Token to be stored in the node. When this method is called by resolveTree, the tokens in each of the children have been resolved. This method is concerned with evaluating both the value and type of the ptToken to be stored.
 * @return The ptolemy.data.Token to be stored in this node.
 * @exception IllegalArgumentException If an error occurstrying to evaluate the PtToken type and/or value to be stored.
 */
protected ptolemy.data.Token _resolveNode() throws IllegalActionException {
  int num=jjtGetNumChildren();
  if (num == 1)   return _childTokens[0];
  Class[] argTypes=new Class[num - 1];
  Object[] argValues=new Object[num - 1];
  try {
    for (int i=1; i < num; i++) {
      argValues[i - 1]=(ptolemy.data.Token)_childTokens[i];
      argTypes[i - 1]=Class.forName("String_Node_Str");
    }
    Class destTokenClass=_childTokens[0].getClass();
    Method m=destTokenClass.getMethod(_methodName,argTypes);
    Object result=m.invoke(_childTokens[0],argValues);
    if (result instanceof ptolemy.data.Token) {
      return (ptolemy.data.Token)result;
    }
 else {
      throw new IllegalActionException("String_Node_Str");
    }
  }
 catch (  java.lang.NoSuchMethodException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.IllegalAccessException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.reflect.InvocationTargetException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.ClassNotFoundException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
}

Fixed version (ground truth):
/** 
 * Resolves the Token to be stored in the node. When this method is called by resolveTree, the tokens in each of the children have been resolved. This method is concerned with evaluating both the value and type of the ptToken to be stored.
 * @return The ptolemy.data.Token to be stored in this node.
 * @exception IllegalArgumentException If an error occurstrying to evaluate the PtToken type and/or value to be stored.
 */
protected ptolemy.data.Token _resolveNode() throws IllegalActionException {
  int num=jjtGetNumChildren();
  Class[] argTypes=new Class[num - 1];
  Object[] argValues=new Object[num - 1];
  try {
    for (int i=1; i < num; i++) {
      argValues[i - 1]=(ptolemy.data.Token)_childTokens[i];
      argTypes[i - 1]=Class.forName("String_Node_Str");
    }
    Class destTokenClass=_childTokens[0].getClass();
    Method m=destTokenClass.getMethod(_methodName,argTypes);
    Object result=m.invoke(_childTokens[0],argValues);
    if (result instanceof ptolemy.data.Token) {
      return (ptolemy.data.Token)result;
    }
 else {
      throw new IllegalActionException("String_Node_Str");
    }
  }
 catch (  java.lang.NoSuchMethodException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.IllegalAccessException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.reflect.InvocationTargetException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
catch (  java.lang.ClassNotFoundException ex) {
    throw new IllegalActionException(_generateExceptionMessage(ex));
  }
}