Buggy code:
public final class AutoLinkResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; private static final Log log = LogFactory . getLog ( AutoLinkResolver . class ) ; private static final Map < String , AutoLinkResolver . IAutolinkResolverDelegate > tagNameToAutolinkResolverDelegates = new HashMap < String , AutoLinkResolver . IAutolinkResolverDelegate > ( ) ; private static final Map < String , AutoLinkResolver . TagReferenceResolver > tagNameToTagReferenceResolvers = new HashMap < String , AutoLinkResolver . TagReferenceResolver > ( ) ; private static final AutoLinkResolver . TagReferenceResolver DEFAULT_ATTRIBUTE_RESOLVER = new AutoLinkResolver . TagReferenceResolver ( "href" ) ; private static interface ITagReferenceResolver { String getReference ( final ComponentTag tag ) { } } public static interface IAutolinkResolverDelegate { Component newAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo ) { } } public static final class PathInfo { private final String reference ; private final String path ; private final PageParameters pageParameters ; private final String extension ; private final boolean absolute ; private final String anchor ; public PathInfo ( final String reference ) { } public final boolean isAbsolute ( ) { } public final String getExtension ( ) { } public final String getAnchor ( ) { } public final PageParameters getPageParameters ( ) { } public final String getPath ( ) { } public final String getReference ( ) { } } private static final class TagReferenceResolver implements AutoLinkResolver . ITagReferenceResolver { private final String attribute ; public TagReferenceResolver ( final String attribute ) { } public String getReference ( final ComponentTag tag ) { } } public abstract static class AbstractAutolinkResolverDelegate implements AutoLinkResolver . IAutolinkResolverDelegate { protected final Component newPackageResourceReferenceAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo ) { } } private static final class AnchorResolverDelegate extends AutoLinkResolver . AbstractAutolinkResolverDelegate { private static final Set < String > supportedPageExtensions = new HashSet < String > ( 4 ) ; public Component newAutoComponent ( final MarkupContainer container , final String autoId , AutoLinkResolver . PathInfo pathInfo ) { } } private static final class PackageResourceReferenceResolverDelegate extends AutoLinkResolver . AbstractAutolinkResolverDelegate { public Component newAutoComponent ( final MarkupContainer container , final String autoId , final AutoLinkResolver . PathInfo pathInfo ) { } } 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 protected CharSequence getURL ( ) { } @ Override public boolean isTransparentResolver ( ) { } } 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 final class PackageResourceReferenceAutolink < V > extends WebMarkupContainer < V > { private static final long serialVersionUID = 1L ; private final ResourceReference resourceReference ; public PackageResourceReferenceAutolink ( MarkupContainer < ? > parent , final String id , final Class clazz , final String href ) { } @ Override protected final void onComponentTag ( final ComponentTag tag ) { } @ Override public boolean isTransparentResolver ( ) { } } public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag . isAutolinkEnabled ( ) ) { final Component link = resolveAutomaticLink ( container , AUTOLINK_ID , tag ) ; <START_BUG> container . autoAdd ( link ) ; <END_BUG> if ( AutoLinkResolver . log . isDebugEnabled ( ) ) { AutoLinkResolver . log . debug ( ( "Added<seq2seq4repair_space>autolink<seq2seq4repair_space>" + link ) ) ; } return true ; } return false ; } private final Component resolveAutomaticLink ( final MarkupContainer container , final String id , final ComponentTag tag ) { } public static final void addTagReferenceResolver ( final String tagName , final String attributeName , final AutoLinkResolver . IAutolinkResolverDelegate resolver ) { } public static final AutoLinkResolver . IAutolinkResolverDelegate getAutolinkResolverDelegate ( final String tagName ) { } }

Fix:
link . autoAdded ( ) ;