Buggy code:
protected static final int FLAG_RESERVED3 = 1024 ; protected static final int FLAG_RESERVED4 = 2048 ; protected static final int FLAG_RESERVED5 = 65536 ; protected static final int FLAG_RESERVED6 = 131072 ; protected static final int FLAG_RESERVED7 = 262144 ; protected static final int FLAG_RESERVED8 = 524288 ; private static final int FLAG_ATTACHED = 536870912 ; private static final int FLAG_ATTACHING = 1073741824 ; private static final int FLAG_DETACHING = - 2147483648 ; private static final IModelComparator defaultModelComparator = new IModelComparator ( ) { private static final long serialVersionUID = 1L ; public boolean compare ( Component component , Object b ) { } } ; private static final int FLAG_AUTO = 1 ; private static final int FLAG_ENABLED = 128 ; private static final int FLAG_ESCAPE_MODEL_STRINGS = 2 ; private static final int FLAG_IGNORE_ATTRIBUTE_MODIFIER = 64 ; private static final int FLAG_IS_RENDER_ALLOWED = 8192 ; private static final int FLAG_IS_RENDERED_ONCE = 4096 ; private static final int FLAG_OUTPUT_MARKUP_ID = 16384 ; private static final int FLAG_RENDER_BODY_ONLY = 32 ; private static final int FLAG_VERSIONED = 8 ; private static final int FLAG_VISIBLE = 16 ; private static final int FLAG_PLACEHOLDER = 32768 ; private static final Log log = LogFactory . getLog ( Component . class ) ; private static final String MARKUP_ID_ATTR_NAME = "id" ; private static final long serialVersionUID = 1L ; private List behaviors = null ; private int flags = ( ( ( ( Component . FLAG_VISIBLE ) | ( Component . FLAG_ESCAPE_MODEL_STRINGS ) ) | ( Component . FLAG_VERSIONED ) ) | ( Component . FLAG_ENABLED ) ) | ( Component . FLAG_IS_RENDER_ALLOWED ) ; private String id ; private MetaDataEntry [ ] metaData ; private IModel model ; private MarkupContainer parent ; int markupIndex = - 1 ; public Component ( final String id ) { } public Component ( final String id , final IModel model ) { } public Component add ( final IBehavior behavior ) { } public final boolean continueToOriginalDestination ( ) { } public final void debug ( final String message ) { } public void detachModels ( ) { } public final void error ( final Serializable message ) { } public final void fatal ( final String message ) { } public final MarkupContainer findParent ( final Class c ) { } public final MarkupContainer findParentWithAssociatedMarkup ( ) { } public final Application getApplication ( ) { } public final List getBehaviors ( ) { } public final String getClassRelativePath ( ) { } public final IConverter getConverter ( ) { } public IConverter getConverter ( Class type ) { } public final boolean getEscapeModelStrings ( ) { } public final FeedbackMessage getFeedbackMessage ( ) { } public String getId ( ) { } public Locale getLocale ( ) { } public final Localizer getLocalizer ( ) { } public final ValueMap getMarkupAttributes ( ) { } public String getMarkupId ( ) { } final boolean hasMarkupIdMetaData ( ) { } final void setMarkupIdMetaData ( String markupId ) { } public final Serializable getMetaData ( final MetaDataKey key ) { } public IModel getModel ( ) { } public final Object getModelObject ( ) { } public final String getModelObjectAsString ( ) { } public final Page getPage ( ) { } public final IPageFactory getPageFactory ( ) { } public final String getPageRelativePath ( ) { } public final MarkupContainer getParent ( ) { } public final String getPath ( ) { } public final boolean getRenderBodyOnly ( ) { } public final Request getRequest ( ) { } public final RequestCycle getRequestCycle ( ) { } public final Response getResponse ( ) { } public final Session getSession ( ) { } public long getSizeInBytes ( ) { } public final String getString ( final String key ) { <START_BUG> return getString ( key , getModel ( ) ) ; <END_BUG> } public final String getString ( final String key , final IModel model ) { } public final String getString ( final String key , final IModel model , final String defaultValue ) { } public final String getStyle ( ) { } public String getVariation ( ) { } public final boolean hasErrorMessage ( ) { } public final boolean hasFeedbackMessage ( ) { } public final void info ( final String message ) { } public final boolean isActionAuthorized ( Action action ) { } public final boolean isAncestorOf ( final Component component ) { } public final boolean isEnableAllowed ( ) { } public boolean isEnabled ( ) { } public boolean isVersioned ( ) { } public boolean isVisible ( ) { } public final boolean isVisibleInHierarchy ( ) { } public final void modelChanged ( ) { } public final void modelChanging ( ) { } public final Page newPage ( final Class c ) { } public final Page newPage ( final Class c , final PageParameters parameters ) { } public final void redirectToInterceptPage ( final Page page ) { } public final void remove ( ) { } public final void render ( ) { } public final void render ( final MarkupStream markupStream ) { } public final void renderComponent ( ) { } public final void renderComponent ( final MarkupStream markupStream ) { } public final void rendered ( ) { } private void notifyBehaviorsComponentRendered ( ) { } private void notifyBehaviorsComponentBeforeRender ( ) { } public final void detachBehaviors ( ) { } public void renderHead ( final HtmlHeaderContainer container ) { } public void replaceWith ( Component replacement ) { } public final boolean sameRootModel ( final Component component ) { } public final boolean sameRootModel ( final IModel model ) { } public final Component setEnabled ( final boolean enabled ) { } public final Component setEscapeModelStrings ( final boolean escapeMarkup ) { } public final void setMetaData ( final MetaDataKey key , final Serializable object ) { } public Component setModel ( final IModel model ) { }

Fix:
return getString ( key , null ) ;