Buggy code:
public final class NotificationManager { private final Map < Type , Set < ObserverMethod < ? > > > observers = new ConcurrentHashMap < Type , Set < ObserverMethod < ? > > > ( ) ; private final WebBeansContext webBeansContext ; private final ConcurrentMap < Annotation , Boolean > hasContextLifecycleEventObservers = new ConcurrentHashMap < Annotation , Boolean > ( ) ; private final ConcurrentHashMap < Class < ? > , Set < ObserverMethod < ? > > > observersByRawType = new ConcurrentHashMap < Class < ? > , Set < ObserverMethod < ? > > > ( ) ; public static final Set < Class > CONTAINER_EVENT_CLASSES = new HashSet < Class > ( Arrays . asList ( new Class [ ] { AfterBeanDiscovery . class , AfterDeploymentValidation . class , AfterTypeDiscovery . class , BeforeBeanDiscovery . class , BeforeShutdown . class , ProcessAnnotatedType . class , ProcessBean . class , ProcessBeanAttributes . class , ProcessInjectionPoint . class , ProcessInjectionTarget . class , ProcessManagedBean . class , ProcessObserverMethod . class , ProcessProducer . class , ProcessProducerField . class , ProcessProducerMethod . class , ProcessSessionBeanImpl . class , ProcessSyntheticAnnotatedType . class } ) ) ; public NotificationManager ( WebBeansContext webBeansContext ) { } public void clearCaches ( ) { } public boolean hasContextLifecycleObserver ( Annotation lifecycleEvent ) { } public List < ObserverMethod < ? > > getObserverMethods ( ) { } public < T > void addObserver ( ObserverMethod < T > observer , Type eventType ) { } public < T > void addObserver ( ObserverMethod < T > observer , TypeLiteral < T > typeLiteral ) { } public < T > Set < ObserverMethod < ? super T > > resolveObservers ( T event , EventMetadataImpl metadata , boolean isLifecycleEvent ) { } private < T > Set < ObserverMethod < ? super T > > filterByWithAnnotations ( Set < ObserverMethod < ? super T > > observersMethods , AnnotatedType annotatedType ) { } private boolean annotatedTypeHasAnnotations ( AnnotatedType annotatedType , Class < ? extends Annotation > [ ] withAnnotations ) { } private boolean hasAnnotation ( Set < Annotation > annotations , Class < ? extends Annotation > [ ] withAnnotations ) { } private < T > Set < ObserverMethod < ? super T > > filterByType ( T event , Type declaredEventType , boolean isLifecycleEvent ) { } private < T > Set < ObserverMethod < ? super T > > filterByExtensionEventType ( T event , Type eventType ) { } private boolean checkEventTypeParameterForExtensions ( Type beanClass , Type observerTypeActualArg ) { } private < T > void addToMatching ( Type type , Set < ObserverMethod < ? super T > > matching ) { } private < T > void addToMatchingWithParametrizedForBeans ( Type type , Set < ObserverMethod < ? super T > > matching , Class < ? > beanClass , Type secondParam ) { ParameterizedType pt = ( ( ParameterizedType ) ( type ) ) ; Type [ ] actualArgs = pt . getActualTypeArguments ( ) ; if ( ( actualArgs . length ) == 0 ) { Class < ? > rawType = ( ( Class < ? > ) ( pt . getRawType ( ) ) ) ; if ( rawType . isAssignableFrom ( beanClass ) ) { addToMatching ( type , matching ) ; } } else { <START_BUG> if ( ( checkEventTypeParameterForExtensions ( beanClass , actualArgs [ 0 ] ) ) && ( ( ( ( secondParam == null ) || ( ( actualArgs . length ) == 1 ) ) || ( checkEventTypeParameterForExtensions ( secondParam , actualArgs [ 1 ] ) ) ) || ( GenericsUtil . isAssignableFrom ( false , false , secondParam , actualArgs [ 1 ] ) ) ) ) { <END_BUG> addToMatching ( type , matching ) ; } } } private < T > void addToMatchingWithParametrizedForProducers ( boolean processProducer , Type type , Class < ? > beanClass , Class < ? > producerOrObserverReturnClass , Set < ObserverMethod < ? super T > > matching ) { } private < T > Set < ObserverMethod < ? super T > > filterByQualifiers ( Set < ObserverMethod < ? super T > > observers , Set < Annotation > eventQualifiers ) { } public void fireEvent ( Object event , EventMetadataImpl metadata , boolean isLifecycleEvent ) { } public < T > ObserverMethod < ? > getObservableMethodForAnnotatedMethod ( AnnotatedMethod < ? > annotatedMethod , AnnotatedParameter < ? > annotatedParameter , AbstractOwbBean < T > bean ) { } public boolean isContainerEvent ( final AnnotatedParameter < ? > annotatedParameter ) { } }

Fix:
if ( ( checkEventTypeParameterForExtensions ( beanClass , actualArgs [ 0 ] ) ) && ( ( ( ( secondParam == null ) || ( ( actualArgs . length ) == 1 ) ) || ( checkEventTypeParameterForExtensions ( secondParam , actualArgs [ 1 ] ) ) ) || ( GenericsUtil . isAssignableFrom ( false , false , actualArgs [ 1 ] , secondParam ) ) ) ) {