Buggy code:
private Map < String , FetchGroup > _fgMap = null ; private Class < ? > _objectId = null ; private Boolean _objectIdShared = null ; private Boolean _openjpaId = null ; private Boolean _extent = null ; private Boolean _embedded = null ; private Boolean _interface = null ; private Class < ? > _impl = null ; private List < Class < ? > > _interfaces = null ; private final Map < Class < ? > , Map < String , String > > _ifaceMap = new HashMap < Class < ? > , Map < String , String > > ( ) ; private int _identity = ClassMetaData . ID_UNKNOWN ; private int _idStrategy = ValueStrategies . NONE ; private int _accessType = AccessCode . UNKNOWN ; private boolean _replicated = false ; private String _seqName = ClassMetaData . DEFAULT_STRING ; private SequenceMetaData _seqMeta = null ; private String _cacheName = ClassMetaData . DEFAULT_STRING ; private int _cacheTimeout = Integer . MIN_VALUE ; private Boolean _detachable = null ; private String _detachState = ClassMetaData . DEFAULT_STRING ; private String _alias = null ; private int _versionIdx = Integer . MIN_VALUE ; private Class < ? > _super = null ; private ClassMetaData _superMeta = null ; private Class < ? > [ ] _subs = null ; private ClassMetaData [ ] _subMetas = null ; private ClassMetaData [ ] _mapSubMetas = null ; private FieldMetaData [ ] _fields = null ; private FieldMetaData [ ] _unmgdFields = null ; private FieldMetaData [ ] _allFields = null ; private FieldMetaData [ ] _allPKFields = null ; private FieldMetaData [ ] _allDFGFields = null ; private FieldMetaData [ ] _definedFields = null ; private FieldMetaData [ ] _listingFields = null ; private FieldMetaData [ ] _allListingFields = null ; private FetchGroup [ ] _fgs = null ; private FetchGroup [ ] _customFGs = null ; private boolean _intercepting = false ; private Boolean _useIdClassFromParent = null ; private boolean _abstract = false ; protected ClassMetaData ( Class < ? > type , MetaDataRepository repos ) { } protected ClassMetaData ( ValueMetaData owner ) { } public MetaDataRepository getRepository ( ) { } public ValueMetaData getEmbeddingMetaData ( ) { } public Class < ? > getDescribedType ( ) { } protected void setDescribedType ( Class < ? > type ) { } public ClassLoader getEnvClassLoader ( ) { } public void setEnvClassLoader ( ClassLoader loader ) { } public Class < ? > getPCSuperclass ( ) { } public void setPCSuperclass ( Class < ? > pc ) { } public ClassMetaData getPCSuperclassMetaData ( ) { } public void setPCSuperclassMetaData ( ClassMetaData meta ) { } public boolean isMapped ( ) { } public ClassMetaData getMappedPCSuperclassMetaData ( ) { } public Class < ? > [ ] getPCSubclasses ( ) { } public ClassMetaData [ ] getPCSubclassMetaDatas ( ) { } public ClassMetaData [ ] getMappedPCSubclassMetaDatas ( ) { } public int getIdentityType ( ) { } public void setIdentityType ( int type ) { } public Class < ? > getObjectIdType ( ) { } public void setObjectIdType ( Class < ? > cls , boolean shared ) { } public boolean isObjectIdTypeShared ( ) { } public boolean isOpenJPAIdentity ( ) { } public int getIdentityStrategy ( ) { } public void setIdentityStrategy ( int strategy ) { } public String getIdentitySequenceName ( ) { } public void setIdentitySequenceName ( String seqName ) { } public SequenceMetaData getIdentitySequenceMetaData ( ) { } public LifecycleMetaData getLifecycleMetaData ( ) { } public String getTypeAlias ( ) { } public void setTypeAlias ( String alias ) { } public int getAccessType ( ) { } public void setAccessType ( int type ) { } void mergeFieldAccess ( FieldMetaData fmd , int fCode ) { <START_BUG> setAccessType ( AccessCode . mergeFieldCode ( _accessType , fCode ) ) ; <END_BUG> } public boolean isExplicitAccess ( ) { } public boolean isMixedAccess ( ) { } public boolean getRequiresExtent ( ) { } public void setRequiresExtent ( boolean req ) { } public boolean isEmbeddedOnly ( ) { } public void setEmbeddedOnly ( boolean embed ) { } public boolean isIntercepting ( ) { } public void setIntercepting ( boolean intercepting ) { } public boolean isManagedInterface ( ) { } public void setManagedInterface ( boolean managedInterface ) { } public Class < ? > getInterfaceImpl ( ) { } public void setInterfaceImpl ( Class < ? > impl ) { } public Class < ? > [ ] getDeclaredInterfaces ( ) { } public void addDeclaredInterface ( Class < ? > iface ) { } public boolean removeDeclaredInterface ( Class < ? > iface ) { } public void setInterfacePropertyAlias ( Class < ? > iface , String orig , String local ) { } public String getInterfacePropertyAlias ( Class < ? > iface , String orig ) { } public String [ ] getInterfaceAliasedProperties ( Class < ? > iface ) { } public int getExtraFieldDataLength ( ) { } public int getExtraFieldDataIndex ( int field ) { } private int [ ] getExtraFieldDataTable ( ) { } public boolean isAccessibleField ( String field ) { } public FieldMetaData [ ] getFields ( ) { } private void replaceDefinedSuperclassFields ( FieldMetaData [ ] fields , int len ) { } protected FieldMetaData getSuperclassField ( FieldMetaData supField ) { } public FieldMetaData [ ] getDeclaredFields ( ) { } public FieldMetaData [ ] getPrimaryKeyFields ( ) { } public FieldMetaData [ ] getDefaultFetchGroupFields ( ) { } public FieldMetaData getVersionField ( ) { } public FieldMetaData getField ( int index ) { } public FieldMetaData getDeclaredField ( int index ) { } public FieldMetaData getField ( String name ) { } public FieldMetaData getDeclaredField ( String name ) { } public FieldMetaData [ ] getDeclaredUnmanagedFields ( ) { } public FieldMetaData addDeclaredField ( String name , Class < ? > type ) { }

Fix:
setAccessType ( AccessCode . mergeFieldCode ( this , fmd , fCode ) ) ;