Buggy code:
public final class PortletModule { public static void bind ( ServiceBinder binder ) { } @ Decorate ( serviceInterface = ComponentResourceLocator . class ) public static Object customComponentResourceLocator ( ComponentResourceLocator delegate , @ ContextProvider AssetFactory assetFactory , ComponentClassResolver componentClassResolver , @ Symbol ( SymbolConstants . APPLICATION_FOLDER ) String applicationFolder ) { } public PortletRequest build ( PortletRequestGlobals portletGlobals , PropertyShadowBuilder shadowBuilder ) { } public static void contributeFactoryDefaults ( MappedConfiguration < String , String > configuration ) { } public PortletApplicationInitializer build ( Logger logger , List < PortletApplicationInitializerFilter > configuration , @ InjectService ( "ApplicationGlobals" ) final ApplicationGlobals applicationGlobals , @ InjectService ( "ApplicationInitializer" ) final ApplicationInitializer initializer , @ InjectService ( "PipelineBuilder" ) PipelineBuilder builder ) { } public PortletActionRequestHandler build ( Logger logger , List < PortletActionRequestFilter > configuration , @ InjectService ( "PipelineBuilder" ) PipelineBuilder builder , final PortletPageResolver pageResolver , @ InjectService ( "RequestGlobals" ) final RequestGlobals requestGlobals , @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals , @ InjectService ( "RequestHandler" ) final RequestHandler handler , final PortalUtilities portalUtil , @ Primary final SessionPersistedObjectAnalyzer analyzer , final Logger log ) { } public PortletRenderRequestHandler build ( List < PortletRenderRequestFilter > configuration , @ InjectService ( "PipelineBuilder" ) PipelineBuilder builder , final PortletPageResolver pageResolver , @ InjectService ( "RequestGlobals" ) final RequestGlobals requestGlobals , @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals , @ InjectService ( "RequestHandler" ) final RequestHandler handler , Logger logger , @ Primary final SessionPersistedObjectAnalyzer analyzer , @ Inject @ Symbol ( SymbolConstants . EXCEPTION_REPORT_PAGE ) final String exceptionPage , final PortalUtilities portalUtil , final RequestPageCache pageCache , final Logger log ) { } public PortletResourceRequestHandler build ( List < PortletResourceRequestFilter > configuration , @ InjectService ( "PipelineBuilder" ) PipelineBuilder builder , final PortletPageResolver pageResolver , @ InjectService ( "RequestGlobals" ) final RequestGlobals requestGlobals , @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals , @ InjectService ( "RequestHandler" ) final RequestHandler handler , @ Primary final SessionPersistedObjectAnalyzer analyzer , final PortalUtilities portalUtil , final Logger log ) { } public PortletEventRequestHandler buildPortletEventRequestHandler ( List < PortletEventRequestFilter > configuration , @ InjectService ( "PipelineBuilder" ) PipelineBuilder builder , final PortletPageResolver pageResolver , @ InjectService ( "RequestGlobals" ) final RequestGlobals requestGlobals , @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals , @ InjectService ( "RequestHandler" ) final RequestHandler handler , @ Primary final SessionPersistedObjectAnalyzer analyzer , final RequestPageCache pageCache , @ Local final PortletLinkSource linkSource , final PortalUtilities portalUtil , final Logger log ) { } @ Marker ( { Portlet . class } ) public PortletResponseRenderer buildPortletResponseRenderer ( PortletRequestGlobals portletGlobals , MarkupWriterFactory markupWriterFactory , PageMarkupRenderer markupRenderer , PageContentTypeAnalyzer pageContentTypeAnalyzer , Response response ) { } public CookieSource buildPortletCookieSource ( @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals ) { } public CookieSink buildPortletCookieSink ( @ InjectService ( "PortletRequestGlobals" ) final PortletRequestGlobals portletRequestGlobals ) { } public void contributeMarkupRenderer ( OrderedConfiguration < MarkupRendererFilter > configuration , final Environment environment , final Request request , final PortletRequestGlobals globals , final JavaScriptStackSource javascriptStackSource , final JavaScriptStackPathConstructor javascriptStackPathConstructor , final PortletIdAllocatorFactory iaFactory ) { } public void contributePartialMarkupRenderer ( OrderedConfiguration < PartialMarkupRendererFilter > configuration , @ Path ( "${tapestry.spacer-image}" ) final Asset spacerImage , final SymbolSource symbolSource , final AssetSource assetSource , final Environment environment , final PortletIdAllocatorFactory iaFactory , final JavaScriptStackSource javascriptStackSource , final JavaScriptStackPathConstructor javascriptStackPathConstructor ) { PartialMarkupRendererFilter javascriptSupport = new PartialMarkupRendererFilter ( ) { public void renderMarkup ( MarkupWriter writer , JSONObject reply , PartialMarkupRenderer renderer ) { <START_BUG> String uid = Long . toHexString ( System . currentTimeMillis ( ) ) ; <END_BUG> String namespace = "_" + uid ; IdAllocator idAllocator = iaFactory . getNewPortletIdAllocator ( namespace ) ; DocumentLinker linker = environment . peekRequired ( DocumentLinker . class ) ; JavaScriptSupportImpl support = new JavaScriptSupportImpl ( linker , javascriptStackSource , javascriptStackPathConstructor , idAllocator , true ) ; environment . push ( JavaScriptSupport . class , support ) ; renderer . renderMarkup ( writer , reply ) ; environment . pop ( JavaScriptSupport . class ) ; support . commit ( ) ; } } ; configuration . override ( "JavaScriptSupport" , javascriptSupport , "after:DocumentLinker" ) ; } public void contributePageRenderRequestHandler ( OrderedConfiguration < PageRenderRequestFilter > configuration , @ Portlet PortletPageRenderRequestHandler portletHandler , PortletRequestGlobals globals , Logger log ) { } public void contributeComponentEventRequestHandler ( OrderedConfiguration < ComponentEventRequestFilter > configuration , @ Portlet ComponentEventRequestHandler portletHandler , PortletRequestGlobals globals , Request request , Logger log ) { } @ Marker ( { Portlet . class } ) public PortletPageRenderRequestHandler buildPortletPageRenderRequestHandler ( List < PageRenderRequestFilter > configuration , @ Autobuild PortletPageRenderRequestHandlerImpl terminator , PipelineBuilder pipelineBuilder , Logger log ) { } @ Marker ( { Portlet . class } ) public ComponentEventRequestHandler buildPortletComponentEventRequestHandler ( List < ComponentEventRequestFilter > configuration , @ Autobuild PortletComponentEventRequestHandler terminator , PipelineBuilder pipelineBuilder , Logger logger ) { } @ Marker ( Portlet . class ) public ComponentEventResultProcessor buildPorletComponentEventResultProcessor ( Map < Class , ComponentEventResultProcessor > configuration , StrategyBuilder strategyBuilder ) { } public void contributePorletComponentEventResultProcessor ( MappedConfiguration < Class , ComponentEventResultProcessor > configuration , final PortletRequestGlobals portletGlobals ) { } private ComponentEventResultProcessor constructComponentEventResultProcessor ( Map < Class , ComponentEventResultProcessor > configuration , StrategyBuilder strategyBuilder ) { } public void contributeServiceOverride ( MappedConfiguration < Class , Object > configuration , @ InjectService ( "PortletCookieSource" ) final CookieSource cookieSource , @ InjectService ( "PortletCookieSink" ) final CookieSink cookieSink , @ InjectService ( "PortletLinkSource" ) final PortletLinkSource linkSource , @ InjectService ( "PortletRequestSelectorAnalyzer" ) final ComponentRequestSelectorAnalyzer analyzer ) { } @ Advise ( serviceInterface = Environment . class ) public static void adaptFormSupport ( MethodAdviceReceiver receiver , final PortletRequestGlobals globals ) throws NoSuchMethodException , SecurityException { } @ Match ( "RequestExceptionHandler" ) public RequestExceptionHandler decorateRequestExceptionHandler ( final RequestExceptionHandler delegate , final PortletRequestGlobals globals , final RequestGlobals requestGlobals , @ Inject @ Symbol ( SymbolConstants . EXCEPTION_REPORT_PAGE ) final String exceptionPage , final Logger log ) { } public static void contributePortletResourceResponseIdentifier ( Configuration < DeclaredResourceResponseSender > configuration ) { }

Fix:
String uid = Long . toHexString ( System . nanoTime ( ) ) ;