Buggy code:
private CookieValuePersisterSettings cookieValuePersisterSettings = new CookieValuePersisterSettings ( ) ; private ICryptFactory cryptFactory ; private String defaultAfterDisabledLink = "<//em>" ; private String defaultBeforeDisabledLink = "<em>" ; private Locale defaultLocale = Locale . getDefault ( ) ; private String defaultMarkupEncoding ; private Class internalErrorPage ; private Localizer localizer ; private IMarkupParserFactory markupParserFactory ; private int maxPageMaps = 20 ; private int maxPageVersions = Integer . MAX_VALUE ; private Map nameToResourceFactory = new HashMap ( ) ; private boolean overriddenStringResourceLoaders = false ; private Class pageExpiredErrorPage ; private IPageFactory pageFactory = new DefaultPageFactory ( ) ; private IPageMapEvictionStrategy pageMapEvictionStrategy = new LeastRecentlyAccessedEvictionStrategy ( 5 ) ; private IPropertiesFactory propertiesFactory ; private RenderStrategy renderStrategy = REDIRECT_TO_BUFFER ; private IResourceFinder resourceFinder = new Path ( ) ; private Duration resourcePollFrequency = null ; private IResourceStreamLocator resourceStreamLocator ; private ModificationWatcher resourceWatcher ; private List responseFilters ; private String responseRequestEncoding = "UTF-8" ; private ISessionStoreFactory sessionStoreFactory = new ISessionStoreFactory ( ) { public ISessionStore newSessionStore ( Session session ) { } } ; private List stringResourceLoaders = new ArrayList ( 4 ) ; private boolean stripComments = false ; private boolean throwExceptionOnMissingResource = true ; private IUnauthorizedComponentInstantiationListener unauthorizedComponentInstantiationListener = new IUnauthorizedComponentInstantiationListener ( ) { public void onUnauthorizedInstantiation ( final Component component ) { } } ; private UnexpectedExceptionDisplay unexpectedExceptionDisplay = SHOW_EXCEPTION_PAGE ; private boolean useDefaultOnMissingResource = true ; private boolean versionPagesByDefault = true ; private String contextPath ; public Settings ( final Application application ) { } public void addComponentResolver ( IComponentResolver resolver ) { } public void addResourceFactory ( final String name , IResourceFactory resourceFactory ) { } public void addResourceFolder ( final String resourceFolder ) { } public void addResponseFilter ( IResponseFilter responseFilter ) { } public void addStringResourceLoader ( final IStringResourceLoader loader ) { } public Class getAccessDeniedPage ( ) { } public IAuthorizationStrategy getAuthorizationStrategy ( ) { } public boolean getAutomaticLinking ( ) { } public boolean getBufferResponse ( ) { } public IClassResolver getClassResolver ( ) { } public List getComponentResolvers ( ) { } public boolean getComponentUseCheck ( ) { } public boolean getCompressWhitespace ( ) { } public String getContextPath ( ) { } public IConverterFactory getConverterFactory ( ) { } public CookieValuePersisterSettings getCookieValuePersisterSettings ( ) { } public synchronized ICryptFactory getCryptFactory ( ) { } public String getDefaultAfterDisabledLink ( ) { } public String getDefaultBeforeDisabledLink ( ) { } public Locale getDefaultLocale ( ) { } public String getDefaultMarkupEncoding ( ) { } public Class getInternalErrorPage ( ) { } public Localizer getLocalizer ( ) { } public IMarkupParserFactory getMarkupParserFactory ( ) { } public final int getMaxPageMaps ( ) { } public int getMaxPageVersions ( ) { } public Class getPageExpiredErrorPage ( ) { } public IPageFactory getPageFactory ( ) { } public IPageMapEvictionStrategy getPageMapEvictionStrategy ( ) { } public IPropertiesFactory getPropertiesFactory ( ) { } public RenderStrategy getRenderStrategy ( ) { } public IResourceFactory getResourceFactory ( final String name ) { } public IResourceFinder getResourceFinder ( ) { } public Duration getResourcePollFrequency ( ) { } public IResourceStreamLocator getResourceStreamLocator ( ) { } public ModificationWatcher getResourceWatcher ( ) { } public List getResponseFilters ( ) { } public String getResponseRequestEncoding ( ) { } public ISessionStoreFactory getSessionStoreFactory ( ) { } public List getStringResourceLoaders ( ) { } public boolean getStripComments ( ) { } public boolean getStripWicketTags ( ) { } public boolean getStripXmlDeclarationFromOutput ( ) { } public boolean getThrowExceptionOnMissingResource ( ) { } public IUnauthorizedComponentInstantiationListener getUnauthorizedComponentInstantiationListener ( ) { } public UnexpectedExceptionDisplay getUnexpectedExceptionDisplay ( ) { } public boolean getUseDefaultOnMissingResource ( ) { } public boolean getVersionPagesByDefault ( ) { } public void setAccessDeniedPage ( Class accessDeniedPage ) { } public void setAuthorizationStrategy ( IAuthorizationStrategy strategy ) { } public void setAutomaticLinking ( boolean automaticLinking ) { } public void setBufferResponse ( boolean bufferResponse ) { } public void setClassResolver ( final IClassResolver defaultClassResolver ) { } public void setComponentUseCheck ( final boolean componentUseCheck ) { } public void setCompressWhitespace ( final boolean compressWhitespace ) { } public void setContextPath ( String contextPath ) { if ( contextPath != null ) { <START_BUG> if ( ! ( contextPath . startsWith ( "//" ) ) ) { <END_BUG> this . contextPath = "//" + contextPath ; } else { this . contextPath = contextPath ; } } } public void setConverterFactory ( IConverterFactory factory ) { } public void setCookieValuePersisterSettings ( CookieValuePersisterSettings cookieValuePersisterSettings ) { } public void setCryptFactory ( ICryptFactory cryptFactory ) { } public void setDefaultAfterDisabledLink ( final String defaultAfterDisabledLink ) { } public void setDefaultBeforeDisabledLink ( String defaultBeforeDisabledLink ) { } public void setDefaultLocale ( Locale defaultLocale ) { } public void setDefaultMarkupEncoding ( final String encoding ) { } public void setInternalErrorPage ( final Class internalErrorPage ) { } public void setMarkupParserFactory ( IMarkupParserFactory factory ) { } public final void setMaxPageMaps ( int maxPageMaps ) { } public void setMaxPageVersions ( int maxPageVersions ) { } public void setPageExpiredErrorPage ( final Class pageExpiredErrorPage ) { } public void setPageFactory ( final IPageFactory defaultPageFactory ) { } public void setPageMapEvictionStrategy ( IPageMapEvictionStrategy pageMapEvictionStrategy ) { } public void setPropertiesFactory ( IPropertiesFactory factory ) { } public void setRenderStrategy ( IRequestCycleSettings . RenderStrategy renderStrategy ) { } public void setResourceFinder ( final IResourceFinder resourceFinder ) { } public void setResourcePollFrequency ( final Duration resourcePollFrequency ) { } public void setResourceStreamLocator ( IResourceStreamLocator resourceStreamLocator ) { } public void setResponseRequestEncoding ( final String responseRequestEncoding ) { } public void setSessionStoreFactory ( ISessionStoreFactory sessionStoreFactory ) { } public void setStripComments ( boolean stripComments ) { } public void setStripWicketTags ( boolean stripWicketTags ) { } public void setStripXmlDeclarationFromOutput ( final boolean strip ) { } public void setThrowExceptionOnMissingResource ( final boolean throwExceptionOnMissingResource ) { } public void setUnauthorizedComponentInstantiationListener ( IUnauthorizedComponentInstantiationListener unauthorizedComponentInstantiationListener ) { } public void setUnexpectedExceptionDisplay ( final UnexpectedExceptionDisplay unexpectedExceptionDisplay ) { } public void setUseDefaultOnMissingResource ( final boolean useDefaultOnMissingResource ) { } public void setVersionPagesByDefault ( boolean pagesVersionedByDefault ) { } private void checkPageClass ( final Class pageClass ) { } }

Fix:
if ( ( ! ( contextPath . startsWith ( "//" ) ) ) && ( ! ( contextPath . startsWith ( "http:" ) ) ) ) {