Buggy code:
public class PersistenceMetaDataDefaults extends AbstractMetaDataDefaults { private static final Localizer _loc = Localizer . forPackage ( PersistenceMetaDataDefaults . class ) ; private static final Map < Class < ? > , PersistenceStrategy . PersistenceStrategy > _strats = new HashMap < Class < ? > , PersistenceStrategy . PersistenceStrategy > ( ) ; private static final Set < String > _ignoredAnnos = new HashSet < String > ( ) ; protected PersistenceMetaDataDefaults . AccessFilter propertyAccessFilter = new PersistenceMetaDataDefaults . AccessFilter ( PROPERTY ) ; protected PersistenceMetaDataDefaults . AccessFilter fieldAccessFilter = new PersistenceMetaDataDefaults . AccessFilter ( FIELD ) ; protected PersistenceMetaDataDefaults . MemberFilter fieldFilter = new PersistenceMetaDataDefaults . MemberFilter ( Field . class ) ; protected PersistenceMetaDataDefaults . MemberFilter methodFilter = new PersistenceMetaDataDefaults . MemberFilter ( Method . class ) ; protected PersistenceMetaDataDefaults . TransientFilter nonTransientFilter = new PersistenceMetaDataDefaults . TransientFilter ( ) ; protected PersistenceMetaDataDefaults . AnnotatedFilter annotatedFilter = new PersistenceMetaDataDefaults . AnnotatedFilter ( ) ; protected PersistenceMetaDataDefaults . GetterFilter getterFilter = new PersistenceMetaDataDefaults . GetterFilter ( ) ; protected PersistenceMetaDataDefaults . SetterFilter setterFilter = new PersistenceMetaDataDefaults . SetterFilter ( ) ; public PersistenceMetaDataDefaults ( ) { } public static PersistenceStrategy . PersistenceStrategy getPersistenceStrategy ( FieldMetaData fmd , Member member ) { } public void setDefaultAccessType ( String type ) { } @ Override public void populate ( ClassMetaData meta , int access ) { } @ Override protected void populate ( FieldMetaData fmd ) { } static void setCascadeNone ( ValueMetaData vmd ) { } ClassMetaData getCachedSuperclassMetaData ( ClassMetaData meta ) { } private int determineAccessType ( ClassMetaData meta ) { } private int determineImplicitAccessType ( Class < ? > cls ) { } private int determineExplicitAccessType ( Class < ? > cls ) { } private List < Method > matchGetterAndSetter ( List < Method > getters , List < Method > setters ) { } List < Field > getPersistentFields ( ClassMetaData meta ) { } List < Method > getPersistentMethods ( ClassMetaData meta ) { } @ Override public List < Member > getPersistentMembers ( ClassMetaData meta ) { } void assertNoDuplicate ( List < Field > fields , List < Method > getters ) { } void error ( ClassMetaData meta , Localizer . Message message ) { } void warn ( ClassMetaData meta , Localizer . Message message ) { } @ Override protected List < String > getFieldAccessNames ( ClassMetaData meta ) { } @ Override protected List < String > getPropertyAccessNames ( ClassMetaData meta ) { } protected boolean isDefaultPersistent ( ClassMetaData meta , Member member , String name ) { } private boolean isAnnotatedTransient ( Member member ) { } private boolean isAnnotatedAccess ( Member member , AccessType type ) { } private boolean isAnnotated ( Member member ) { } public Member getMemberByProperty ( ClassMetaData meta , String property , int access , boolean applyDefaultRule ) { } private static interface InclusiveFilter < T extends AnnotatedElement > { boolean includes ( T e ) { } } < T extends AnnotatedElement > List < T > filter ( T [ ] array , PersistenceMetaDataDefaults . InclusiveFilter ... filters ) { } < T extends AnnotatedElement > List < T > filter ( List < T > list , PersistenceMetaDataDefaults . InclusiveFilter ... filters ) { } static class GetterFilter implements PersistenceMetaDataDefaults . InclusiveFilter < Method > { public boolean includes ( Method method ) { } } static class SetterFilter implements PersistenceMetaDataDefaults . InclusiveFilter < Method > { public boolean includes ( Method method ) { } public static boolean isSetter ( Method method ) { } } static class AccessFilter implements PersistenceMetaDataDefaults . InclusiveFilter < AnnotatedElement > { final AccessType target ; public AccessFilter ( AccessType target ) { } public boolean includes ( AnnotatedElement obj ) { Access access = obj . getAnnotation ( Access . class ) ; <START_BUG> return ( access != null ) && ( access . equals ( target ) ) ; <END_BUG> } } static class MemberFilter implements PersistenceMetaDataDefaults . InclusiveFilter < AnnotatedElement > { final Class < ? > target ; public MemberFilter ( Class < ? > target ) { } public boolean includes ( AnnotatedElement obj ) { int mods = ( ( Member ) ( obj ) ) . getModifiers ( ) ; return ( ( obj . getClass ( ) ) == ( target ) ) && ( ! ( ( ( ( Modifier . isStatic ( mods ) ) || ( Modifier . isFinal ( mods ) ) ) || ( Modifier . isTransient ( mods ) ) ) || ( Modifier . isNative ( mods ) ) ) ) ; } } static class TransientFilter implements PersistenceMetaDataDefaults . InclusiveFilter < AnnotatedElement > { public boolean includes ( AnnotatedElement obj ) { return ( ! ( obj . isAnnotationPresent ( Transient . class ) ) ) && ( ! ( Modifier . isTransient ( ( ( Member ) ( obj ) ) . getModifiers ( ) ) ) ) ; } } static class AnnotatedFilter implements PersistenceMetaDataDefaults . InclusiveFilter < AnnotatedElement > { public boolean includes ( AnnotatedElement obj ) { Annotation [ ] annos = AccessController . doPrivileged ( J2DoPrivHelper . getAnnotationsAction ( obj ) ) ; for ( Annotation anno : annos ) { String name = anno . annotationType ( ) . getName ( ) ; if ( ( ( name . startsWith ( "javax.persistence." ) ) || ( name . startsWith ( "org.apache.openjpa.persistence." ) ) ) && ( ! ( PersistenceMetaDataDefaults . _ignoredAnnos . contains ( name ) ) ) ) return true ; } return false ; } } private void logNoSetter ( ClassMetaData meta , String name , Exception e ) { } private Log getLog ( ClassMetaData meta ) { } String toFieldNames ( List < Field > fields ) { } String toMethodNames ( List < Method > methods ) { } }

Fix:
return ( access != null ) && ( access . value ( ) . equals ( target ) ) ;