Buggy code:
public class EJBSecurityViewConfigurator implements ViewConfigurator { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription viewDescription , ViewConfiguration viewConfiguration ) throws DeploymentUnitProcessingException { if ( ( ( componentConfiguration . getComponentDescription ( ) ) instanceof EJBComponentDescription ) == false ) { throw EjbMessages . MESSAGES . invalidEjbComponent ( componentConfiguration . getComponentName ( ) , componentConfiguration . getComponentClass ( ) ) ; } final DeploymentReflectionIndex deploymentReflectionIndex = context . getDeploymentUnit ( ) . getAttachment ( REFLECTION_INDEX ) ; final EJBComponentDescription ejbComponentDescription = ( ( EJBComponentDescription ) ( componentConfiguration . getComponentDescription ( ) ) ) ; if ( ! ( ejbComponentDescription . isSecurityEnabled ( ) ) ) { EjbLogger . ROOT_LOGGER . debug ( ( ( "Security<seq2seq4repair_space>is<seq2seq4repair_space>*not*<seq2seq4repair_space>enabled<seq2seq4repair_space>on<seq2seq4repair_space>EJB:<seq2seq4repair_space>" + ( ejbComponentDescription . getEJBName ( ) ) ) + ",<seq2seq4repair_space>no<seq2seq4repair_space>security<seq2seq4repair_space>interceptors<seq2seq4repair_space>will<seq2seq4repair_space>apply" ) ) ; return ; } final String viewClassName = viewDescription . getViewClassName ( ) ; viewConfiguration . addViewInterceptor ( new SecurityContextInterceptorFactory ( ) , SECURITY_CONTEXT ) ; final EJBViewDescription ejbViewDescription = ( ( EJBViewDescription ) ( viewDescription ) ) ; final List < Method > viewMethods = viewConfiguration . getProxyFactory ( ) . getCachedMethods ( ) ; for ( final Method viewMethod : viewMethods ) { if ( ! ( Modifier . isPublic ( viewMethod . getModifiers ( ) ) ) ) { continue ; } if ( ( viewMethod . getDeclaringClass ( ) ) == ( WriteReplaceInterface . class ) ) { continue ; } <START_BUG> EJBMethodSecurityMetaData ejbMethodSecurityMetaData = ejbComponentDescription . getMethodPermissions ( ) . getViewAttribute ( ejbViewDescription . getMethodIntf ( ) , viewMethod . getName ( ) , MethodIdentifier . getIdentifierForMethod ( viewMethod ) . getParameterTypes ( ) ) ; <END_BUG> if ( ejbMethodSecurityMetaData == null ) { ejbMethodSecurityMetaData = ejbComponentDescription . getMethodPermissions ( ) . getViewAttribute ( BEAN , viewMethod . getName ( ) , MethodIdentifier . getIdentifierForMethod ( viewMethod ) . getParameterTypes ( ) ) ; } if ( ejbMethodSecurityMetaData == null ) { final Method classMethod = ClassReflectionIndexUtil . findMethod ( deploymentReflectionIndex , componentConfiguration . getComponentClass ( ) , viewMethod ) ; if ( classMethod != null ) { ejbMethodSecurityMetaData = ejbComponentDescription . getMethodPermissions ( ) . getAttribute ( ejbViewDescription . getMethodIntf ( ) , classMethod . getDeclaringClass ( ) . getName ( ) , classMethod . getName ( ) , MethodIdentifier . getIdentifierForMethod ( classMethod ) . getParameterTypes ( ) ) ; if ( ejbMethodSecurityMetaData == null ) { ejbMethodSecurityMetaData = ejbComponentDescription . getMethodPermissions ( ) . getAttribute ( BEAN , classMethod . getDeclaringClass ( ) . getName ( ) , classMethod . getName ( ) , MethodIdentifier . getIdentifierForMethod ( classMethod ) . getParameterTypes ( ) ) ; } } } if ( ejbMethodSecurityMetaData != null ) { final Interceptor authorizationInterceptor = new AuthorizationInterceptor ( ejbMethodSecurityMetaData , viewClassName , viewMethod ) ; viewConfiguration . addViewInterceptor ( viewMethod , new org . jboss . invocation . ImmediateInterceptorFactory ( authorizationInterceptor ) , EJB_SECURITY_AUTHORIZATION_INTERCEPTOR ) ; } } } }

Fix:
EJBMethodSecurityAttribute ejbMethodSecurityMetaData = ejbComponentDescription . getMethodPermissions ( ) . getViewAttribute ( ejbViewDescription . getMethodIntf ( ) , viewMethod . getName ( ) , MethodIdentifier . getIdentifierForMethod ( viewMethod ) . getParameterTypes ( ) ) ;