Buggy code:
public final String getClassRelativePath ( ) { } public IConverter getConverter ( Class < ? > type ) { } public final boolean getEscapeModelStrings ( ) { } public final FeedbackMessage getFeedbackMessage ( ) { } public String getId ( ) { } public final IModel < ? > getInnermostModel ( ) { } public Locale getLocale ( ) { } public final Localizer getLocalizer ( ) { } public final ValueMap getMarkupAttributes ( ) { } public final Object getMarkupIdImpl ( ) { } private final int nextAutoIndex ( ) { } public String getMarkupId ( boolean createIfDoesNotExist ) { } public String getMarkupId ( ) { } public final < M extends Serializable > M getMetaData ( final MetaDataKey < M > key ) { } private MetaDataEntry < ? > [ ] getMetaData ( ) { } public final IModel < ? > getDefaultModel ( ) { } public final Object getDefaultModelObject ( ) { } public final String getDefaultModelObjectAsString ( ) { } public final String getDefaultModelObjectAsString ( final Object modelObject ) { } public final boolean getOutputMarkupId ( ) { } public final boolean getOutputMarkupPlaceholderTag ( ) { } public final Page getPage ( ) { } 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 Session getSession ( ) { } public long getSizeInBytes ( ) { } public final String getString ( final String key ) { } 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 hasBeenRendered ( ) { } public final boolean hasErrorMessage ( ) { } public final boolean hasFeedbackMessage ( ) { } public final void info ( final String message ) { } public final boolean isActionAuthorized ( Action action ) { } public final boolean isEnableAllowed ( ) { } public boolean isEnabled ( ) { } public final boolean isRenderAllowed ( ) { } public final boolean isStateless ( ) { } public boolean isVersioned ( ) { } public boolean isVisible ( ) { } public final boolean isVisibleInHierarchy ( ) { } public final void markRendering ( boolean setRenderingFlag ) { } public final void modelChanged ( ) { } public final void modelChanging ( ) { } public final void prepareForRender ( boolean setRenderingFlag ) { } public final void prepareForRender ( ) { } public final void redirectToInterceptPage ( final Page page ) { } public final void remove ( ) { } public Component remove ( final IBehavior behavior ) { } private boolean removeBehavior ( final IBehavior behavior ) { } public final void render ( ) { } public final void render ( final MarkupStream markupStream ) { } protected void renderPlaceholderTag ( final ComponentTag tag , final Response response ) { } public final void renderComponent ( ) { } public final void renderComponent ( final MarkupStream markupStream ) { } public final void rendered ( ) { } public void renderHead ( final HtmlHeaderContainer container ) { <START_BUG> if ( ( isVisible ( ) ) && ( isRenderAllowed ( ) ) ) { <END_BUG> if ( ( this ) instanceof IHeaderContributor ) { ( ( IHeaderContributor ) ( this ) ) . renderHead ( container . getHeaderResponse ( ) ) ; } for ( IBehavior behavior : getBehaviors ( ) ) { if ( ( behavior instanceof IHeaderContributor ) && ( isBehaviorAccepted ( behavior ) ) ) { ( ( IHeaderContributor ) ( behavior ) ) . renderHead ( container . getHeaderResponse ( ) ) ; } } } } public void replaceWith ( Component replacement ) { } public final boolean sameInnermostModel ( final Component component ) { } public final boolean sameInnermostModel ( final IModel < ? > model ) { } public final Component setEnabled ( final boolean enabled ) { } public final Component setEscapeModelStrings ( final boolean escapeMarkup ) { } public final void setMarkupIdImpl ( Object markupId ) { } public Component setMarkupId ( String markupId ) { } public final < M > void setMetaData ( final MetaDataKey < M > key , final M object ) { } public Component setDefaultModel ( final IModel < ? > model ) { } IModel < ? > getModelImpl ( ) { } void setModelImpl ( IModel < ? > model ) { } @ SuppressWarnings ( "unchecked" ) public final Component setDefaultModelObject ( final Object object ) { } public final Component setOutputMarkupId ( final boolean output ) { } public final Component setOutputMarkupPlaceholderTag ( final boolean outputTag ) { } public final void setRedirect ( final boolean redirect ) { } public final Component setRenderBodyOnly ( final boolean renderTag ) { } public final < C extends Page > void setResponsePage ( final Class < C > cls ) { } public final < C extends Page > void setResponsePage ( final Class < C > cls , PageParameters parameters ) { } public final void setResponsePage ( final Page page ) { } public Component setVersioned ( boolean versioned ) { } public final Component setVisible ( final boolean visible ) { } @ Override public String toString ( ) { } public String toString ( final boolean detailed ) { } public final < C extends Page > CharSequence urlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public final CharSequence urlFor ( final IBehavior behaviour , final RequestListenerInterface listener ) { }

Fix:
if ( ( isVisibleInHierarchy ( ) ) && ( isRenderAllowed ( ) ) ) {