int era = isSet[ERA] ? fields[ERA] : AD; int year = isSet[YEAR] ? fields[YEAR] : 1970; if (isLenient() && isSet[MONTH])
int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH];  int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int[] dayCount = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int hour = 0;  if (! isLenient()) nonLeniencyCheck();  if (! isSet[MONTH]) {  if (isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR]) { int first = getFirstDayOfMonth(year, 0); int offs; if ((8 - first) >= getMinimalDaysInFirstWeek())  offs = 1; else offs = 1 + (8 - first);  month = 0; day = offs + 7 * (fields[WEEK_OF_YEAR] - 1); day += fields[DAY_OF_WEEK] - first; } else {  month = 0; day = fields[DAY_OF_YEAR]; } } else
  protected synchronized void computeTime()  {		int era = isSet[ERA] ? fields[ERA] : AD;		int year = isSet[YEAR] ? fields[YEAR] : 1970;    if (isLenient() && isSet[MONTH])      {	int month = fields[MONTH];	year += month / 12;	month %= 12;	if (month < 0)	  {	    month += 12;	    year--;	  }	fields[MONTH] = month;	isSet[YEAR] = true;	fields[YEAR] = year;      }		if (era == BC)			year = 1 - year;		int[] daysOfYear = getDayOfYear(year);		int hour = 0;		if (isSet[HOUR_OF_DAY])			hour = fields[HOUR_OF_DAY];    else if (isSet[HOUR])      {			hour = fields[HOUR];			if (isSet[AM_PM] && fields[AM_PM] == PM)	  if (hour != 12) /* not Noon */				hour += 12;	/* Fix the problem of the status of 12:00 AM (midnight). */	if (isSet[AM_PM] && fields[AM_PM] == AM && hour == 12)	  hour = 0;		}		int minute = isSet[MINUTE] ? fields[MINUTE] : 0;		int second = isSet[SECOND] ? fields[SECOND] : 0;		int millis = isSet[MILLISECOND] ? fields[MILLISECOND] : 0;		int millisInDay;    if (isLenient())      {			// prevent overflow	long allMillis = (((hour * 60L) + minute) * 60L + second) * 1000L	  + millis;			daysOfYear[1] += allMillis / (24 * 60 * 60 * 1000L);			millisInDay = (int) (allMillis % (24 * 60 * 60 * 1000L));      }    else      {	if (hour < 0 || hour >= 24 || minute < 0 || minute > 59 || second < 0	    || second > 59 || millis < 0 || millis >= 1000)				throw new IllegalArgumentException();			millisInDay = (((hour * 60) + minute) * 60 + second) * 1000 + millis;		}		time = getLinearTime(year, daysOfYear[0], millisInDay);		// Add the relative days after calculating the linear time, to		// get right behaviour when jumping over the gregorianCutover.		time += daysOfYear[1] * (24 * 60 * 60 * 1000L);		TimeZone zone = getTimeZone();    int rawOffset = isSet[ZONE_OFFSET] ? fields[ZONE_OFFSET]                                       : zone.getRawOffset();    int day = (int) (time / (24 * 60 * 60 * 1000L));    millisInDay = (int) (time % (24 * 60 * 60 * 1000L));    if (millisInDay < 0)      {	millisInDay += (24 * 60 * 60 * 1000);	day--;      }    int[] f = new int[FIELD_COUNT];    calculateDay(f, day, time - rawOffset >= gregorianCutover);    year = f[YEAR];    int month = f[MONTH];    day = f[DAY_OF_MONTH];    int weekday = f[DAY_OF_WEEK];    int dstOffset = isSet[DST_OFFSET] ? fields[DST_OFFSET]                                      : (zone.getOffset((year < 0) ? BC : AD,                                                        (year < 0) ? 1 - year                                                                   : year,                                                        month, day, weekday,                                                        millisInDay)			      - zone.getRawOffset());		time -= rawOffset + dstOffset;		isTimeSet = true;	}