Buggy code:
public class FastDateParser implements Serializable , DateParser { private static final long serialVersionUID = 2L ; static final Locale JAPANESE_IMPERIAL = new Locale ( "ja" , "JP" , "JP" ) ; private final String pattern ; private final TimeZone timeZone ; private final Locale locale ; private final int century ; private final int startYear ; private transient Pattern parsePattern ; private transient FastDateParser . Strategy [ ] strategies ; private transient String currentFormatField ; private transient FastDateParser . Strategy nextStrategy ; protected FastDateParser ( final String pattern , final TimeZone timeZone , final Locale locale ) { } protected FastDateParser ( final String pattern , final TimeZone timeZone , final Locale locale , final Date centuryStart ) { } private void init ( Calendar definingCalendar ) { } @ Override public String getPattern ( ) { } @ Override public TimeZone getTimeZone ( ) { } @ Override public Locale getLocale ( ) { } Pattern getParsePattern ( ) { } @ Override public boolean equals ( final Object obj ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } private void readObject ( final ObjectInputStream in ) throws IOException , ClassNotFoundException { } @ Override public Object parseObject ( final String source ) throws ParseException { } @ Override public Date parse ( final String source ) throws ParseException { } @ Override public Object parseObject ( final String source , final ParsePosition pos ) { } @ Override public Date parse ( final String source , final ParsePosition pos ) { } private static StringBuilder escapeRegex ( final StringBuilder regex , final String value , final boolean unquote ) { } private static Map < String , Integer > getDisplayNames ( final int field , final Calendar definingCalendar , final Locale locale ) { } private int adjustYear ( final int twoDigitYear ) { } boolean isNextNumber ( ) { } int getFieldWidth ( ) { } private abstract static class Strategy { boolean isNumber ( ) { } void setCalendar ( final FastDateParser parser , final Calendar cal , final String value ) { } abstract boolean addRegex ( FastDateParser parser , StringBuilder regex ) ; } private static final Pattern formatPattern = Pattern . compile ( "D+|E+|F+|G+|H+|K+|M+|S+|W+|Z+|a+|d+|h+|k+|m+|s+|w+|y+|z+|''|'[^']++(''[^']*+)*+'|[^'A-Za-z]++" ) ; private FastDateParser . Strategy getStrategy ( final String formatField , final Calendar definingCalendar ) { } @ SuppressWarnings ( "unchecked" ) private static final ConcurrentMap < Locale , FastDateParser . Strategy > [ ] caches = new ConcurrentMap [ Calendar . FIELD_COUNT ] ; private static ConcurrentMap < Locale , FastDateParser . Strategy > getCache ( final int field ) { } private FastDateParser . Strategy getLocaleSpecificStrategy ( final int field , final Calendar definingCalendar ) { } private static class CopyQuotedStrategy extends FastDateParser . Strategy { private final String formatField ; CopyQuotedStrategy ( final String formatField ) { } @ Override boolean isNumber ( ) { } @ Override boolean addRegex ( final FastDateParser parser , final StringBuilder regex ) { FastDateParser . escapeRegex ( regex , formatField , true ) ; return false ; } } private static class TextStrategy extends FastDateParser . Strategy { private final int field ; private final Locale locale ; private final Map < String , Integer > keyValues ; private final Map < String , Integer > lKeyValues ; TextStrategy ( final int field , final Calendar definingCalendar , final Locale locale ) { } @ Override boolean addRegex ( final FastDateParser parser , final StringBuilder regex ) { <START_BUG> regex . append ( "((?i)(?u)" ) ; <END_BUG> for ( final String textKeyValue : keyValues . keySet ( ) ) { FastDateParser . escapeRegex ( regex , textKeyValue , false ) . append ( '|' ) ; } regex . setCharAt ( ( ( regex . length ( ) ) - 1 ) , ')' ) ; return true ; } @ Override void setCalendar ( final FastDateParser parser , final Calendar cal , final String value ) { } } private static class NumberStrategy extends FastDateParser . Strategy { private final int field ; NumberStrategy ( final int field ) { } @ Override boolean isNumber ( ) { } @ Override boolean addRegex ( final FastDateParser parser , final StringBuilder regex ) { if ( parser . isNextNumber ( ) ) { regex . append ( "(\\p{Nd}{" ) . append ( parser . getFieldWidth ( ) ) . append ( "}+)" ) ; } else { regex . append ( "(\\p{Nd}++)" ) ; } return true ; } @ Override void setCalendar ( final FastDateParser parser , final Calendar cal , final String value ) { } int modify ( final int iValue ) { } } private static final FastDateParser . Strategy ABBREVIATED_YEAR_STRATEGY = new FastDateParser . NumberStrategy ( Calendar . YEAR ) { @ Override void setCalendar ( final FastDateParser parser , final Calendar cal , final String value ) { } } ; private static class TimeZoneStrategy extends FastDateParser . Strategy { private final String validTimeZoneChars ; private final SortedMap < String , TimeZone > tzNames = new TreeMap < String , TimeZone > ( String . CASE_INSENSITIVE_ORDER ) ; private static final int ID = 0 ; private static final int LONG_STD = 1 ; private static final int SHORT_STD = 2 ; private static final int LONG_DST = 3 ; private static final int SHORT_DST = 4 ; TimeZoneStrategy ( final Locale locale ) { } @ Override boolean addRegex ( final FastDateParser parser , final StringBuilder regex ) { regex . append ( validTimeZoneChars ) ; return true ; } @ Override void setCalendar ( final FastDateParser parser , final Calendar cal , final String value ) { } } private static final FastDateParser . Strategy NUMBER_MONTH_STRATEGY = new FastDateParser . NumberStrategy ( Calendar . MONTH ) { @ Override int modify ( final int iValue ) { } } ;

Fix:
regex . append ( "((?iu)" ) ;