Buggy code:
public class ClassMapping extends ClassMetaData implements ClassStrategy { public static final ClassMapping [ ] EMPTY_MAPPINGS = new ClassMapping [ 0 ] ; private static final Localizer _loc = Localizer . forPackage ( ClassMapping . class ) ; private final ClassMappingInfo _info ; private final Discriminator _discrim ; private final Version _version ; private ClassStrategy _strategy = null ; private Table _table = null ; private ColumnIO _io = null ; private Column [ ] _cols = Schemas . EMPTY_COLUMNS ; private ForeignKey _fk = null ; private int _subclassMode = Integer . MAX_VALUE ; private ClassMapping [ ] _joinSubMaps = null ; private ClassMapping [ ] _assignMaps = null ; private final Map _joinables = new ConcurrentHashMap ( ) ; protected ClassMapping ( Class type , MappingRepository repos ) { } protected ClassMapping ( ValueMetaData vmd ) { } public Discriminator getDiscriminator ( ) { } public Version getVersion ( ) { } public Object getObjectId ( JDBCStore store , Result res , ForeignKey fk , boolean subs , Joins joins ) throws SQLException { } private Object getObjectId ( ClassMapping cls , JDBCStore store , Result res , ForeignKey fk , boolean subs , Joins joins ) throws SQLException { } boolean isSelfReference ( ForeignKey fk , Column [ ] cols ) { } public Object toDataStoreValue ( Object obj , Column [ ] cols , JDBCStore store ) { } public Joinable assertJoinable ( Column col ) { Joinable join = getJoinable ( col ) ; if ( join == null ) <START_BUG> throw new org . apache . openjpa . util . MetaDataException ( ClassMapping . _loc . get ( "no-joinable" , col . getFullName ( ) ) ) ; <END_BUG> return join ; } public Joinable getJoinable ( Column col ) { } public void setJoinable ( Column col , Joinable joinable ) { } public Boolean isForeignKeyObjectId ( ForeignKey fk ) { } public ClassMappingInfo getMappingInfo ( ) { } public ClassStrategy getStrategy ( ) { } public void setStrategy ( ClassStrategy strategy , Boolean adapt ) { } public Table getTable ( ) { } public void setTable ( Table table ) { } public Column [ ] getPrimaryKeyColumns ( ) { } public void setPrimaryKeyColumns ( Column [ ] cols ) { } public ColumnIO getColumnIO ( ) { } public void setColumnIO ( ColumnIO io ) { } public ForeignKey getJoinForeignKey ( ) { } public void setJoinForeignKey ( ForeignKey fk ) { } public void refSchemaComponents ( ) { } public void clearMapping ( ) { } public void syncMappingInfo ( ) { } protected void setDescribedType ( Class type ) { } public int getSubclassFetchMode ( ) { } public void setSubclassFetchMode ( int mode ) { } public MappingRepository getMappingRepository ( ) { } public ValueMapping getEmbeddingMapping ( ) { } public boolean isMapped ( ) { } public ClassMapping getPCSuperclassMapping ( ) { } public ClassMapping getMappedPCSuperclassMapping ( ) { } public ClassMapping getJoinablePCSuperclassMapping ( ) { } public ClassMapping [ ] getPCSubclassMappings ( ) { } public ClassMapping [ ] getMappedPCSubclassMappings ( ) { } public ClassMapping [ ] getJoinablePCSubclassMappings ( ) { } private boolean isSubJoinable ( ClassMapping sub ) { } public ClassMapping [ ] getIndependentAssignableMappings ( ) { } public FieldMapping [ ] getFieldMappings ( ) { } public FieldMapping [ ] getDeclaredFieldMappings ( ) { } public FieldMapping [ ] getPrimaryKeyFieldMappings ( ) { } public FieldMapping getVersionFieldMapping ( ) { } public FieldMapping [ ] getDefaultFetchGroupFieldMappings ( ) { } public FieldMapping [ ] getDefinedFieldMappings ( ) { } public FieldMapping [ ] getFieldMappingsInListingOrder ( ) { } public FieldMapping [ ] getDefinedFieldMappingsInListingOrder ( ) { } public FieldMapping getFieldMapping ( int index ) { } public FieldMapping getDeclaredFieldMapping ( int index ) { } public FieldMapping getFieldMapping ( String name ) { } public FieldMapping getDeclaredFieldMapping ( String name ) { } public FieldMapping [ ] getDeclaredUnmanagedFieldMappings ( ) { } public FieldMapping addDeclaredFieldMapping ( String name , Class type ) { } protected void resolveMapping ( boolean runtime ) { } void resolveNonRelationMappings ( ) { } protected void initializeMapping ( ) { } protected void clearDefinedFieldCache ( ) { } protected void clearSubclassCache ( ) { } public void copy ( ClassMetaData cls ) { } protected boolean validateDataStoreExtensionPrefix ( String prefix ) { } public String getAlias ( ) { } public void map ( boolean adapt ) { } public void initialize ( ) { } public void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void update ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void delete ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public Boolean isCustomInsert ( OpenJPAStateManager sm , JDBCStore store ) { } public Boolean isCustomUpdate ( OpenJPAStateManager sm , JDBCStore store ) { } public Boolean isCustomDelete ( OpenJPAStateManager sm , JDBCStore store ) { } public void customInsert ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public void customUpdate ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public void customDelete ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public void setClassMapping ( ClassMapping owner ) { } public boolean isPrimaryKeyObjectId ( boolean hasAll ) { } public Joins joinSuperclass ( Joins joins , boolean toThis ) { } public boolean supportsEagerSelect ( Select sel , OpenJPAStateManager sm , JDBCStore store , ClassMapping base , JDBCFetchConfiguration fetch ) { } public ResultObjectProvider customLoad ( JDBCStore store , boolean subclasses , JDBCFetchConfiguration fetch , long startIdx , long endIdx ) throws SQLException { } public boolean customLoad ( OpenJPAStateManager sm , JDBCStore store , PCState state , JDBCFetchConfiguration fetch ) throws ClassNotFoundException , SQLException { } public boolean customLoad ( OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Result result ) throws SQLException { }

Fix:
throw new org . apache . openjpa . util . MetaDataException ( ClassMapping . _loc . get ( "no-joinable" , col . getQualifiedPath ( ) . toString ( ) ) ) ;