Buggy code:
public class DateUtils { public static final TimeZone UTC_TIME_ZONE = TimeZone . getTimeZone ( "GMT" ) ; public static final long MILLIS_PER_SECOND = 1000 ; public static final long MILLIS_PER_MINUTE = 60 * ( DateUtils . MILLIS_PER_SECOND ) ; public static final long MILLIS_PER_HOUR = 60 * ( DateUtils . MILLIS_PER_MINUTE ) ; public static final long MILLIS_PER_DAY = 24 * ( DateUtils . MILLIS_PER_HOUR ) ; public static final int SEMI_MONTH = 1001 ; private static final int [ ] [ ] fields = new int [ ] [ ] { new int [ ] { Calendar . MILLISECOND } , new int [ ] { Calendar . SECOND } , new int [ ] { Calendar . MINUTE } , new int [ ] { Calendar . HOUR_OF_DAY , Calendar . HOUR } , new int [ ] { Calendar . DATE , Calendar . DAY_OF_MONTH , Calendar . AM_PM } , new int [ ] { Calendar . MONTH , DateUtils . SEMI_MONTH } , new int [ ] { Calendar . YEAR } , new int [ ] { Calendar . ERA } } ; public static final int RANGE_WEEK_SUNDAY = 1 ; public static final int RANGE_WEEK_MONDAY = 2 ; public static final int RANGE_WEEK_RELATIVE = 3 ; public static final int RANGE_WEEK_CENTER = 4 ; public static final int RANGE_MONTH_SUNDAY = 5 ; public static final int RANGE_MONTH_MONDAY = 6 ; public static final int MODIFY_TRUNCATE = 0 ; public static final int MODIFY_ROUND = 1 ; public static final int MODIFY_CEILING = 2 ; public DateUtils ( ) { } public static boolean isSameDay ( Date date1 , Date date2 ) { } public static boolean isSameDay ( Calendar cal1 , Calendar cal2 ) { } public static boolean isSameInstant ( Date date1 , Date date2 ) { } public static boolean isSameInstant ( Calendar cal1 , Calendar cal2 ) { } public static boolean isSameLocalTime ( Calendar cal1 , Calendar cal2 ) { if ( ( cal1 == null ) || ( cal2 == null ) ) { throw new IllegalArgumentException ( "The<seq2seq4repair_space>date<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } <START_BUG> return ( ( ( ( ( ( ( ( cal1 . get ( Calendar . MILLISECOND ) ) == ( cal2 . get ( Calendar . MILLISECOND ) ) ) && ( ( cal1 . get ( Calendar . SECOND ) ) == ( cal2 . get ( Calendar . SECOND ) ) ) ) && ( ( cal1 . get ( Calendar . MINUTE ) ) == ( cal2 . get ( Calendar . MINUTE ) ) ) ) && ( ( cal1 . get ( Calendar . HOUR ) ) == ( cal2 . get ( Calendar . HOUR ) ) ) ) && ( ( cal1 . get ( Calendar . DAY_OF_YEAR ) ) == ( cal2 . get ( Calendar . DAY_OF_YEAR ) ) ) ) && ( ( cal1 . get ( Calendar . YEAR ) ) == ( cal2 . get ( Calendar . YEAR ) ) ) ) && ( ( cal1 . get ( Calendar . ERA ) ) == ( cal2 . get ( Calendar . ERA ) ) ) ) && ( ( cal1 . getClass ( ) ) == ( cal2 . getClass ( ) ) ) ; <END_BUG> } public static Date parseDate ( String str , String ... parsePatterns ) throws ParseException { } public static Date parseDateStrictly ( String str , String ... parsePatterns ) throws ParseException { } private static Date parseDateWithLeniency ( String str , String [ ] parsePatterns , boolean lenient ) throws ParseException { } public static Date addYears ( Date date , int amount ) { } public static Date addMonths ( Date date , int amount ) { } public static Date addWeeks ( Date date , int amount ) { } public static Date addDays ( Date date , int amount ) { } public static Date addHours ( Date date , int amount ) { } public static Date addMinutes ( Date date , int amount ) { } public static Date addSeconds ( Date date , int amount ) { } public static Date addMilliseconds ( Date date , int amount ) { } private static Date add ( Date date , int calendarField , int amount ) { } public static Date setYears ( Date date , int amount ) { } public static Date setMonths ( Date date , int amount ) { } public static Date setDays ( Date date , int amount ) { } public static Date setHours ( Date date , int amount ) { } public static Date setMinutes ( Date date , int amount ) { } public static Date setSeconds ( Date date , int amount ) { } public static Date setMilliseconds ( Date date , int amount ) { } private static Date set ( Date date , int calendarField , int amount ) { } public static Calendar toCalendar ( Date date ) { } public static Date round ( Date date , int field ) { } public static Calendar round ( Calendar date , int field ) { } public static Date round ( Object date , int field ) { } public static Date truncate ( Date date , int field ) { } public static Calendar truncate ( Calendar date , int field ) { } public static Date truncate ( Object date , int field ) { } public static Date ceiling ( Date date , int field ) { } public static Calendar ceiling ( Calendar date , int field ) { } public static Date ceiling ( Object date , int field ) { } private static void modify ( Calendar val , int field , int modType ) { } public static Iterator < Calendar > iterator ( Date focus , int rangeStyle ) { }

Fix:
return ( ( ( ( ( ( ( ( cal1 . get ( Calendar . MILLISECOND ) ) == ( cal2 . get ( Calendar . MILLISECOND ) ) ) && ( ( cal1 . get ( Calendar . SECOND ) ) == ( cal2 . get ( Calendar . SECOND ) ) ) ) && ( ( cal1 . get ( Calendar . MINUTE ) ) == ( cal2 . get ( Calendar . MINUTE ) ) ) ) && ( ( cal1 . get ( Calendar . HOUR_OF_DAY ) ) == ( cal2 . get ( Calendar . HOUR_OF_DAY ) ) ) ) && ( ( cal1 . get ( Calendar . DAY_OF_YEAR ) ) == ( cal2 . get ( Calendar . DAY_OF_YEAR ) ) ) ) && ( ( cal1 . get ( Calendar . YEAR ) ) == ( cal2 . get ( Calendar . YEAR ) ) ) ) && ( ( cal1 . get ( Calendar . ERA ) ) == ( cal2 . get ( Calendar . ERA ) ) ) ) && ( ( cal1 . getClass ( ) ) == ( cal2 . getClass ( ) ) ) ;