Buggy code:
public class ClassMetaData extends Extensions implements Comparable , SourceTracker , Commentable , MetaDataContext , MetaDataModes { public static final int ID_UNKNOWN = 0 ; public static final int ID_DATASTORE = 1 ; public static final int ID_APPLICATION = 2 ; public static final int ACCESS_UNKNOWN = 0 ; public static final int ACCESS_FIELD = 2 << 0 ; public static final int ACCESS_PROPERTY = 2 << 1 ; public static final String SYNTHETIC = "`syn" ; protected static final String DEFAULT_STRING = "`" ; private static final Localizer _loc = Localizer . forPackage ( ClassMetaData . class ) ; private MetaDataRepository _repos ; private transient ClassLoader _loader = null ; private final ValueMetaData _owner ; private final LifecycleMetaData _lifeMeta = new LifecycleMetaData ( this ) ; private File _srcFile = null ; private int _srcType = SRC_OTHER ; private String [ ] _comments = null ; private int _listIndex = - 1 ; private int _srcMode = ( MODE_META ) | ( MODE_MAPPING ) ; private int _resMode = MODE_NONE ; private Class _type = Object . class ; private final Map _fieldMap = new TreeMap ( ) ; private Map _supFieldMap = null ; private boolean _defSupFields = false ; private Collection _staticFields = null ; private int [ ] _fieldDataTable = null ; private Map _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 _interfaces = null ; private final Map _ifaceMap = new HashMap ( ) ; private int _identity = ClassMetaData . ID_UNKNOWN ; private int _idStrategy = ValueStrategies . NONE ; private int _accessType = ClassMetaData . ACCESS_UNKNOWN ; 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 ; 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 ( ) { if ( ( _owner ) != null ) return _repos . EMPTY_CLASSES ; <START_BUG> _repos . processRegisteredClasses ( ) ; <END_BUG> if ( ( _subs ) == null ) { Collection subs = _repos . getPCSubclasses ( _type ) ; _subs = ( ( Class [ ] ) ( subs . toArray ( new Class [ subs . size ( ) ] ) ) ) ; } return _subs ; } 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 ) { } public boolean getRequiresExtent ( ) { } public void setRequiresExtent ( boolean req ) { } public boolean isEmbeddedOnly ( ) { } public void setEmbeddedOnly ( boolean embed ) { } 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 ) { }

Fix:
_repos . processRegisteredClasses ( _loader ) ;