Buggy code:
public class CacheContainerAdd extends AbstractAddStepHandler { private static final Logger log = Logger . getLogger ( CacheContainerAdd . class . getPackage ( ) . getName ( ) ) ; public static final CacheContainerAdd INSTANCE = new CacheContainerAdd ( ) ; static ModelNode createOperation ( ModelNode address , ModelNode existing ) { } private static void populate ( ModelNode source , ModelNode target ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { model = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; String defaultCache = model . require ( DEFAULT_CACHE ) . asString ( ) ; boolean hasTransport = ( model . hasDefined ( TRANSPORT ) ) && ( model . get ( TRANSPORT ) . hasDefined ( TRANSPORT_NAME ) ) ; CacheContainerAdd . Transport transportConfig = ( hasTransport ) ? new CacheContainerAdd . Transport ( ) : null ; CacheContainerAdd . EmbeddedCacheManagerDependencies dependencies = new CacheContainerAdd . EmbeddedCacheManagerDependencies ( transportConfig ) ; ServiceName [ ] aliases = null ; if ( model . hasDefined ( ALIASES ) ) { List < ModelNode > list = operation . get ( ALIASES ) . asList ( ) ; aliases = new ServiceName [ list . size ( ) ] ; for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { aliases [ i ] = EmbeddedCacheManagerService . getServiceName ( list . get ( i ) . asString ( ) ) ; } } ServiceController . Mode initialMode = ( model . hasDefined ( START ) ) ? StartMode . valueOf ( model . get ( START ) . asString ( ) ) . getMode ( ) : Mode . ON_DEMAND ; ServiceTarget target = context . getServiceTarget ( ) ; ServiceName serviceName = EmbeddedCacheManagerService . getServiceName ( name ) ; ServiceBuilder < EmbeddedCacheManager > containerBuilder = target . addService ( serviceName , new EmbeddedCacheManagerService ( name , defaultCache , dependencies ) ) . addDependency ( OPTIONAL , JBOSS . append ( "mbean" , "server" ) , MBeanServer . class , dependencies . getMBeanServerInjector ( ) ) . addAliases ( aliases ) . setInitialMode ( initialMode ) ; String jndiName = ( model . hasDefined ( JNDI_NAME ) ? InfinispanJndiName . toJndiName ( model . get ( JNDI_NAME ) . asString ( ) ) : InfinispanJndiName . defaultCacheContainerJndiName ( name ) ) . getAbsoluteName ( ) ; ContextNames . BindInfo bindInfo = ContextNames . bindInfoFor ( jndiName ) ; BinderService binder = new BinderService ( bindInfo . getBindName ( ) ) ; <START_BUG> ServiceBuilder < ManagedReferenceFactory > binderBuilder = target . addService ( bindInfo . getBinderServiceName ( ) , binder ) . addAliases ( JAVA_CONTEXT_SERVICE_NAME . append ( jndiName ) ) . addDependency ( serviceName , CacheContainer . class , new org . jboss . as . naming . ManagedReferenceInjector < CacheContainer > ( binder . getManagedObjectInjector ( ) ) ) . addDependency ( bindInfo . getParentContextServiceName ( ) , ServiceBasedNamingStore . class , binder . getNamingStoreInjector ( ) ) . setInitialMode ( initialMode ) ; <END_BUG> newControllers . add ( binderBuilder . install ( ) ) ; if ( hasTransport ) { String stack = null ; ModelNode transport = model . get ( TRANSPORT , TRANSPORT_NAME ) ; if ( transport . hasDefined ( STACK ) ) { stack = transport . get ( STACK ) . asString ( ) ; } if ( transport . hasDefined ( LOCK_TIMEOUT ) ) { transportConfig . setLockTimeout ( transport . get ( LOCK_TIMEOUT ) . asLong ( ) ) ; } addExecutorDependency ( containerBuilder , transport , EXECUTOR , transportConfig . getExecutorInjector ( ) ) ; ServiceName channelServiceName = ChannelService . getServiceName ( name ) ; containerBuilder . addDependency ( channelServiceName , Channel . class , transportConfig . getChannelInjector ( ) ) ; InjectedValue < ChannelFactory > channelFactory = new InjectedValue < ChannelFactory > ( ) ; ServiceBuilder < Channel > channelBuilder = target . addService ( channelServiceName , new ChannelService ( name , channelFactory ) ) . addDependency ( ChannelFactoryService . getServiceName ( stack ) , ChannelFactory . class , channelFactory ) . setInitialMode ( ON_DEMAND ) ; newControllers . add ( channelBuilder . install ( ) ) ; } addExecutorDependency ( containerBuilder , model , LISTENER_EXECUTOR , dependencies . getListenerExecutorInjector ( ) ) ; addScheduledExecutorDependency ( containerBuilder , model , EVICTION_EXECUTOR , dependencies . getEvictionExecutorInjector ( ) ) ; addScheduledExecutorDependency ( containerBuilder , model , REPLICATION_QUEUE_EXECUTOR , dependencies . getReplicationQueueExecutorInjector ( ) ) ; newControllers . add ( containerBuilder . install ( ) ) ; CacheContainerAdd . log . debugf ( "%s<seq2seq4repair_space>cache<seq2seq4repair_space>container<seq2seq4repair_space>installed" , name ) ; } private void addExecutorDependency ( ServiceBuilder < EmbeddedCacheManager > builder , ModelNode model , String key , Injector < Executor > injector ) { } private void addScheduledExecutorDependency ( ServiceBuilder < EmbeddedCacheManager > builder , ModelNode model , String key , Injector < ScheduledExecutorService > injector ) { } static class EmbeddedCacheManagerDependencies implements EmbeddedCacheManagerService . Dependencies { private final InjectedValue < MBeanServer > mbeanServer = new InjectedValue < MBeanServer > ( ) ; private final InjectedValue < Executor > listenerExecutor = new InjectedValue < Executor > ( ) ; private final InjectedValue < ScheduledExecutorService > evictionExecutor = new InjectedValue < ScheduledExecutorService > ( ) ; private final InjectedValue < ScheduledExecutorService > replicationQueueExecutor = new InjectedValue < ScheduledExecutorService > ( ) ; private final TransportConfiguration transport ; EmbeddedCacheManagerDependencies ( EmbeddedCacheManagerService . TransportConfiguration transport ) { } Injector < MBeanServer > getMBeanServerInjector ( ) { } Injector < Executor > getListenerExecutorInjector ( ) { } Injector < ScheduledExecutorService > getEvictionExecutorInjector ( ) { }

Fix:
ServiceBuilder < ManagedReferenceFactory > binderBuilder = target . addService ( bindInfo . getBinderServiceName ( ) , binder ) . addAliases ( JAVA_CONTEXT_SERVICE_NAME . append ( jndiName ) ) . addDependency ( serviceName , CacheContainer . class , new org . jboss . as . naming . ManagedReferenceInjector < CacheContainer > ( binder . getManagedObjectInjector ( ) ) ) . addDependency ( bindInfo . getParentContextServiceName ( ) , ServiceBasedNamingStore . class , binder . getNamingStoreInjector ( ) ) . setInitialMode ( PASSIVE ) ;