Buggy code:
public class ValueMetaDataImpl implements ValueMetaData { private static final Localizer _loc = Localizer . forPackage ( ValueMetaDataImpl . class ) ; private FieldMetaData _owner ; private Class _decType = Object . class ; private int _decCode = JavaTypes . OBJECT ; private ClassMetaData _decTypeMeta = null ; private Class _type = null ; private int _code = JavaTypes . OBJECT ; private ClassMetaData _typeMeta = null ; private Class _typeOverride = null ; private int _delete = CASCADE_NONE ; private int _persist = CASCADE_AUTO ; private int _attach = CASCADE_IMMEDIATE ; private int _detach = CASCADE_AUTO ; private int _refresh = CASCADE_AUTO ; private boolean _serialized = false ; private Boolean _embedded = null ; private ClassMetaData _embeddedMeta = null ; private int _resMode = MODE_NONE ; private String _mappedBy = null ; private FieldMetaData _mappedByMeta = null ; protected ValueMetaDataImpl ( FieldMetaData owner ) { } protected ValueMetaDataImpl ( ) { } public FieldMetaData getFieldMetaData ( ) { } public MetaDataRepository getRepository ( ) { } public Class getType ( ) { } public void setType ( Class type ) { } public int getTypeCode ( ) { } public void setTypeCode ( int code ) { } public boolean isTypePC ( ) { } public ClassMetaData getTypeMetaData ( ) { } public Class getDeclaredType ( ) { } public void setDeclaredType ( Class type ) { } public int getDeclaredTypeCode ( ) { } public void setDeclaredTypeCode ( int code ) { } public boolean isDeclaredTypePC ( ) { } public ClassMetaData getDeclaredTypeMetaData ( ) { } public boolean isEmbedded ( ) { } public void setEmbedded ( boolean embedded ) { } public boolean isEmbeddedPC ( ) { } public ClassMetaData getEmbeddedMetaData ( ) { } public ClassMetaData addEmbeddedMetaData ( ) { MetaDataRepository repos = _owner . getRepository ( ) ; _embeddedMeta = repos . newEmbeddedClassMetaData ( this ) ; _embeddedMeta . setDescribedType ( _decType ) ; <START_BUG> repos . getMetaDataFactory ( ) . getDefaults ( ) . populate ( _embeddedMeta , ACCESS_UNKNOWN ) ; <END_BUG> setEmbedded ( true ) ; return _embeddedMeta ; } public int getCascadeDelete ( ) { } public void setCascadeDelete ( int delete ) { } public int getCascadePersist ( ) { } public void setCascadePersist ( int persist ) { } public int getCascadeAttach ( ) { } public void setCascadeAttach ( int attach ) { } public int getCascadeDetach ( ) { } public void setCascadeDetach ( int detach ) { } public int getCascadeRefresh ( ) { } public void setCascadeRefresh ( int refresh ) { } public boolean isSerialized ( ) { } public void setSerialized ( boolean serialized ) { } public String getValueMappedBy ( ) { } public void setValueMappedBy ( String mapped ) { } public FieldMetaData getValueMappedByMetaData ( ) { } public Class getTypeOverride ( ) { } public void setTypeOverride ( Class val ) { } public String toString ( ) { } public int getResolve ( ) { } public void setResolve ( int mode ) { } public void setResolve ( int mode , boolean on ) { } public boolean resolve ( int mode ) { } private void resolveDeclaredType ( Class type ) { } public void copy ( ValueMetaData vmd ) { } }

Fix:
repos . getMetaDataFactory ( ) . getDefaults ( ) . populate ( _embeddedMeta , UNKNOWN ) ;