Buggy code:
public final class AutoLinkResolver implements IComponentResolver { public abstract static class AbstractAutolinkResolverDelegate implements AutoLinkResolver . IAutolinkResolverDelegate { protected final Component newResourceReferenceAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo , final String attribute ) { } } public static final class AutolinkBookmarkablePageLink extends BookmarkablePageLink { private static final long serialVersionUID = 1L ; private final String anchor ; public AutolinkBookmarkablePageLink ( MarkupContainer parent , final String id , final Class < ? extends Page > pageClass , final PageParameters parameters , final String anchor ) { } @ Override public boolean isTransparentResolver ( ) { } @ Override protected CharSequence getURL ( ) { } } public static interface IAutolinkResolverDelegate { Component newAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo ) ; } public static final class PathInfo { private final boolean absolute ; private final String anchor ; private final String extension ; private final PageParameters pageParameters ; private final String path ; private final String reference ; public PathInfo ( final String reference ) { } public final String getAnchor ( ) { } public final String getExtension ( ) { } public final PageParameters getPageParameters ( ) { } public final String getPath ( ) { } public final String getReference ( ) { } public final boolean isAbsolute ( ) { } } private static final class AnchorResolverDelegate extends AutoLinkResolver . AbstractAutolinkResolverDelegate { private static final String attribute = "href" ; private final Set < String > supportedPageExtensions = new HashSet < String > ( 4 ) ; public AnchorResolverDelegate ( ) { } @ SuppressWarnings ( "unchecked" ) public Component newAutoComponent ( final MarkupContainer container , final String autoId , AutoLinkResolver . PathInfo pathInfo ) { if ( ( ( pathInfo . extension ) != null ) && ( supportedPageExtensions . contains ( pathInfo . extension ) ) ) { String infoPath = Strings . replaceAll ( pathInfo . path , "//" , "." ) . toString ( ) ; Page page = container . getPage ( ) ; final IClassResolver defaultClassResolver = page . getApplication ( ) . getApplicationSettings ( ) . getClassResolver ( ) ; String className ; if ( ! ( infoPath . startsWith ( "." ) ) ) { className = ( ( Packages . extractPackageName ( page . getClass ( ) ) ) + "." ) + infoPath ; } else { className = infoPath . substring ( 1 ) ; } try { final Class clazz = defaultClassResolver . resolveClass ( className ) ; return new AutoLinkResolver . AutolinkBookmarkablePageLink ( container , autoId , clazz , pathInfo . pageParameters , pathInfo . anchor ) ; } catch ( WicketRuntimeException ex ) { AutoLinkResolver . log . warn ( ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>corresponding<seq2seq4repair_space>java<seq2seq4repair_space>class:<seq2seq4repair_space>" + className ) ) ; } MarkupContainer parentWithContainer = container . findParentWithAssociatedMarkup ( ) ; <START_BUG> if ( ( ( parentWithContainer instanceof Page ) && ( ! ( infoPath . startsWith ( "." ) ) ) ) && ( page . getMarkupStream ( ) . isMergedMarkup ( ) ) ) { <END_BUG> Class clazz = container . getMarkupStream ( ) . getTag ( ) . getMarkupClass ( ) ; if ( clazz != null ) { className = ( ( Packages . extractPackageName ( clazz ) ) + "." ) + infoPath ; try { clazz = defaultClassResolver . resolveClass ( className ) ; return new AutoLinkResolver . AutolinkBookmarkablePageLink ( container , autoId , clazz , pathInfo . getPageParameters ( ) , pathInfo . anchor ) ; } catch ( WicketRuntimeException ex ) { AutoLinkResolver . log . warn ( ( ( ( ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>corresponding<seq2seq4repair_space>java<seq2seq4repair_space>class:<seq2seq4repair_space>" + className ) + "(" ) + ( ex . getMessage ( ) ) ) + ")" ) ) ; } } } } else { return newResourceReferenceAutoComponent ( container , autoId , pathInfo , AutoLinkResolver . AnchorResolverDelegate . attribute ) ; } return null ; } } private static final class AutolinkExternalLink extends ExternalLink { private static final long serialVersionUID = 1L ; public AutolinkExternalLink ( MarkupContainer parent , final String id , final String href ) { } @ Override public boolean isTransparentResolver ( ) { } } private static interface ITagReferenceResolver { String getReference ( final ComponentTag tag ) { } } private static final class ResourceReferenceAutolink < T > extends WebMarkupContainer < T > { private static final long serialVersionUID = 1L ; private final String attribute ; private final ResourceReference resourceReference ; public ResourceReferenceAutolink ( MarkupContainer parent , final String id , final Class clazz , final String ref , final String attribute ) { } @ Override public boolean isTransparentResolver ( ) { } @ Override protected final void onComponentTag ( final ComponentTag tag ) { } } private static final class ResourceReferenceResolverDelegate extends AutoLinkResolver . AbstractAutolinkResolverDelegate { private final String attribute ; public ResourceReferenceResolverDelegate ( final String attribute ) { } public Component newAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo ) { return newResourceReferenceAutoComponent ( container , autoId , pathInfo , attribute ) ; } } private static final class TagReferenceResolver implements AutoLinkResolver . ITagReferenceResolver { private final String attribute ; public TagReferenceResolver ( final String attribute ) { } public String getReference ( final ComponentTag tag ) { } } private static final AutoLinkResolver . TagReferenceResolver DEFAULT_ATTRIBUTE_RESOLVER = new AutoLinkResolver . TagReferenceResolver ( "href" ) ; private static final Log log = LogFactory . getLog ( AutoLinkResolver . class ) ; private static final long serialVersionUID = 1L ; private final Map < String , AutoLinkResolver . IAutolinkResolverDelegate > tagNameToAutolinkResolverDelegates = new HashMap < String , AutoLinkResolver . IAutolinkResolverDelegate > ( ) ; private final Map < String , AutoLinkResolver . TagReferenceResolver > tagNameToTagReferenceResolvers = new HashMap < String , AutoLinkResolver . TagReferenceResolver > ( ) ; public AutoLinkResolver ( ) { } public final void addTagReferenceResolver ( final String tagName , final String attributeName , final AutoLinkResolver . IAutolinkResolverDelegate resolver ) { }

Fix:
if ( ( parentWithContainer instanceof Page ) && ( ! ( infoPath . startsWith ( "." ) ) ) ) {