Buggy code:
} if ( ( defaultSessionConfig . getDomain ( ) ) != null ) { config . setDomain ( defaultSessionConfig . getDomain ( ) ) ; } if ( ( defaultSessionConfig . getHttpOnly ( ) ) != null ) { config . setHttpOnly ( defaultSessionConfig . getHttpOnly ( ) ) ; } if ( ( defaultSessionConfig . getSecure ( ) ) != null ) { config . setSecure ( defaultSessionConfig . getSecure ( ) ) ; } if ( ( defaultSessionConfig . getMaxAge ( ) ) != null ) { config . setMaxAge ( defaultSessionConfig . getMaxAge ( ) ) ; } if ( ( defaultSessionConfig . getComment ( ) ) != null ) { config . setComment ( defaultSessionConfig . getComment ( ) ) ; } } boolean sessionTimeoutSet = false ; if ( sessionConfig != null ) { if ( sessionConfig . getSessionTimeoutSet ( ) ) { deploymentInfo . setDefaultSessionTimeout ( ( ( sessionConfig . getSessionTimeout ( ) ) * 60 ) ) ; sessionTimeoutSet = true ; } CookieConfigMetaData cookieConfig = sessionConfig . getCookieConfig ( ) ; if ( config == null ) { config = new ServletSessionConfig ( ) ; } if ( cookieConfig != null ) { if ( ( cookieConfig . getName ( ) ) != null ) { config . setName ( cookieConfig . getName ( ) ) ; } if ( ( cookieConfig . getDomain ( ) ) != null ) { config . setDomain ( cookieConfig . getDomain ( ) ) ; } if ( ( cookieConfig . getComment ( ) ) != null ) { config . setComment ( cookieConfig . getComment ( ) ) ; } config . setSecure ( cookieConfig . getSecure ( ) ) ; config . setPath ( cookieConfig . getPath ( ) ) ; config . setMaxAge ( cookieConfig . getMaxAge ( ) ) ; config . setHttpOnly ( cookieConfig . getHttpOnly ( ) ) ; } List < SessionTrackingModeType > modes = sessionConfig . getSessionTrackingModes ( ) ; if ( ( modes != null ) && ( ! ( modes . isEmpty ( ) ) ) ) { final Set < SessionTrackingMode > trackingModes = new HashSet < > ( ) ; for ( SessionTrackingModeType mode : modes ) { switch ( mode ) { case COOKIE : trackingModes . add ( COOKIE ) ; break ; case SSL : trackingModes . add ( SSL ) ; break ; case URL : trackingModes . add ( URL ) ; break ; } } config . setSessionTrackingModes ( trackingModes ) ; } } if ( ! sessionTimeoutSet ) { deploymentInfo . setDefaultSessionTimeout ( ( ( container . getValue ( ) . getDefaultSessionTimeout ( ) ) * 60 ) ) ; } if ( config != null ) { deploymentInfo . setServletSessionConfig ( config ) ; } for ( final SetupAction action : setupActions ) { deploymentInfo . addThreadSetupAction ( new UndertowDeploymentInfoService . UndertowThreadSetupAction ( action ) ) ; } if ( ( initialHandlerChainWrappers ) != null ) { for ( HandlerWrapper handlerWrapper : initialHandlerChainWrappers ) { deploymentInfo . addInitialHandlerChainWrapper ( handlerWrapper ) ; } } if ( ( innerHandlerChainWrappers ) != null ) { for ( HandlerWrapper handlerWrapper : innerHandlerChainWrappers ) { deploymentInfo . addInnerHandlerChainWrapper ( handlerWrapper ) ; } } if ( ( outerHandlerChainWrappers ) != null ) { for ( HandlerWrapper handlerWrapper : outerHandlerChainWrappers ) { deploymentInfo . addOuterHandlerChainWrapper ( handlerWrapper ) ; } } if ( ( threadSetupActions ) != null ) { for ( ThreadSetupAction threadSetupAction : threadSetupActions ) { deploymentInfo . addThreadSetupAction ( threadSetupAction ) ; } } deploymentInfo . setServerName ( ( "WildFly<seq2seq4repair_space>" + ( Version . AS_VERSION ) ) ) ; <START_BUG> if ( undertowService . getValue ( ) . statisticsEnabled ( ) ) { <END_BUG> deploymentInfo . setMetricsCollector ( new UndertowMetricsCollector ( ) ) ; } ControlPoint controlPoint = controlPointInjectedValue . getOptionalValue ( ) ; if ( controlPoint != null ) { deploymentInfo . addInitialHandlerChainWrapper ( GlobalRequestControllerHandler . wrapper ( controlPoint ) ) ; } this . deploymentInfo = deploymentInfo ; } finally { Thread . currentThread ( ) . setContextClassLoader ( oldTccl ) ; } } private void handleSecurityCache ( DeploymentInfo deploymentInfo , JBossWebMetaData mergedMetaData ) { } @ Override public synchronized void stop ( final StopContext stopContext ) { } @ Override public synchronized DeploymentInfo getValue ( ) throws IllegalArgumentException , IllegalStateException { } private void handleJASPIMechanism ( final DeploymentInfo deploymentInfo ) { } private void handleJACCAuthorization ( final DeploymentInfo deploymentInfo ) { } private void handleAdditionalAuthenticationMechanisms ( final DeploymentInfo deploymentInfo ) { } private void handleIdentityManager ( final DeploymentInfo deploymentInfo ) { } private ConfidentialPortManager getConfidentialPortManager ( ) { } private void handleDistributable ( final DeploymentInfo deploymentInfo ) { } private String resolveContextPath ( ) { } private DeploymentInfo createServletConfig ( ) throws StartException { } private void handleServletMappings ( boolean is22OrOlder , Set < String > seenMappings , Map < String , List < ServletMappingMetaData > > servletMappings , ServletInfo s ) { } private static List < AuthMethodConfig > authMethod ( String configuredMethod ) { } private static TransportGuaranteeType transportGuaranteeType ( final TransportGuaranteeType type ) { } private static HashMap < String , JspPropertyGroup > createJspConfig ( JBossWebMetaData metaData ) { } private static HashMap < String , TagLibraryInfo > createTldsInfo ( final TldsMetaData tldsMetaData , List < TldMetaData > sharedTlds ) throws ClassNotFoundException { } private static TagLibraryInfo createTldInfo ( final String location , final TldMetaData tldMetaData , final HashMap < String , TagLibraryInfo > ret ) throws ClassNotFoundException { } private static void addListener ( final ClassLoader classLoader , final ComponentRegistry components , final DeploymentInfo d , final ListenerMetaData listener ) throws ClassNotFoundException { } private static < T > InstanceFactory < T > createInstanceFactory ( final ManagedReferenceFactory creator ) { } public void addInjectedExecutor ( final String name , final InjectedValue < Executor > injected ) { } public InjectedValue < ServletContainerService > getContainer ( ) { }

Fix:
if ( undertowService . getValue ( ) . isStatisticsEnabled ( ) ) {