Buggy code:
public class BcelAccessForInlineMunger extends BcelTypeMunger { private Map m_inlineAccessorBcelMethods ; private LazyClassGen m_aspectGen ; private Set m_inlineAccessorMethodGens ; public BcelAccessForInlineMunger ( ResolvedTypeX aspectType ) { } public boolean munge ( BcelClassWeaver weaver ) { } public ResolvedMember getMatchingSyntheticMember ( Member member ) { } public ResolvedMember getSignature ( ) { } public boolean matches ( ResolvedTypeX onType ) { } private void openAroundAdvice ( LazyMethodGen aroundAdvice ) { InstructionHandle curr = aroundAdvice . getBody ( ) . getStart ( ) ; InstructionHandle end = aroundAdvice . getBody ( ) . getEnd ( ) ; ConstantPoolGen cpg = aroundAdvice . getEnclosingClass ( ) . getConstantPoolGen ( ) ; InstructionFactory factory = aroundAdvice . getEnclosingClass ( ) . getFactory ( ) ; boolean realizedCannotInline = false ; while ( curr != end ) { if ( realizedCannotInline ) { break ; } InstructionHandle next = curr . getNext ( ) ; Instruction inst = curr . getInstruction ( ) ; if ( inst instanceof InvokeInstruction ) { InvokeInstruction invoke = ( ( InvokeInstruction ) ( inst ) ) ; ResolvedTypeX callee = m_aspectGen . getWorld ( ) . resolve ( TypeX . forName ( invoke . getClassName ( cpg ) ) ) ; List methods = callee . getMethodsWithoutIterator ( ) ; for ( Iterator iter = methods . iterator ( ) ; iter . hasNext ( ) ; ) { <START_BUG> BcelMethod resolvedMember = ( ( BcelMethod ) ( iter . next ( ) ) ) ; <END_BUG> if ( ( ( invoke . getName ( cpg ) . equals ( resolvedMember . getName ( ) ) ) && ( invoke . getSignature ( cpg ) . equals ( resolvedMember . getSignature ( ) ) ) ) && ( ! ( resolvedMember . isPublic ( ) ) ) ) { if ( "<init>" . equals ( invoke . getName ( cpg ) ) ) { aroundAdvice . setCanInline ( false ) ; realizedCannotInline = true ; } else { if ( ( ( aspectType . getSuperclass ( ) ) != null ) && ( aspectType . getSuperclass ( ) . getName ( ) . equals ( callee . getName ( ) ) ) ) { ResolvedMember accessor = createOrGetInlineAccessorForSuperDispatch ( resolvedMember ) ; InvokeInstruction newInst = factory . createInvoke ( aspectType . getName ( ) , accessor . getName ( ) , BcelWorld . makeBcelType ( accessor . getReturnType ( ) ) , BcelWorld . makeBcelTypes ( accessor . getParameterTypes ( ) ) , INVOKEVIRTUAL ) ; curr . setInstruction ( newInst ) ; } else { ResolvedMember accessor = createOrGetInlineAccessorForMethod ( resolvedMember ) ; InvokeInstruction newInst = factory . createInvoke ( aspectType . getName ( ) , accessor . getName ( ) , BcelWorld . makeBcelType ( accessor . getReturnType ( ) ) , BcelWorld . makeBcelTypes ( accessor . getParameterTypes ( ) ) , INVOKESTATIC ) ; curr . setInstruction ( newInst ) ; } } break ; } } } else if ( inst instanceof FieldInstruction ) { FieldInstruction invoke = ( ( FieldInstruction ) ( inst ) ) ; ResolvedTypeX callee = m_aspectGen . getWorld ( ) . resolve ( TypeX . forName ( invoke . getClassName ( cpg ) ) ) ; for ( int i = 0 ; i < ( callee . getDeclaredJavaFields ( ) . length ) ; i ++ ) { ResolvedMember resolvedMember = callee . getDeclaredJavaFields ( ) [ i ] ; if ( ( ( invoke . getName ( cpg ) . equals ( resolvedMember . getName ( ) ) ) && ( invoke . getSignature ( cpg ) . equals ( resolvedMember . getSignature ( ) ) ) ) && ( ! ( resolvedMember . isPublic ( ) ) ) ) { final ResolvedMember accessor ; if ( ( inst instanceof GETFIELD ) || ( inst instanceof GETSTATIC ) ) { accessor = createOrGetInlineAccessorForFieldGet ( resolvedMember ) ; } else { accessor = createOrGetInlineAccessorForFieldSet ( resolvedMember ) ; } InvokeInstruction newInst = factory . createInvoke ( aspectType . getName ( ) , accessor . getName ( ) , BcelWorld . makeBcelType ( accessor . getReturnType ( ) ) , BcelWorld . makeBcelTypes ( accessor . getParameterTypes ( ) ) , INVOKESTATIC ) ; curr . setInstruction ( newInst ) ; break ; } } } curr = next ; } if ( ! realizedCannotInline ) { aroundAdvice . setCanInline ( true ) ; } } private ResolvedMember createOrGetInlineAccessorForMethod ( ResolvedMember resolvedMember ) { } private ResolvedMember createOrGetInlineAccessorForSuperDispatch ( ResolvedMember resolvedMember ) { } private ResolvedMember createOrGetInlineAccessorForFieldGet ( ResolvedMember resolvedMember ) { } private ResolvedMember createOrGetInlineAccessorForFieldSet ( ResolvedMember resolvedMember ) { } }

Fix:
ResolvedMember resolvedMember = ( ( ResolvedMember ) ( iter . next ( ) ) ) ;