Program: 72625
Project: 72625
Buggy source:
/** 
 * Construct a date token with all tokens present. If a token for the long value is present, use this token and time zone as well as precision. Otherwise use tokens on other inputs to create ports.
 * @exception IllegalActionException If there is no director.
 */
@Override public void fire() throws IllegalActionException {
  super.fire();
  DateToken dateToken=null;
  int datePrecision=DateToken.PRECISION_MILLISECOND;
  String precisionValue=((StringToken)precision.getToken()).stringValue();
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_SECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_MILLISECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_MICROSECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_NANOSECOND;
  }
 else {
    datePrecision=DateToken.PRECISION_MILLISECOND;
  }
  String timeZoneValue=_getStringValue(timeZone);
  long timeAsLongValue=_getLongValue(timeInMillis);
  int microsecondValue=_getIntValue(microsecond);
  int nanosecondValue=_getIntValue(nanosecond);
  if (!((BooleanToken)useTimeInMillis.getToken()).booleanValue()) {
    int yearValue=_getIntValue(year);
    int monthValue=_getIntValue(month);
    int dayValue=_getIntValue(day);
    int hourValue=_getIntValue(hour);
    int minuteValue=_getIntValue(minute);
    int secondValue=_getIntValue(second);
    int millisecondValue=_getIntValue(millisecond);
    Calendar c=Calendar.getInstance();
    c.set(Calendar.YEAR,yearValue);
    c.set(Calendar.MONTH,monthValue);
    c.set(Calendar.DAY_OF_MONTH,dayValue);
    c.set(Calendar.HOUR,hourValue);
    c.set(Calendar.MINUTE,minuteValue);
    c.set(Calendar.SECOND,secondValue);
    c.set(Calendar.MILLISECOND,millisecondValue);
    timeAsLongValue=c.getTimeInMillis();
  }
  dateToken=new DateToken(timeAsLongValue,datePrecision,TimeZone.getTimeZone("String_Node_Str" + timeZoneValue));
  dateToken.addMicroseconds(microsecondValue);
  dateToken.addNanoseconds(nanosecondValue);
  output.send(0,dateToken);
}

Fixed version (ground truth):
/** 
 * Construct a date token with all tokens present. If a token for the long value is present, use this token and time zone as well as precision. Otherwise use tokens on other inputs to create ports.
 * @exception IllegalActionException If there is no director.
 */
@Override public void fire() throws IllegalActionException {
  super.fire();
  DateToken dateToken=null;
  int datePrecision=DateToken.PRECISION_MILLISECOND;
  String precisionValue=((StringToken)precision.getToken()).stringValue();
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_SECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_MILLISECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_MICROSECOND;
  }
  if (precisionValue.equals("String_Node_Str")) {
    datePrecision=DateToken.PRECISION_NANOSECOND;
  }
 else {
    datePrecision=DateToken.PRECISION_MILLISECOND;
  }
  String timeZoneValue=_getStringValue(timeZone);
  long timeAsLongValue=_getLongValue(timeInMillis);
  int microsecondValue=_getIntValue(microsecond);
  int nanosecondValue=_getIntValue(nanosecond);
  if (!((BooleanToken)useTimeInMillis.getToken()).booleanValue()) {
    int yearValue=_getIntValue(year);
    int monthValue=_getIntValue(month);
    int dayValue=_getIntValue(day);
    int hourValue=_getIntValue(hour);
    int minuteValue=_getIntValue(minute);
    int secondValue=_getIntValue(second);
    int millisecondValue=_getIntValue(millisecond);
    Calendar c=Calendar.getInstance();
    c.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
    c.set(Calendar.YEAR,yearValue);
    c.set(Calendar.MONTH,monthValue);
    c.set(Calendar.DAY_OF_MONTH,dayValue);
    c.set(Calendar.HOUR_OF_DAY,hourValue);
    c.set(Calendar.MINUTE,minuteValue);
    c.set(Calendar.SECOND,secondValue);
    c.set(Calendar.MILLISECOND,millisecondValue);
    timeAsLongValue=c.getTimeInMillis();
    if (datePrecision == DateToken.PRECISION_SECOND) {
      timeAsLongValue=timeAsLongValue / 1000;
    }
 else     if (datePrecision == DateToken.PRECISION_MICROSECOND) {
      timeAsLongValue=timeAsLongValue * 1000;
    }
 else     if (datePrecision == DateToken.PRECISION_NANOSECOND) {
      timeAsLongValue=timeAsLongValue * 1000 * 1000;
    }
  }
  dateToken=new DateToken(timeAsLongValue,datePrecision,TimeZone.getTimeZone("String_Node_Str" + timeZoneValue));
  dateToken.addMicroseconds(microsecondValue);
  dateToken.addNanoseconds(nanosecondValue);
  output.send(0,dateToken);
}