Buggy code:
private TransactionManagementType transactionManagementType = TransactionManagementType . CONTAINER ; private final Map < MethodIntf , TransactionAttributeType > txPerViewStyle1 = new HashMap < MethodIntf , TransactionAttributeType > ( ) ; private String securityDomain ; private final Set < String > declaredRoles = new HashSet < String > ( ) ; private String runAsRole ; private final Map < String , Collection < EJBMethodIdentifier > > methodLevelDenyAll = new HashMap < String , Collection < EJBMethodIdentifier > > ( ) ; private final Map < String , Collection < String > > classLevelDenyAll = new HashMap < String , Collection < String > > ( ) ; private final Map < String , Map < EJBMethodIdentifier , Set < String > > > methodLevelRolesAllowed = new HashMap < String , Map < EJBMethodIdentifier , Set < String > > > ( ) ; private final Map < String , Map < String , Set < String > > > classLevelRolesAllowed = new HashMap < String , Map < String , Set < String > > > ( ) ; private final Map < String , Collection < String > > securityRoleLinks = new HashMap < String , Collection < String > > ( ) ; private final Map < String , Collection < EJBMethodIdentifier > > methodLevelPermitAll = new HashMap < String , Collection < EJBMethodIdentifier > > ( ) ; private final Map < String , Collection < String > > classLevelPermitAll = new HashMap < String , Collection < String > > ( ) ; private final List < String > aroundInvokeDDMethods = new ArrayList < String > ( 0 ) ; private final List < String > preDestroyDDMethods = new ArrayList < String > ( 0 ) ; private final List < String > postConstructDDMethods = new ArrayList < String > ( 0 ) ; private final PopulatingMap < MethodIntf , Map < String , TransactionAttributeType > > txPerViewStyle2 = new PopulatingMap < MethodIntf , Map < String , TransactionAttributeType > > ( ) { @ Override Map < String , TransactionAttributeType > populate ( ) { } } ; private final PopulatingMap < MethodIntf , PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > > txPerViewStyle3 = new PopulatingMap < MethodIntf , PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > > ( ) { @ Override PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > populate ( ) { } } ; private final Map < String , TransactionAttributeType > txStyle1 = new HashMap < String , TransactionAttributeType > ( ) ; private final Map < String , TransactionAttributeType > txStyle2 = new HashMap < String , TransactionAttributeType > ( ) ; private final PopulatingMap < String , PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > > txStyle3 = new PopulatingMap < String , PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > > ( ) { @ Override PopulatingMap < String , Map < ArrayKey , TransactionAttributeType > > populate ( ) { } } ; public EJBComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbJarDescription , final ServiceName deploymentUnitServiceName ) { } private static < K , V > V get ( Map < K , V > map , K key ) { } public TransactionAttributeType getTransactionAttribute ( MethodIntf methodIntf , String className , String methodName , String ... methodParams ) { } public TransactionManagementType getTransactionManagementType ( ) { } public void setTransactionAttribute ( MethodIntf methodIntf , String className , TransactionAttributeType transactionAttribute ) { } public void setTransactionAttribute ( MethodIntf methodIntf , TransactionAttributeType transactionAttribute , String methodName ) { } public void setTransactionAttribute ( MethodIntf methodIntf , TransactionAttributeType transactionAttribute , final String className , String methodName , String ... methodParams ) { } public void setTransactionManagementType ( TransactionManagementType transactionManagementType ) { } public String getEJBName ( ) { } public String getEJBClassName ( ) { } protected void setupViewInterceptors ( ViewDescription view ) { } protected void setupClientViewInterceptors ( ViewDescription view ) { } protected abstract void addCurrentInvocationContextFactory ( ) { } protected abstract void addCurrentInvocationContextFactory ( ViewDescription view ) { } protected void setupSecurityInterceptors ( final ViewDescription view ) { } private void addToStringMethodInterceptor ( final ViewDescription view ) { view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { final Method TO_STRING_METHOD ; try { TO_STRING_METHOD = Object . class . getMethod ( "toString" , new Class < ? > [ 0 ] ) ; } catch ( NoSuchMethodException nsme ) { throw new DeploymentUnitProcessingException ( nsme ) ; } <START_BUG> Method [ ] methods = configuration . getProxyFactory ( ) . getCachedMethods ( ) ; <END_BUG> for ( Method method : methods ) { if ( TO_STRING_METHOD . equals ( method ) ) { configuration . addClientInterceptor ( method , new ImmediateInterceptorFactory ( new EJBComponentDescription . ToStringMethodInterceptor ( EJBComponentDescription . this . getComponentName ( ) ) ) , TO_STRING ) ; return ; } } } } ) ; } public boolean isMessageDriven ( ) { } 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 setSecurityDomain ( String securityDomain ) { } public String getSecurityDomain ( ) { } public void applyDenyAllOnAllViewsForClass ( final String className ) { } public void applyDenyAllOnAllViewsForMethod ( final EJBMethodIdentifier ejbMethodIdentifier ) { } public void applyDenyAllOnViewTypeForMethod ( final MethodIntf viewType , final EJBMethodIdentifier ejbMethodIdentifier ) { } public void applyDenyAllOnAllMethodsOfAllViews ( ) { }

Fix:
List < Method > methods = configuration . getProxyFactory ( ) . getCachedMethods ( ) ;