Buggy code:
public abstract class DateTools { public static final int DAYS_PER_WEEK = 7 ; public static final long MILLISECONDS_PER_MINUTE = 1000 * 60 ; public static final long MILLISECONDS_PER_HOUR = ( DateTools . MILLISECONDS_PER_MINUTE ) * 60 ; public static final long MILLISECONDS_PER_DAY = 24 * ( DateTools . MILLISECONDS_PER_HOUR ) ; public static final long MILLISECONDS_PER_WEEK = 7 * ( DateTools . MILLISECONDS_PER_DAY ) ; public static final int SUNDAY = 1 ; public static final int MONDAY = 2 ; public static final int TUESDAY = 3 ; public static final int WEDNESDAY = 4 ; public static final int THURSDAY = 5 ; public static final int FRIDAY = 6 ; public static final int SATURDAY = 7 ; public static int getHourOfDay ( long date ) { } public static int getMinuteOfHour ( long date ) { } public static int getMinuteOfDay ( long date ) { } public static String formatDate ( Date date ) { } public static String formatDate ( Date date , @ SuppressWarnings ( "unused" ) Locale locale ) { } public static String formatTime ( Date date ) { } public static String formatDateTime ( Date date ) { <START_BUG> return DateTools . formatDate ( date , null ) ; <END_BUG> } public static String formatDateTime ( Date date , @ SuppressWarnings ( "unused" ) Locale locale ) { } public static int getDaysInMonth ( int year , int month ) { } public static boolean isLeapYear ( int year ) { } public static long cutDate ( long date ) { } public static boolean isMidnight ( long date ) { } public static boolean isMidnight ( Date date ) { } public static Date cutDate ( Date date ) { } private static TimeZone timeZone = TimeZone . getTimeZone ( "GMT" ) ; public static TimeZone getTimeZone ( ) { } public static long fillDate ( long date ) { } public static Date fillDate ( Date date ) { } public static Date addDay ( Date date ) { } public static Date addYear ( Date date ) { } public static Date addWeeks ( Date date , int weeks ) { } public static Date addYears ( Date date , int yearModifier ) { } public static Date addMonth ( Date startDate ) { } public static Date addMonths ( Date startDate , int monthModifier ) { } private static Date modifyDate ( Date startDate , int yearModifier , int monthModifier ) { } public static Date addDays ( Date date , long days ) { } public static Date subDay ( Date date ) { } public static Date subDays ( Date date , int days ) { } public static boolean isSameDay ( Date d1 , Date d2 ) { } public static boolean isSameDay ( long d1 , long d2 ) { } public static int getWeekday ( Date date ) { } public static int getDayOfWeekInMonth ( Date date ) { } public static int getDayOfMonth ( Date date ) { } public static long countDays ( Date start , Date end ) { } public static long countDays ( long start , long end ) { } public static long countMinutes ( Date start , Date end ) { } public static long countMinutes ( long start , long end ) { } static int date_1970_1_1 = DateTools . calculateJulianDayNumberAtNoon ( 1970 , 1 , 1 ) ; private static int calculateJulianDayNumberAtNoon ( int y , int m , int d ) { } public static long toDate ( int year , int month , int day ) { } public static Date toDateTime ( Date date , Date time ) { } public static class DateWithoutTimezone { public int year ; public int month ; public int day ; public String toString ( ) { } } public static class TimeWithoutTimezone { public int hour ; public int minute ; public int second ; public int milliseconds ; public String toString ( ) { } } public static DateTools . TimeWithoutTimezone toTime ( long millis ) { } public static long toTime ( int hour , int minute , int second ) { } public static long toTime ( int hour , int minute , int second , int millisecond ) { } public static int toHour ( long millisecond ) { } public static DateTools . DateWithoutTimezone toDate ( long millis ) { } private static DateTools . DateWithoutTimezone fromJulianDayNumberAtNoon ( int julianDateAtNoon ) { } public static Date max ( Date ... param ) { } }

Fix:
return DateTools . formatDateTime ( date , null ) ;