Buggy code:
private final Map _generated = new ConcurrentHashMap ( ) ; private final OpenJPAConfiguration _conf ; private final Log _log ; public PCDataGenerator ( OpenJPAConfiguration conf ) { } public OpenJPAConfiguration getConfiguration ( ) { } public PCData generatePCData ( Object oid , ClassMetaData meta ) { } private DynamicStorage generateStorage ( ClassMetaData meta ) { } protected void finish ( PCDataGenerator . DynamicPCData data , ClassMetaData meta ) { } protected int getCreateFieldMethods ( int typeCode ) { } protected void declareClasses ( BCClass bc ) { } protected final String getClassName ( Object obj ) { } protected String getUniqueName ( Class type ) { } protected final void decorate ( Object obj , BCClass bc , int [ ] types ) { } protected void decorate ( BCClass bc , ClassMetaData meta ) { } private void enhanceConstructor ( BCClass bc ) { } private void addGetType ( BCClass bc , ClassMetaData meta ) { } private void addBaseFields ( BCClass bc ) { } private void addImplDataMethods ( BCClass bc , ClassMetaData meta ) { } private void addFieldImplDataMethods ( BCClass bc , ClassMetaData meta ) { } protected void addVersionMethods ( BCClass bc ) { } private void addLoadMethod ( BCClass bc , ClassMetaData meta ) { Code code = addLoadMethod ( bc , false ) ; FieldMetaData [ ] fmds = meta . getFields ( ) ; Collection jumps = new LinkedList ( ) ; Collection jumps2 ; int fetch = code . getNextLocalsIndex ( ) ; code . aload ( ) . setParam ( 1 ) ; code . invokeinterface ( ) . setMethod ( FetchState . class , "getFetchConfiguration" , FetchConfiguration . class , null ) ; code . astore ( ) . setLocal ( fetch ) ; int local = code . getNextLocalsIndex ( ) ; code . constant ( ) . setNull ( ) ; code . astore ( ) . setLocal ( local ) ; int inter = code . getNextLocalsIndex ( ) ; code . constant ( ) . setNull ( ) ; code . astore ( ) . setLocal ( inter ) ; int objectCount = 0 ; boolean intermediate ; for ( int i = 0 ; i < ( fmds . length ) ; i ++ ) { jumps2 = new LinkedList ( ) ; intermediate = usesIntermediate ( fmds [ i ] ) ; setTarget ( code . aload ( ) . setThis ( ) , jumps ) ; code . getfield ( ) . setField ( "loaded" , BitSet . class ) ; code . constant ( ) . setValue ( i ) ; code . invokevirtual ( ) . setMethod ( BitSet . class , "get" , boolean . class , new Class [ ] { int . class } ) ; jumps . add ( code . ifne ( ) ) ; if ( intermediate ) addLoadIntermediate ( code , i , objectCount , jumps2 , inter ) ; jumps2 . add ( code . go2 ( ) ) ; if ( ! ( fmds [ i ] . isInDefaultFetchGroup ( ) ) ) { setTarget ( code . aload ( ) . setLocal ( fetch ) , jumps ) ; code . aload ( ) . setParam ( 0 ) ; code . invokeinterface ( ) . setMethod ( OpenJPAStateManager . class , "getMetaData" , ClassMetaData . class , null ) ; code . constant ( ) . setValue ( fmds [ i ] . getIndex ( ) ) ; code . invokevirtual ( ) . setMethod ( ClassMetaData . class , "getField" , FieldMetaData . class , new Class [ ] { int . class } ) ; code . invokevirtual ( ) . setMethod ( FieldMetaData . class , "getFetchGroups" , Set . class , null ) ; <START_BUG> code . invokeinterface ( ) . setMethod ( FetchConfiguration . class , "hasFetchGroup" , boolean . class , new Class [ ] { Set . class } ) ; <END_BUG> JumpInstruction ifins = code . ifne ( ) ; code . aload ( ) . setLocal ( fetch ) ; code . constant ( ) . setValue ( fmds [ i ] . getFullName ( ) ) ; code . invokeinterface ( ) . setMethod ( FetchConfiguration . class , "hasField" , boolean . class , new Class [ ] { String . class } ) ; jumps2 . add ( code . ifeq ( ) ) ; ifins . setTarget ( addLoad ( bc , code , fmds [ i ] , objectCount , local , false ) ) ; } else { setTarget ( addLoad ( bc , code , fmds [ i ] , objectCount , local , false ) , jumps ) ; } jumps = jumps2 ; if ( ( replaceType ( fmds [ i ] ) ) >= ( JavaTypes . OBJECT ) ) objectCount ++ ; } setTarget ( code . vreturn ( ) , jumps ) ; code . calculateMaxStack ( ) ; code . calculateMaxLocals ( ) ; } private void addLoadWithFieldsMethod ( BCClass bc , ClassMetaData meta ) { } private Code addLoadMethod ( BCClass bc , boolean fields ) { } private Instruction addLoad ( BCClass bc , Code code , FieldMetaData fmd , int objectCount , int local , boolean fields ) { } private Instruction addLoadIntermediate ( Code code , int index , int objectCount , Collection jumps2 , int inter ) { } private void addStoreMethods ( BCClass bc , ClassMetaData meta ) { } private void addStoreMethod ( BCClass bc , ClassMetaData meta , boolean fields ) { } private void addStore ( BCClass bc , Code code , FieldMetaData fmd , int objectCount ) { } private void addNewEmbedded ( BCClass bc ) { } private void addGetData ( BCClass bc ) { } protected int replaceType ( FieldMetaData fmd ) { } protected boolean usesIntermediate ( FieldMetaData fmd ) { }

Fix:
code . invokeinterface ( ) . setMethod ( FetchConfiguration . class , "hasAnyFetchGroup" , boolean . class , new Class [ ] { Set . class } ) ;