Buggy code:
public class DatePicker extends AbstractBehavior implements IHeaderContributor { private static final class UnableToDetermineFormatException extends WicketRuntimeException { private static final long serialVersionUID = 1L ; public UnableToDetermineFormatException ( ) { } } public static final DateFormat FORMAT_DATE = new SimpleDateFormat ( "MM//dd//yyyy" ) ; public static final DateFormat FORMAT_PAGEDATE = new SimpleDateFormat ( "MM//yyyy" ) ; private static final long serialVersionUID = 1L ; private Component component ; public DatePicker ( ) { } public void bind ( Component component ) { } public void onRendered ( Component component ) { } public void renderHead ( IHeaderResponse response ) { <START_BUG> YuiLib . load ( response , getConfigureYUIBasePath ( ) ) ; <END_BUG> Map variables = new HashMap ( ) ; String widgetId = getEscapedComponentMarkupId ( ) ; variables . put ( "componentId" , getComponentMarkupId ( ) ) ; variables . put ( "widgetId" , widgetId ) ; variables . put ( "datePattern" , getDatePattern ( ) ) ; variables . put ( "fireChangeEvent" , Boolean . valueOf ( notifyComponentOnDateSelected ( ) ) ) ; variables . put ( "alignWithIcon" , Boolean . valueOf ( alignWithIcon ( ) ) ) ; variables . put ( "pathToWicketDate" , RequestCycle . get ( ) . urlFor ( new JavascriptResourceReference ( DatePicker . class , "wicket-date.js" ) ) ) ; variables . put ( "basePath" , RequestCycle . get ( ) . urlFor ( new JavascriptResourceReference ( YuiLib . class , "" ) ) ) ; Properties p = new Properties ( ) ; configure ( p ) ; StringBuffer calendarInit = new StringBuffer ( ) ; for ( Iterator i = p . entrySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { Map . Entry entry = ( ( Map . Entry ) ( i . next ( ) ) ) ; calendarInit . append ( entry . getKey ( ) ) ; Object value = entry . getValue ( ) ; if ( value instanceof CharSequence ) { calendarInit . append ( ":\"" ) ; calendarInit . append ( Strings . toEscapedUnicode ( value . toString ( ) ) ) ; calendarInit . append ( "\"" ) ; } else if ( value instanceof CharSequence [ ] ) { calendarInit . append ( ":[" ) ; CharSequence [ ] valueArray = ( ( CharSequence [ ] ) ( value ) ) ; for ( int j = 0 ; j < ( valueArray . length ) ; j ++ ) { CharSequence tmpValue = valueArray [ j ] ; if ( j > 0 ) { calendarInit . append ( "," ) ; } if ( tmpValue != null ) { calendarInit . append ( "\"" ) ; calendarInit . append ( Strings . toEscapedUnicode ( tmpValue . toString ( ) ) ) ; calendarInit . append ( "\"" ) ; } } calendarInit . append ( "]" ) ; } else { calendarInit . append ( ":" ) ; calendarInit . append ( Strings . toEscapedUnicode ( String . valueOf ( value ) ) ) ; } if ( i . hasNext ( ) ) { calendarInit . append ( "," ) ; } } variables . put ( "calendarInit" , calendarInit . toString ( ) ) ; TextTemplate datePickerJs = new PackagedTextTemplate ( DatePicker . class , "DatePicker.js" ) ; datePickerJs . interpolate ( variables ) ; response . renderOnDomReadyJavascript ( datePickerJs . asString ( ) ) ; } private final void checkComponentProvidesDateFormat ( Component component ) { } private void setWidgetProperty ( Map widgetProperties , String key , String [ ] array ) { } protected boolean alignWithIcon ( ) { } protected void appendToInit ( String markupId , String javascriptId , String javascriptWidgetId , StringBuffer b ) { } protected void configure ( Map widgetProperties ) { } protected final void configureWidgetProperties ( Map widgetProperties ) { } protected final String [ ] filterEmpty ( String [ ] array ) { } protected final String getComponentMarkupId ( ) { } protected boolean getConfigureYUIBasePath ( ) { } protected String getDatePattern ( ) { } protected final String getEscapedComponentMarkupId ( ) { } protected final String getIconId ( ) { } protected String getIconStyle ( ) { } protected CharSequence getIconUrl ( ) { } protected Locale getLocale ( ) { } protected void localize ( Map widgetProperties ) { } protected boolean notifyComponentOnDateSelected ( ) { } protected final String [ ] substring ( String [ ] array , int len ) { } }

Fix:
YuiLib . load ( response ) ;