Buggy code:
public abstract class EJBComponent extends BasicComponent { private static final Logger log = Logger . getLogger ( EJBComponent . class ) ; private static final ApplicationExceptionDetails APPLICATION_EXCEPTION = new ApplicationExceptionDetails ( "java.lang.Exception" , true , false ) ; private final Map < MethodTransactionAttributeKey , TransactionAttributeType > txAttrs ; private final EJBUtilities utilities ; private final boolean isBeanManagedTransaction ; private final Map < Class < ? > , ApplicationExceptionDetails > applicationExceptions ; private final EJBSecurityMetaData securityMetaData ; private final Map < String , ServiceName > viewServices ; private final ServiceName ejbLocalHomeViewServiceName ; private final ServiceName ejbHomeViewServiceName ; private final ServiceName ejbObjectViewServiceName ; private final ServiceName ejbLocalObjectViewServiceName ; private final TimerService timerService ; private final Map < Method , InterceptorFactory > timeoutInterceptors ; private final Method timeoutMethod ; private final String applicationName ; private final String earApplicationName ; private final String moduleName ; private final String distinctName ; private final EJBRemoteTransactionsRepository ejbRemoteTransactionsRepository ; protected EJBComponent ( final EJBComponentCreateService ejbComponentCreateService ) { } protected < T > T createViewInstanceProxy ( final Class < T > viewInterface , final Map < Object , Object > contextData ) { } protected < T > T createViewInstanceProxy ( final Class < T > viewInterface , final Map < Object , Object > contextData , final ServiceName serviceName ) { } public ApplicationExceptionDetails getApplicationException ( Class < ? > exceptionClass , Method invokedMethod ) { } public Principal getCallerPrincipal ( ) { } protected TransactionAttributeType getCurrentTransactionAttribute ( ) { } public EJBHome getEJBHome ( ) throws IllegalStateException { } public Class < ? > getEjbObjectType ( ) { } public Class < ? > getEjbLocalObjectType ( ) { } public EJBLocalHome getEJBLocalHome ( ) throws IllegalStateException { } public boolean getRollbackOnly ( ) throws IllegalStateException { } public SimpleSecurityManager getSecurityManager ( ) { } public TimerService getTimerService ( ) throws IllegalStateException { } public TransactionAttributeType getTransactionAttributeType ( final MethodIntf methodIntf , final Method method ) { } public TransactionManager getTransactionManager ( ) { } public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry ( ) { } public int getTransactionTimeout ( Method method ) { } public UserTransaction getUserTransaction ( ) throws IllegalStateException { } private boolean isBeanManagedTransaction ( ) { } public boolean isCallerInRole ( final String roleName ) throws IllegalStateException { <START_BUG> return utilities . getSecurityManager ( ) . isCallerInRole ( securityMetaData . getSecurityRoles ( ) , roleName ) ; <END_BUG> } public Object lookup ( String name ) throws IllegalArgumentException { } public void setRollbackOnly ( ) throws IllegalStateException { } public EJBSecurityMetaData getSecurityMetaData ( ) { } public Method getTimeoutMethod ( ) { } public String getApplicationName ( ) { } public String getEarApplicationName ( ) { } public String getDistinctName ( ) { } public String getModuleName ( ) { } public ServiceName getEjbLocalObjectViewServiceName ( ) { } public ServiceName getEjbLocalHomeViewServiceName ( ) { } public ServiceName getEjbHomeViewServiceName ( ) { } public ServiceName getEjbObjectViewServiceName ( ) { } public Map < Method , InterceptorFactory > getTimeoutInterceptors ( ) { } public EJBRemoteTransactionsRepository getEjbRemoteTransactionsRepository ( ) { } }

Fix:
return utilities . getSecurityManager ( ) . isCallerInRole ( securityMetaData . getSecurityRoles ( ) , securityMetaData . getSecurityRoleLinks ( ) , roleName ) ;