Buggy code:
class BcelClassWeaver implements IClassWeaver { public static boolean weave ( BcelWorld world , LazyClassGen clazz , List shadowMungers , List typeMungers ) { } private final LazyClassGen clazz ; private final List shadowMungers ; private final List typeMungers ; private final BcelObjectType ty ; private final BcelWorld world ; private final ConstantPoolGen cpg ; private final InstructionFactory fact ; private final List addedLazyMethodGens = new ArrayList ( ) ; private final Set addedDispatchTargets = new HashSet ( ) ; private List addedSuperInitializersAsList = null ; private final Map addedSuperInitializers = new HashMap ( ) ; private List addedThisInitializers = new ArrayList ( ) ; private List addedClassInitializers = new ArrayList ( ) ; private BcelShadow clinitShadow = null ; private final List initializationShadows = new ArrayList ( 1 ) ; private BcelClassWeaver ( BcelWorld world , LazyClassGen clazz , List shadowMungers , List typeMungers ) { } private void initializeSuperInitializerMap ( ResolvedTypeX child ) { } private boolean addSuperInitializer ( ResolvedTypeX onType ) { } public void addInitializer ( ConcreteTypeMunger cm ) { } private static class IfaceInitList implements PartialOrder . PartialComparable { final ResolvedTypeX onType ; List list = new ArrayList ( ) ; IfaceInitList ( ResolvedTypeX onType ) { } public int compareTo ( Object other ) { } public int fallbackCompareTo ( Object other ) { } } public boolean addDispatchTarget ( ResolvedMember m ) { } public void addLazyMethodGen ( LazyMethodGen gen ) { } public void addOrReplaceLazyMethodGen ( LazyMethodGen mg ) { } private boolean alreadyDefined ( LazyClassGen clazz , LazyMethodGen mg ) { } private boolean signaturesMatch ( LazyMethodGen mg , LazyMethodGen existing ) { } public boolean weave ( ) { } private void inlineSelfConstructors ( List methodGens ) { } private void positionAndImplement ( List initializationShadows ) { } private void positionInitializationShadow ( BcelShadow s ) { } private boolean isThisCall ( InstructionHandle ih ) { } public static void inlineMethod ( LazyMethodGen donor , LazyMethodGen recipient , InstructionHandle call ) { } static InstructionList genInlineInstructions ( LazyMethodGen donor , LazyMethodGen recipient , IntMap frameEnv , InstructionFactory fact , boolean keepReturns ) { } private static InstructionList genArgumentStores ( LazyMethodGen donor , LazyMethodGen recipient , IntMap frameEnv , InstructionFactory fact ) { } private LazyMethodGen getCalledMethod ( InstructionHandle ih ) { } private void weaveInAddedMethods ( ) { } void addPerSingletonField ( Member field ) { } private InstructionHandle findSuperOrThisCall ( LazyMethodGen mg ) { } private boolean match ( LazyMethodGen mg ) { } private boolean shouldWeaveBody ( LazyMethodGen mg ) { } private InstructionList genInitInstructions ( List list , boolean isStatic ) { } private void match ( LazyMethodGen mg , InstructionHandle ih , BcelShadow enclosingShadow , List shadowAccumulator ) { Instruction i = ih . getInstruction ( ) ; if ( i instanceof FieldInstruction ) { FieldInstruction fi = ( ( FieldInstruction ) ( i ) ) ; <START_BUG> if ( ( i instanceof PUTFIELD ) || ( i instanceof PUTSTATIC ) ) { <END_BUG> InstructionHandle prevHandle = ih . getPrev ( ) ; Instruction prevI = prevHandle . getInstruction ( ) ; if ( Utility . isConstantPushInstruction ( prevI ) ) { Member field = BcelWorld . makeFieldSignature ( clazz , ( ( FieldInstruction ) ( i ) ) ) ; ResolvedMember resolvedField = field . resolve ( world ) ; if ( resolvedField == null ) { } else if ( Modifier . isFinal ( resolvedField . getModifiers ( ) ) ) { } else { matchSetInstruction ( mg , ih , enclosingShadow , shadowAccumulator ) ; } } else { matchSetInstruction ( mg , ih , enclosingShadow , shadowAccumulator ) ; } } else { matchGetInstruction ( mg , ih , enclosingShadow , shadowAccumulator ) ; } } else if ( i instanceof InvokeInstruction ) { InvokeInstruction ii = ( ( InvokeInstruction ) ( i ) ) ; if ( ii . getMethodName ( clazz . getConstantPoolGen ( ) ) . equals ( "<init>" ) ) { match ( BcelShadow . makeConstructorCall ( world , mg , ih , enclosingShadow ) , shadowAccumulator ) ; } else if ( ii instanceof INVOKESPECIAL ) { String onTypeName = ii . getClassName ( cpg ) ; if ( onTypeName . equals ( mg . getEnclosingClass ( ) . getName ( ) ) ) { matchInvokeInstruction ( mg , ih , ii , enclosingShadow , shadowAccumulator ) ; } else { } } else { matchInvokeInstruction ( mg , ih , ii , enclosingShadow , shadowAccumulator ) ; } } if ( Range . isRangeHandle ( ih ) ) return ; InstructionTargeter [ ] targeters = ih . getTargeters ( ) ; if ( targeters != null ) { for ( int j = 0 ; j < ( targeters . length ) ; j ++ ) { InstructionTargeter t = targeters [ j ] ; if ( t instanceof ExceptionRange ) { ExceptionRange er = ( ( ExceptionRange ) ( t ) ) ; if ( ( er . getCatchType ( ) ) == null ) continue ; match ( BcelShadow . makeExceptionHandler ( world , er , mg , ih , enclosingShadow ) , shadowAccumulator ) ; } } } } private void matchSetInstruction ( LazyMethodGen mg , InstructionHandle ih , BcelShadow enclosingShadow , List shadowAccumulator ) { } private void matchGetInstruction ( LazyMethodGen mg , InstructionHandle ih , BcelShadow enclosingShadow , List shadowAccumulator ) { } private void matchInvokeInstruction ( LazyMethodGen mg , InstructionHandle ih , InvokeInstruction invoke , BcelShadow enclosingShadow , List shadowAccumulator ) { } private boolean match ( BcelShadow shadow , List shadowAccumulator ) { } private void implement ( LazyMethodGen mg ) { } public LazyClassGen getLazyClassGen ( ) { } public List getShadowMungers ( ) { } public BcelWorld getWorld ( ) { } }

Fix:
if ( ( fi instanceof PUTFIELD ) || ( fi instanceof PUTSTATIC ) ) {