Buggy code:
public class StatefulComponentDescription extends SessionBeanComponentDescription { private static final Logger logger = Logger . getLogger ( StatefulComponentDescription . class ) ; private MethodDescription afterBegin ; private MethodDescription afterCompletion ; private MethodDescription beforeCompletion ; private Set < StatefulComponentDescription . StatefulRemoveMethod > removeMethods = new HashSet < StatefulComponentDescription . StatefulRemoveMethod > ( ) ; private class StatefulRemoveMethod { private final MethodIdentifier methodIdentifier ; private final boolean retainIfException ; StatefulRemoveMethod ( final MethodIdentifier method , final boolean retainIfException ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } public StatefulComponentDescription ( final String componentName , final String componentClassName , final EjbJarDescription ejbJarDescription , final ServiceName deploymentUnitServiceName ) { } private void addStatefulSessionSynchronizationInterceptor ( ) { } @ Override public ComponentConfiguration createConfiguration ( EEModuleConfiguration moduleConfiguration ) { } @ Override public boolean allowsConcurrentAccess ( ) { } public MethodDescription getAfterBegin ( ) { } public MethodDescription getAfterCompletion ( ) { } public MethodDescription getBeforeCompletion ( ) { } @ Override public SessionBeanType getSessionBeanType ( ) { } public void setAfterBegin ( String className , String methodName ) { } public void setAfterCompletion ( String className , String methodName ) { } public void setBeforeCompletion ( String className , String methodName ) { } @ Override protected void setupViewInterceptors ( ViewDescription view ) { } public void addRemoveMethod ( final MethodIdentifier removeMethod , final boolean retainIfException ) { } public Set < StatefulComponentDescription . StatefulRemoveMethod > getRemoveMethods ( ) { } private void addStatefulInstanceAssociatingInterceptor ( final ViewDescription view ) { final Object sessionIdContextKey = new Object ( ) ; view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration viewConfiguration ) throws DeploymentUnitProcessingException { InterceptorFactory sessionIdGeneratingInterceptorFactory = new StatefulComponentSessionIdGeneratingInterceptorFactory ( sessionIdContextKey ) ; viewConfiguration . addViewPostConstructInterceptor ( sessionIdGeneratingInterceptorFactory , INSTANCE_CREATE ) ; viewConfiguration . addViewPreDestroyInterceptor ( new StatefulComponentInstanceDestroyInterceptorFactory ( sessionIdContextKey ) , INSTANCE_DESTROY ) ; 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 ) ) ) ) { <START_BUG> viewConfiguration . addViewInterceptor ( new StatefulIdentityInterceptorFactory ( sessionIdContextKey ) , SESSION_BEAN_EQUALS_HASHCODE ) ; <END_BUG> } } } } ) ; view . getConfigurators ( ) . add ( new ViewConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , ComponentConfiguration componentConfiguration , ViewDescription description , ViewConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . addViewInterceptor ( new StatefulComponentInstanceInterceptorFactory ( sessionIdContextKey ) , ASSOCIATING_INTERCEPTOR ) ; } } ) ; } private void addRemoveMethodInterceptor ( final ViewDescription view ) { } private void addTransactionManagementInterceptor ( final ViewDescription view ) { } }

Fix:
viewConfiguration . addViewInterceptor ( method , new StatefulIdentityInterceptorFactory ( sessionIdContextKey ) , SESSION_BEAN_EQUALS_HASHCODE ) ;