Buggy code:
public class TestManyOneAsId extends TestCase { private EntityManagerFactory emf ; private long id ; private long dsid ; private long cid ; public void setUp ( ) { <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( ( ( ( ( ( ( ( ( "jpa(Types=" + ( BasicEntity . class . getName ( ) ) ) + ";" ) + ( DataStoreBasicEntity . class . getName ( ) ) ) + ";" ) + ( ManyOneIdOwner . class . getName ( ) ) ) + ";" ) + ( DataStoreManyOneIdOwner . class . getName ( ) ) ) + ";" ) + ( ManyOneCompoundIdOwner . class . getName ( ) ) ) + ")" ) ) ; emf = Persistence . createEntityManagerFactory ( "test" , props ) ; BasicEntity id1 = new BasicEntity ( ) ; id1 . setName ( "id1" ) ; BasicEntity id2 = new BasicEntity ( ) ; id2 . setName ( "id2" ) ; id1 . setRel ( id2 ) ; id2 . setRel ( id1 ) ; DataStoreBasicEntity dsid1 = new DataStoreBasicEntity ( ) ; dsid1 . setName ( "dsid1" ) ; dsid1 . setRel ( id1 ) ; DataStoreBasicEntity dsid2 = new DataStoreBasicEntity ( ) ; dsid2 . setName ( "dsid2" ) ; dsid2 . setRel ( id2 ) ; ManyOneIdOwner parent = new ManyOneIdOwner ( ) ; parent . setId ( id1 ) ; parent . setName ( "parent" ) ; ManyOneIdOwner child = new ManyOneIdOwner ( ) ; child . setId ( id2 ) ; child . setName ( "child" ) ; parent . setSelfRel ( child ) ; DataStoreManyOneIdOwner dsparent = new DataStoreManyOneIdOwner ( ) ; dsparent . setId ( dsid1 ) ; dsparent . setName ( "dsparent" ) ; DataStoreManyOneIdOwner dschild = new DataStoreManyOneIdOwner ( ) ; dschild . setId ( dsid2 ) ; dschild . setName ( "dschild" ) ; dsparent . setSelfRel ( dschild ) ; ManyOneCompoundIdOwner cparent = new ManyOneCompoundIdOwner ( ) ; cparent . setEntityId ( id1 ) ; cparent . setName ( "cparent" ) ; ManyOneCompoundIdOwner cchild = new ManyOneCompoundIdOwner ( ) ; cchild . setEntityId ( id2 ) ; cchild . setName ( "cchild" ) ; cparent . setSelfRel ( cchild ) ; EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( id1 ) ; em . persist ( id2 ) ; em . persist ( dsid1 ) ; em . persist ( dsid2 ) ; em . persist ( parent ) ; em . persist ( child ) ; em . persist ( dsparent ) ; em . persist ( dschild ) ; em . persist ( cparent ) ; em . persist ( cchild ) ; em . getTransaction ( ) . commit ( ) ; id = id1 . getId ( ) ; assertRelations ( em , parent ) ; OpenJPAEntityManager oem = ( ( OpenJPAEntityManager ) ( em ) ) ; dsid = ( ( Long ) ( oem . getObjectId ( dsid1 ) ) ) ; assertDataStoreRelations ( oem , dsparent ) ; cid = cparent . getLongId ( ) ; assertCompoundRelations ( oem , cparent ) ; em . close ( ) ; } public void tearDown ( ) { } private void assertRelations ( EntityManager em , ManyOneIdOwner parent ) { } private void assertDataStoreRelations ( OpenJPAEntityManager em , DataStoreManyOneIdOwner dsparent ) { } private void assertCompoundRelations ( OpenJPAEntityManager em , ManyOneCompoundIdOwner cparent ) { } public void testRetrieveWithManyOneId ( ) { } public void testRetrieveWithDataStoreManyOneId ( ) { } public void testRetrieveWithCompoundManyOneId ( ) { } public void testAttemptToChangeManyOne ( ) { } public void testChangeRelationToManyOneOwner ( ) { } public void testChangeRelationToDataStoreManyOneOwner ( ) { } public void testChangeRelationToCompoundManyOneOwner ( ) { } public void testQuery ( ) { } public void testDataStoreQuery ( ) { } public void testCompoundQuery ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;