Buggy code:
public class FastDateFormat extends Format implements DateParser , DatePrinter { private static final long serialVersionUID = 2L ; public static final int FULL = DateFormat . FULL ; public static final int LONG = DateFormat . LONG ; public static final int MEDIUM = DateFormat . MEDIUM ; public static final int SHORT = DateFormat . SHORT ; private static final FormatCache < FastDateFormat > cache = new FormatCache < FastDateFormat > ( ) { @ Override protected FastDateFormat createInstance ( final String pattern , final TimeZone timeZone , final Locale locale ) { } } ; private final FastDatePrinter printer ; private final FastDateParser parser ; public static FastDateFormat getInstance ( ) { } public static FastDateFormat getInstance ( final String pattern ) { } public static FastDateFormat getInstance ( final String pattern , final TimeZone timeZone ) { } public static FastDateFormat getInstance ( final String pattern , final Locale locale ) { } public static FastDateFormat getInstance ( final String pattern , final TimeZone timeZone , final Locale locale ) { } public static FastDateFormat getDateInstance ( final int style ) { } public static FastDateFormat getDateInstance ( final int style , final Locale locale ) { } public static FastDateFormat getDateInstance ( final int style , final TimeZone timeZone ) { } public static FastDateFormat getDateInstance ( final int style , final TimeZone timeZone , final Locale locale ) { } public static FastDateFormat getTimeInstance ( final int style ) { } public static FastDateFormat getTimeInstance ( final int style , final Locale locale ) { } public static FastDateFormat getTimeInstance ( final int style , final TimeZone timeZone ) { } public static FastDateFormat getTimeInstance ( final int style , final TimeZone timeZone , final Locale locale ) { } public static FastDateFormat getDateTimeInstance ( final int dateStyle , final int timeStyle ) { } public static FastDateFormat getDateTimeInstance ( final int dateStyle , final int timeStyle , final Locale locale ) { } public static FastDateFormat getDateTimeInstance ( final int dateStyle , final int timeStyle , final TimeZone timeZone ) { } public static FastDateFormat getDateTimeInstance ( final int dateStyle , final int timeStyle , final TimeZone timeZone , final Locale locale ) { } protected FastDateFormat ( final String pattern , final TimeZone timeZone , final Locale locale ) { } @ Override public StringBuffer format ( final Object obj , final StringBuffer toAppendTo , final FieldPosition pos ) { } @ Override public String format ( final long millis ) { } @ Override public String format ( final Date date ) { } @ Override public String format ( final Calendar calendar ) { } @ Override public StringBuffer format ( final long millis , final StringBuffer buf ) { } @ Override public StringBuffer format ( final Date date , final StringBuffer buf ) { } @ Override public StringBuffer format ( final Calendar calendar , final StringBuffer buf ) { } @ Override public Date parse ( final String source ) throws ParseException { } @ Override public Date parse ( final String source , final ParsePosition pos ) { } @ Override public Object parseObject ( final String source , final ParsePosition pos ) { } @ Override public String getPattern ( ) { } @ Override public TimeZone getTimeZone ( ) { } @ Override public Locale getLocale ( ) { } public int getMaxLengthEstimate ( ) { } @ Override public boolean equals ( final Object obj ) { if ( ( obj instanceof FastDateFormat ) == false ) { return false ; } <START_BUG> FastDateFormat other = ( ( FastDateFormat ) ( obj ) ) ; <END_BUG> return printer . equals ( other . printer ) ; } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } protected StringBuffer applyRules ( final Calendar calendar , final StringBuffer buf ) { } }

Fix:
final FastDateFormat other = ( ( FastDateFormat ) ( obj ) ) ;