Buggy code:
public class DatePicker extends Behavior { private static Method GETINSTANCEMETHOD = null ; private static final class UnableToDetermineFormatException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; public UnableToDetermineFormatException ( ) { } } public static String FORMAT_DATE = "MM//dd//yyyy" ; public static String FORMAT_PAGEDATE = "MM//yyyy" ; private static final ResourceReference YUI = new JavaScriptResourceReference ( YuiLib . class , "" ) ; private static final ResourceReference WICKET_DATE = new JavaScriptResourceReference ( DatePicker . class , "wicket-date.js" ) ; private static final long serialVersionUID = 1L ; private Component component ; private boolean showOnFieldClick = false ; public DatePicker ( ) { } @ Override public void bind ( final Component component ) { } @ Override public void afterRender ( final Component component ) { } protected boolean includeYUILibraries ( ) { } @ Override public void renderHead ( Component component , IHeaderResponse response ) { } protected void renderHeadInit ( IHeaderResponse response ) { } private final void checkComponentProvidesDateFormat ( final Component component ) { } private void setWidgetProperty ( final Map < String , Object > widgetProperties , final String key , final String [ ] array ) { } protected boolean alignWithIcon ( ) { } protected void configure ( final Map < String , Object > widgetProperties , final IHeaderResponse response , final Map < String , Object > initVariables ) { } protected final String [ ] filterEmpty ( String [ ] stringArray ) { } protected final String getComponentMarkupId ( ) { } protected String getDatePattern ( ) { } protected final String getEscapedComponentMarkupId ( ) { } protected final String getIconId ( ) { } protected String getIconStyle ( ) { } protected CharSequence getIconTitle ( ) { } protected CharSequence getIconAltText ( ) { } protected CharSequence getIconUrl ( ) { } protected Locale getLocale ( ) { } protected void localize ( Map < String , Object > widgetProperties , IHeaderResponse response , Map < String , Object > initVariables ) { Locale locale = getLocale ( ) ; String key = ( "wicketCalendarI18n[\"" + ( locale . toString ( ) ) ) + "\"]" ; initVariables . put ( "i18n" , key ) ; if ( response . wasRendered ( key ) ) { return ; } DateFormatSymbols dfSymbols = null ; if ( ( DatePicker . GETINSTANCEMETHOD ) != null ) { try { dfSymbols = ( ( DateFormatSymbols ) ( DatePicker . GETINSTANCEMETHOD . invoke ( null , locale ) ) ) ; } catch ( Exception e ) { } } if ( dfSymbols == null ) { dfSymbols = new DateFormatSymbols ( locale ) ; } <START_BUG> Map < String , Object > i18nVariables = new HashMap < String , Object > ( ) ; <END_BUG> setWidgetProperty ( i18nVariables , "MONTHS_SHORT" , filterEmpty ( dfSymbols . getShortMonths ( ) ) ) ; setWidgetProperty ( i18nVariables , "MONTHS_LONG" , filterEmpty ( dfSymbols . getMonths ( ) ) ) ; setWidgetProperty ( i18nVariables , "WEEKDAYS_MEDIUM" , filterEmpty ( dfSymbols . getShortWeekdays ( ) ) ) ; setWidgetProperty ( i18nVariables , "WEEKDAYS_LONG" , filterEmpty ( dfSymbols . getWeekdays ( ) ) ) ; i18nVariables . put ( "START_WEEKDAY" , ( ( Calendar . getInstance ( locale ) . getFirstDayOfWeek ( ) ) - 1 ) ) ; if ( ( Locale . SIMPLIFIED_CHINESE . equals ( locale ) ) || ( Locale . TRADITIONAL_CHINESE . equals ( locale ) ) ) { setWidgetProperty ( i18nVariables , "WEEKDAYS_1CHAR" , filterEmpty ( substring ( dfSymbols . getShortWeekdays ( ) , 2 , 1 ) ) ) ; i18nVariables . put ( "WEEKDAYS_SHORT" , filterEmpty ( substring ( dfSymbols . getShortWeekdays ( ) , 2 , 1 ) ) ) ; } else { setWidgetProperty ( i18nVariables , "WEEKDAYS_1CHAR" , filterEmpty ( substring ( dfSymbols . getShortWeekdays ( ) , 0 , 1 ) ) ) ; setWidgetProperty ( i18nVariables , "WEEKDAYS_SHORT" , filterEmpty ( substring ( dfSymbols . getShortWeekdays ( ) , 0 , 2 ) ) ) ; } StringBuilder i18n = new StringBuilder ( key ) ; i18n . append ( '=' ) ; appendMapping ( i18nVariables , i18n ) ; i18n . append ( ';' ) ; response . renderOnDomReadyJavaScript ( i18n . toString ( ) ) ; response . wasRendered ( key ) ; } protected boolean notifyComponentOnDateSelected ( ) { } protected final String [ ] substring ( final String [ ] array , final int len ) { } protected final String [ ] substring ( final String [ ] array , final int start , final int len ) { } protected boolean enableMonthYearSelection ( ) { } protected boolean hideOnSelect ( ) { } protected boolean showOnFieldClick ( ) { } public DatePicker setShowOnFieldClick ( boolean show ) { } protected boolean renderOnLoad ( ) { } protected String getAdditionalJavaScript ( ) { } @ Override public boolean isEnabled ( final Component component ) { } private void appendMapping ( final Map < String , Object > map , final StringBuilder json ) { } }

Fix:
Map < String , Object > i18nVariables = new LinkedHashMap < String , Object > ( ) ;