Buggy code:
public class AnnotationConfigUtils { public static final String CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME = "org.springframework.context.annotation.internalConfigurationAnnotationProcessor" ; public static final String CONFIGURATION_BEAN_NAME_GENERATOR = "org.springframework.context.annotation.internalConfigurationBeanNameGenerator" ; public static final String AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME = "org.springframework.context.annotation.internalAutowiredAnnotationProcessor" ; public static final String REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME = "org.springframework.context.annotation.internalRequiredAnnotationProcessor" ; public static final String COMMON_ANNOTATION_PROCESSOR_BEAN_NAME = "org.springframework.context.annotation.internalCommonAnnotationProcessor" ; public static final String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME = "org.springframework.context.annotation.internalPersistenceAnnotationProcessor" ; private static final String PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME = "org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" ; private static final boolean jsr250Present = ClassUtils . isPresent ( "javax.annotation.Resource" , AnnotationConfigUtils . class . getClassLoader ( ) ) ; private static final boolean jpaPresent = ( ClassUtils . isPresent ( "javax.persistence.EntityManagerFactory" , AnnotationConfigUtils . class . getClassLoader ( ) ) ) && ( ClassUtils . isPresent ( AnnotationConfigUtils . PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME , AnnotationConfigUtils . class . getClassLoader ( ) ) ) ; public static void registerAnnotationConfigProcessors ( BeanDefinitionRegistry registry ) { } public static Set < BeanDefinitionHolder > registerAnnotationConfigProcessors ( BeanDefinitionRegistry registry , Object source ) { } private static BeanDefinitionHolder registerPostProcessor ( BeanDefinitionRegistry registry , RootBeanDefinition definition , String beanName ) { } private static DefaultListableBeanFactory unwrapDefaultListableBeanFactory ( BeanDefinitionRegistry registry ) { } public static void processCommonDefinitionAnnotations ( AnnotatedBeanDefinition abd ) { } static void processCommonDefinitionAnnotations ( AnnotatedBeanDefinition abd , AnnotatedTypeMetadata metadata ) { if ( metadata . isAnnotated ( Lazy . class . getName ( ) ) ) { abd . setLazyInit ( AnnotationConfigUtils . attributesFor ( metadata , Lazy . class ) . getBoolean ( "value" ) ) ; } else <START_BUG> if ( abd . getMetadata ( ) . isAnnotated ( Lazy . class . getName ( ) ) ) { <END_BUG> abd . setLazyInit ( AnnotationConfigUtils . attributesFor ( abd . getMetadata ( ) , Lazy . class ) . getBoolean ( "value" ) ) ; } if ( metadata . isAnnotated ( Primary . class . getName ( ) ) ) { abd . setPrimary ( true ) ; } if ( metadata . isAnnotated ( DependsOn . class . getName ( ) ) ) { abd . setDependsOn ( AnnotationConfigUtils . attributesFor ( metadata , DependsOn . class ) . getStringArray ( "value" ) ) ; } if ( abd instanceof AbstractBeanDefinition ) { AbstractBeanDefinition absBd = ( ( AbstractBeanDefinition ) ( abd ) ) ; if ( metadata . isAnnotated ( Role . class . getName ( ) ) ) { absBd . setRole ( AnnotationConfigUtils . attributesFor ( metadata , Role . class ) . getNumber ( "value" ) . intValue ( ) ) ; } if ( metadata . isAnnotated ( Description . class . getName ( ) ) ) { absBd . setDescription ( AnnotationConfigUtils . attributesFor ( metadata , Description . class ) . getString ( "value" ) ) ; } } } static BeanDefinitionHolder applyScopedProxyMode ( ScopeMetadata metadata , BeanDefinitionHolder definition , BeanDefinitionRegistry registry ) { } static AnnotationAttributes attributesFor ( AnnotatedTypeMetadata metadata , Class < ? > annotationClass ) { } static AnnotationAttributes attributesFor ( AnnotatedTypeMetadata metadata , String annotationClassName ) { } static Set < AnnotationAttributes > attributesForRepeatable ( AnnotationMetadata metadata , Class < ? > containerClass , Class < ? > annotationClass ) { } @ SuppressWarnings ( "unchecked" ) static Set < AnnotationAttributes > attributesForRepeatable ( AnnotationMetadata metadata , String containerClassName , String annotationClassName ) { } private static void addAttributesIfNotNull ( Set < AnnotationAttributes > result , Map < String , Object > attributes ) { } }

Fix:
if ( ( ( abd . getMetadata ( ) ) != metadata ) && ( abd . getMetadata ( ) . isAnnotated ( Lazy . class . getName ( ) ) ) ) {