Program: 72655
Project: 72655
Buggy source:
/** 
 * Construct a DateToken that represents the time specified as a string. The string is first parsed by the default java.text.DateFormat parser. Because we have up to nanosecond precision, we might have to pre-process the string and take out the digits representing nanoseconds and microseconds. Then any leading and trailing double quotes are removed and a java.text.SimpleDateFormat with a parser with the value of  {@link #_SIMPLE_DATE_FORMAT} is used.
 * @param value The date specified in a format acceptableto java.text.DateFormat.
 * @exception IllegalActionException If the date is notparseable by java.text.DateFormat.
 */
public DateToken(String value) throws IllegalActionException {
  _precision=PRECISION_MILLISECOND;
  if (value == null) {
    _isNil=false;
    _value=0l;
    return;
  }
  if (value.equals(_NIL)) {
    _isNil=true;
    _value=0l;
    return;
  }
synchronized (_simpleDateFormat) {
    try {
      if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str")) {
        value=value.substring(1,value.length() - 1);
      }
      Calendar calendar=Calendar.getInstance();
      if (value.length() == _SIMPLE_DATE_FORMAT.length()) {
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _precision=PRECISION_MILLISECOND;
      }
 else       if (value.length() == _SIMPLE_DATE_FORMAT.length() + 3) {
        String micros=value.substring(value.indexOf("String_Node_Str") + 4,value.indexOf("String_Node_Str") + 7);
        value=value.substring(0,value.indexOf("String_Node_Str") + 4) + value.substring(value.indexOf("String_Node_Str") + 7);
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _value=_value * 1000 + Integer.parseInt(micros);
        _precision=PRECISION_MICROSECOND;
      }
 else       if (value.length() == _SIMPLE_DATE_FORMAT.length() + 6) {
        String micros=value.substring(value.indexOf("String_Node_Str") + 4,value.indexOf("String_Node_Str") + 7);
        String nanos=value.substring(value.indexOf("String_Node_Str") + 7,value.indexOf("String_Node_Str") + 10);
        value=value.substring(0,value.indexOf("String_Node_Str") + 4) + value.substring(value.indexOf("String_Node_Str") + 10);
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _value=(_value * 1000 + Integer.parseInt(micros)) * 1000 + Integer.parseInt(nanos);
        _precision=PRECISION_NANOSECOND;
      }
      _calendar=calendar;
      int offset=(calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET)) / (60 * 60 * 1000);
      _timeZone=TimeZone.getTimeZone("String_Node_Str" + offset);
      calendar.setTimeZone(_timeZone);
    }
 catch (    ParseException ex) {
      throw new IllegalActionException(null,ex,"String_Node_Str" + value + "String_Node_Str"+ "String_Node_Str"+ _simpleDateFormat.toPattern()+ "String_Node_Str"+ ex.getMessage());
    }
  }
  _isNil=false;
}

Fixed version (ground truth):
/** 
 * Construct a DateToken that represents the time specified as a string. The string is first parsed by the default java.text.DateFormat parser. Because we have up to nanosecond precision, we might have to pre-process the string and take out the digits representing nanoseconds and microseconds. Then any leading and trailing double quotes are removed and a java.text.SimpleDateFormat with a parser with the value of  {@link #_SIMPLE_DATE_FORMAT} is used.
 * @param value The date specified in a format acceptableto java.text.DateFormat.
 * @exception IllegalActionException If the date is notparseable by java.text.DateFormat.
 */
public DateToken(String value) throws IllegalActionException {
  _precision=PRECISION_MILLISECOND;
  if (value == null) {
    _isNil=false;
    _value=0l;
    return;
  }
  if (value.equals(_NIL)) {
    _isNil=true;
    _value=0l;
    return;
  }
  String dateString=value;
synchronized (_simpleDateFormat) {
    try {
      if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str")) {
        value=value.substring(1,value.length() - 1);
      }
      Calendar calendar=Calendar.getInstance();
      System.out.println(_simpleDateFormat.format(calendar.getTime()));
      System.out.println(value.length() + "String_Node_Str" + _SIMPLE_DATE_FORMAT.length());
      if (value.length() == _SIMPLE_DATE_FORMAT.length()) {
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _precision=PRECISION_MILLISECOND;
      }
 else       if (value.length() == _SIMPLE_DATE_FORMAT.length() + 3) {
        String micros=value.substring(value.indexOf("String_Node_Str") + 4,value.indexOf("String_Node_Str") + 7);
        value=value.substring(0,value.indexOf("String_Node_Str") + 4) + value.substring(value.indexOf("String_Node_Str") + 7);
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _value=_value * 1000 + Integer.parseInt(micros);
        _precision=PRECISION_MICROSECOND;
      }
 else       if (value.length() == _SIMPLE_DATE_FORMAT.length() + 6) {
        String micros=value.substring(value.indexOf("String_Node_Str") + 4,value.indexOf("String_Node_Str") + 7);
        String nanos=value.substring(value.indexOf("String_Node_Str") + 7,value.indexOf("String_Node_Str") + 10);
        value=value.substring(0,value.indexOf("String_Node_Str") + 4) + value.substring(value.indexOf("String_Node_Str") + 10);
        calendar.setTime(_simpleDateFormat.parse(value));
        _value=calendar.getTimeInMillis();
        _value=(_value * 1000 + Integer.parseInt(micros)) * 1000 + Integer.parseInt(nanos);
        _precision=PRECISION_NANOSECOND;
      }
 else {
        throw new IllegalActionException(null,"String_Node_Str" + "String_Node_Str" + dateString + "String_Node_Str"+ _SIMPLE_DATE_FORMAT);
      }
      System.out.println(_simpleDateFormat.format(calendar.getTime()));
      int offset=(calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET)) / (60 * 60 * 1000);
      _timeZone=TimeZone.getTimeZone("String_Node_Str" + offset);
      calendar.setTimeZone(_timeZone);
      _calendar=calendar;
    }
 catch (    ParseException ex) {
      throw new IllegalActionException(null,ex,"String_Node_Str" + value + "String_Node_Str"+ "String_Node_Str"+ _simpleDateFormat.toPattern()+ "String_Node_Str"+ ex.getMessage());
    }
  }
  _isNil=false;
}