Buggy code:
public class StatefulComponentDescription extends SessionBeanComponentDescription { private Method afterBegin ; private Method afterCompletion ; private Method beforeCompletion ; private final Map < MethodIdentifier , StatefulComponentDescription . StatefulRemoveMethod > removeMethods = new HashMap < MethodIdentifier , StatefulComponentDescription . StatefulRemoveMethod > ( ) ; private StatefulTimeoutInfo statefulTimeout ; private CacheInfo cache ; private Map < Method , String > initMethods = new HashMap < Method , String > ( 0 ) ; public class StatefulRemoveMethod { private final MethodIdentifier methodIdentifier ; private final boolean retainIfException ; StatefulRemoveMethod ( final MethodIdentifier method , final boolean retainIfException ) { } public MethodIdentifier getMethodIdentifier ( ) { } public boolean isRetainIfException ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } public StatefulComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbJarDescription , final ServiceName deploymentUnitServiceName , final SessionBeanMetaData descriptorData ) { } private void addInitMethodInvokingInterceptor ( ) { } private void addStatefulSessionSynchronizationInterceptor ( ) { } @ Override public ComponentConfiguration createConfiguration ( final ClassIndex classIndex , final ClassLoader moduleClassLoder , final ModuleLoader moduleLoader ) { } @ Override public boolean allowsConcurrentAccess ( ) { } public Method getAfterBegin ( ) { } public Method getAfterCompletion ( ) { } public Method getBeforeCompletion ( ) { } @ Override public SessionBeanType getSessionBeanType ( ) { } public void setAfterBegin ( final Method afterBegin ) { } public void setAfterCompletion ( final Method afterCompletion ) { } public void setBeforeCompletion ( final Method afterCompletion ) { } @ Override protected void setupViewInterceptors ( EJBViewDescription view ) { } @ Override protected ViewConfigurator getSessionBeanObjectViewConfigurator ( ) { } private void addViewSerializationInterceptor ( final ViewDescription view ) { } public void addRemoveMethod ( final MethodIdentifier removeMethod , final boolean retainIfException ) { } public Collection < StatefulComponentDescription . StatefulRemoveMethod > getRemoveMethods ( ) { } public StatefulTimeoutInfo getStatefulTimeout ( ) { } public void setStatefulTimeout ( final StatefulTimeoutInfo statefulTimeout ) { } private void addStatefulInstanceAssociatingInterceptor ( final EJBViewDescription view ) { view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( final DeploymentPhaseContext context , final ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration viewConfiguration ) throws DeploymentUnitProcessingException { EJBViewDescription ejbViewDescription = ( ( EJBViewDescription ) ( view ) ) ; if ( ( ( ejbViewDescription . getMethodIntf ( ) ) == ( MethodIntf . HOME ) ) || ( ( ejbViewDescription . getMethodIntf ( ) ) == ( MethodIntf . LOCAL_HOME ) ) ) { for ( Method method : viewConfiguration . getProxyFactory ( ) . getCachedMethods ( ) ) { if ( ( ( method . getName ( ) . equals ( "hashCode" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) || ( ( ( method . getName ( ) . equals ( "equals" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Object . class ) ) ) ) { viewConfiguration . addClientInterceptor ( method , INSTANCE , EJB_EQUALS_HASHCODE ) ; } } } else { final InterceptorFactory sessionIdGeneratingInterceptorFactory = StatefulComponentSessionIdGeneratingInterceptorFactory . INSTANCE ; viewConfiguration . addClientPostConstructInterceptor ( sessionIdGeneratingInterceptorFactory , INSTANCE_CREATE ) ; for ( Method method : viewConfiguration . getProxyFactory ( ) . getCachedMethods ( ) ) { if ( ( ( method . getName ( ) . equals ( "hashCode" ) ) && ( ( method . getParameterTypes ( ) . length ) == 0 ) ) || ( ( ( method . getName ( ) . equals ( "equals" ) ) && ( ( method . getParameterTypes ( ) . length ) == 1 ) ) && ( ( method . getParameterTypes ( ) [ 0 ] ) == ( Object . class ) ) ) ) { viewConfiguration . addClientInterceptor ( method , StatefulIdentityInterceptorFactory . INSTANCE , EJB_EQUALS_HASHCODE ) ; } } } } } ) ; if ( ( ( view . getMethodIntf ( ) ) != ( MethodIntf . LOCAL_HOME ) ) && ( ( view . getMethodIntf ( ) ) != ( MethodIntf . HOME ) ) ) { view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . addClientInterceptor ( StatefulComponentIdInterceptor . Factory . INSTANCE , ASSOCIATING_INTERCEPTOR ) ; <START_BUG> configuration . addViewInterceptor ( StatefulComponentInstanceInterceptor . Factory . INSTANCE , InterceptorOrder . View . ASSOCIATING_INTERCEPTOR ) ; <END_BUG> } } ) ; } } private void addRemoveMethodInterceptor ( final ViewDescription view ) { } public void addInitMethod ( final Method method , final String createMethod ) { } public Map < Method , String > getInitMethods ( ) { } public CacheInfo getCache ( ) { } public void setCache ( CacheInfo cache ) { } @ Override public boolean isPassivationApplicable ( ) { } }

Fix:
configuration . addViewInterceptor ( FACTORY , InterceptorOrder . View . ASSOCIATING_INTERCEPTOR ) ;