Buggy code:
private Map < MethodIdentifier , Boolean > excludeDefaultContainerInterceptorsForMethod = new HashMap < MethodIdentifier , Boolean > ( ) ; private Map < MethodIdentifier , Boolean > excludeClassLevelContainerInterceptorsForMethod = new HashMap < MethodIdentifier , Boolean > ( ) ; private Set < InterceptorDescription > allContainerInterceptors ; private Boolean missingMethodPermissionsDenyAccess = null ; public EJBComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbJarDescription , final ServiceName deploymentUnitServiceName , final EnterpriseBeanMetaData descriptorData ) { } public void addLocalHome ( final String localHome ) { } public void addRemoteHome ( final String remoteHome ) { } public void addEjbLocalObjectView ( final String viewClassName ) { } public void addEjbObjectView ( final String viewClassName ) { } public TransactionManagementType getTransactionManagementType ( ) { } public void setTransactionManagementType ( TransactionManagementType transactionManagementType ) { } public String getEJBName ( ) { } public String getEJBClassName ( ) { } protected void setupViewInterceptors ( final EJBViewDescription view ) { } private void setupRemoteViewInterceptors ( final EJBViewDescription view ) { } protected void setupClientViewInterceptors ( ViewDescription view ) { } protected abstract void addCurrentInvocationContextFactory ( ) { } protected abstract void addCurrentInvocationContextFactory ( ViewDescription view ) { } protected void addRemoteTransactionsRepositoryDependency ( ) { } protected void addTransactionManagerDependencies ( ) { } protected void addServerSecurityManagerDependency ( ) { } protected void setupSecurityInterceptors ( final ViewDescription view ) { } private void addToStringMethodInterceptor ( final ViewDescription view ) { } public boolean isEntity ( ) { } public boolean isMessageDriven ( ) { } public boolean isSession ( ) { } public boolean isSingleton ( ) { } public boolean isStateful ( ) { } public boolean isStateless ( ) { } public void addDeclaredRoles ( String ... roles ) { } public void setDeclaredRoles ( Collection < String > roles ) { } public Set < String > getDeclaredRoles ( ) { } public void setRunAs ( String role ) { } public String getRunAs ( ) { } public void setRunAsPrincipal ( String principal ) { } public String getRunAsPrincipal ( ) { } public void setSecurityDomain ( String securityDomain ) { } public void setDefaultSecurityDomain ( final String defaultSecurityDomain ) { } public String getSecurityDomain ( ) { } public boolean isExplicitSecurityDomainConfigured ( ) { } public void setMissingMethodPermissionsDenyAccess ( Boolean missingMethodPermissionsDenyAccess ) { } public Boolean isMissingMethodPermissionsDeniedAccess ( ) { } public SecurityRolesMetaData getSecurityRoles ( ) { } public void setSecurityRoles ( SecurityRolesMetaData securityRoles ) { } public void linkSecurityRoles ( final String fromRole , final String toRole ) { } protected EJBViewDescription registerView ( final String viewClassName , final MethodIntf viewType ) { } protected EJBViewDescription registerView ( final String viewClassName , final MethodIntf viewType , final boolean ejb2xView ) { } protected void setupRemoteView ( final EJBViewDescription viewDescription ) { } public Map < String , Collection < String > > getSecurityRoleLinks ( ) { } public boolean isSecurityEnabled ( ) { } private static class Ejb2ViewTypeConfigurator implements ViewConfigurator { private final Ejb2xViewType local ; public Ejb2ViewTypeConfigurator ( final Ejb2xViewType local ) { } @ Override public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , final ViewDescription description , final ViewConfiguration configuration ) throws DeploymentUnitProcessingException { } } private class EjbJarConfigurationConfigurator implements ComponentConfigurator { @ Override public void configure ( DeploymentPhaseContext context , ComponentDescription description , ComponentConfiguration configuration ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = context . getDeploymentUnit ( ) ; final ApplicationExceptions appExceptions = deploymentUnit . getAttachment ( APPLICATION_EXCEPTION_DETAILS ) ; if ( appExceptions == null ) { throw EjbMessages . MESSAGES . ejbJarConfigNotFound ( deploymentUnit ) ; } final EJBComponentCreateServiceFactory ejbComponentCreateServiceFactory = ( ( EJBComponentCreateServiceFactory ) ( configuration . getComponentCreateServiceFactory ( ) ) ) ; ejbComponentCreateServiceFactory . setEjbJarConfiguration ( appExceptions ) ; } } private class SecurityDomainDependencyConfigurator implements ComponentConfigurator { private final EJBComponentDescription ejbComponentDescription ; SecurityDomainDependencyConfigurator ( final EJBComponentDescription ejbComponentDescription ) { } @ Override public void configure ( DeploymentPhaseContext context , ComponentDescription description , ComponentConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . getCreateDependencies ( ) . add ( new org . jboss . as . ee . component . DependencyConfigurator < org . jboss . msc . service . Service < Component > > ( ) { @ Override public void configureDependency ( ServiceBuilder < ? > serviceBuilder , org . jboss . msc . service . Service < Component > service ) throws DeploymentUnitProcessingException { final String securityDomainName = EJBComponentDescription . SecurityDomainDependencyConfigurator . this . ejbComponentDescription . getSecurityDomain ( ) ; <START_BUG> if ( securityDomainName != null ) { <END_BUG> final ServiceName securityDomainServiceName = SERVICE_NAME . append ( securityDomainName ) ; serviceBuilder . addDependency ( securityDomainServiceName ) ; } } } ) ; } } private static class ToStringMethodInterceptor implements Interceptor { private final String name ; public ToStringMethodInterceptor ( final String name ) { } @ Override public Object processInvocation ( InterceptorContext context ) throws Exception { } } public TimerService getTimerService ( ) { } public void setTimerService ( final TimerService timerService ) { } public EnterpriseBeanMetaData getDescriptorData ( ) { } public Method getTimeoutMethod ( ) { } public void setTimeoutMethod ( final Method timeoutMethod ) { } public Map < Method , List < AutoTimer > > getScheduleMethods ( ) { } public void addScheduleMethod ( final Method method , final AutoTimer timer ) { } public EJBViewDescription getEjbLocalView ( ) { } public EjbHomeViewDescription getEjbLocalHomeView ( ) { } public EjbHomeViewDescription getEjbHomeView ( ) { } public EJBViewDescription getEjbRemoteView ( ) { } public boolean isExposedViaIiop ( ) { } public void setExposedViaIiop ( final boolean exposedViaIiop ) { } public ApplicableMethodInformation < TransactionAttributeType > getTransactionAttributes ( ) { } public ApplicableMethodInformation < Integer > getTransactionTimeouts ( ) { } public ApplicableMethodInformation < EJBMethodSecurityAttribute > getDescriptorMethodPermissions ( ) { } public ApplicableMethodInformation < EJBMethodSecurityAttribute > getAnnotationMethodPermissions ( ) { } public ShutDownInterceptorFactory getShutDownInterceptorFactory ( ) { } public void setDefaultContainerInterceptors ( final List < InterceptorDescription > defaultInterceptors ) { } public List < InterceptorDescription > getDefaultContainerInterceptors ( ) { }

Fix:
if ( ( securityDomainName != null ) && ( ! ( securityDomainName . isEmpty ( ) ) ) ) {