Buggy code:
public class BcelTypeMunger extends ConcreteTypeMunger { public BcelTypeMunger ( ResolvedTypeMunger munger , ResolvedType aspectType ) { } public String toString ( ) { } public boolean munge ( BcelClassWeaver weaver ) { } private String getShortname ( String path ) { } private boolean mungeNewAnnotationOnType ( BcelClassWeaver weaver , AnnotationOnTypeMunger munger ) { } private boolean mungeNewParent ( BcelClassWeaver weaver , NewParentTypeMunger munger ) { } private boolean enforceDecpRule1_abstractMethodsImplemented ( BcelClassWeaver weaver , ISourceLocation mungerLoc , LazyClassGen newParentTarget , ResolvedType newParent ) { } private boolean enforceDecpRule2_cantExtendFinalClass ( BcelClassWeaver weaver , ISourceLocation mungerLoc , LazyClassGen newParentTarget , ResolvedType newParent ) { } private boolean enforceDecpRule3_visibilityChanges ( BcelClassWeaver weaver , ResolvedType newParent , ResolvedMember superMethod , LazyMethodGen subMethod ) { } private boolean enforceDecpRule4_compatibleReturnTypes ( BcelClassWeaver weaver , ResolvedMember superMethod , LazyMethodGen subMethod ) { } private boolean enforceDecpRule5_cantChangeFromStaticToNonstatic ( BcelClassWeaver weaver , ISourceLocation mungerLoc , ResolvedMember superMethod , LazyMethodGen subMethod ) { } public void error ( BcelClassWeaver weaver , String text , ISourceLocation primaryLoc , ISourceLocation [ ] extraLocs ) { } private LazyMethodGen findMatchingMethod ( LazyClassGen newParentTarget , ResolvedMember m ) { } public boolean attemptToModifySuperCalls ( BcelClassWeaver weaver , LazyClassGen newParentTarget , ResolvedType newParent ) { } private String createReadableCtorSig ( ResolvedType newParent , ConstantPoolGen cpg , INVOKESPECIAL invokeSpecial ) { } private ResolvedMember getConstructorWithSignature ( ResolvedType tx , String signature ) { } private boolean mungePrivilegedAccess ( BcelClassWeaver weaver , PrivilegedAccessMunger munger ) { } private void addFieldGetter ( LazyClassGen gen , ResolvedMember field , ResolvedMember accessMethod ) { } private void addFieldSetter ( LazyClassGen gen , ResolvedMember field , ResolvedMember accessMethod ) { } private void addMethodDispatch ( LazyClassGen gen , ResolvedMember method , ResolvedMember accessMethod ) { } protected LazyMethodGen makeMethodGen ( LazyClassGen gen , ResolvedMember member ) { } protected FieldGen makeFieldGen ( LazyClassGen gen , ResolvedMember member ) { } private boolean mungePerObjectInterface ( BcelClassWeaver weaver , PerObjectInterfaceTypeMunger munger ) { } private boolean mungePerTypeWithinTransformer ( BcelClassWeaver weaver ) { } private boolean couldMatch ( BcelObjectType bcelObjectType , Pointcut pointcut ) { } private boolean mungeNewMethod ( BcelClassWeaver weaver , NewMethodTypeMunger munger ) { } private void createAnyBridgeMethodsForCovariance ( BcelClassWeaver weaver , NewMethodTypeMunger munger , ResolvedMember unMangledInterMethod , ResolvedType onType , LazyClassGen gen , Type [ ] paramTypes ) { ResolvedType superclass = onType . getSuperclass ( ) ; boolean quitRightNow = false ; String localMethodName = unMangledInterMethod . getName ( ) ; String localParameterSig = unMangledInterMethod . getParameterSignature ( ) ; String localReturnTypeESig = unMangledInterMethod . getReturnType ( ) . getErasureSignature ( ) ; boolean alreadyDone = false ; ResolvedMember [ ] localMethods = onType . getDeclaredMethods ( ) ; for ( int i = 0 ; i < ( localMethods . length ) ; i ++ ) { ResolvedMember member = localMethods [ i ] ; if ( member . getName ( ) . equals ( localMethodName ) ) { if ( member . getParameterSignature ( ) . equals ( localParameterSig ) ) alreadyDone = true ; } } if ( ! alreadyDone ) { for ( Iterator iter = onType . getSuperclass ( ) . getMethods ( ) ; ( iter . hasNext ( ) ) && ( ! quitRightNow ) ; ) { ResolvedMember aMethod = ( ( ResolvedMember ) ( iter . next ( ) ) ) ; if ( ( aMethod . getName ( ) . equals ( localMethodName ) ) && ( aMethod . getParameterSignature ( ) . equals ( localParameterSig ) ) ) { <START_BUG> if ( ! ( aMethod . getReturnType ( ) . getErasureSignature ( ) . equals ( localReturnTypeESig ) ) ) { <END_BUG> createBridgeMethod ( weaver . getWorld ( ) , munger , unMangledInterMethod , gen , paramTypes , aMethod ) ; quitRightNow = true ; } } } } } private void createBridgeMethod ( BcelWorld world , NewMethodTypeMunger munger , ResolvedMember unMangledInterMethod , LazyClassGen gen , Type [ ] paramTypes , ResolvedMember aMethod ) { } private boolean mungeMethodDelegate ( BcelClassWeaver weaver , MethodDelegateTypeMunger munger ) { } private ResolvedMember getRealMemberForITDFromAspect ( ResolvedType aspectType , ResolvedMember lookingFor , boolean isCtorRelated ) { } private void addNeededSuperCallMethods ( BcelClassWeaver weaver , ResolvedType onType , Set neededSuperCalls ) { } private void signalError ( String msgid , BcelClassWeaver weaver , UnresolvedType onType ) { } private boolean mungeNewConstructor ( BcelClassWeaver weaver , NewConstructorTypeMunger newConstructorTypeMunger ) { } private static LazyMethodGen makeDispatcher ( LazyClassGen onGen , String dispatchName , ResolvedMember superMethod , BcelWorld world , boolean isSuper ) { } private boolean mungeNewField ( BcelClassWeaver weaver , NewFieldTypeMunger munger ) { } public ConcreteTypeMunger parameterizedFor ( ResolvedType target ) { } public List getTypeVariableAliases ( ) { } }

Fix:
if ( ( ! ( aMethod . getReturnType ( ) . getErasureSignature ( ) . equals ( localReturnTypeESig ) ) ) && ( ! ( Modifier . isPrivate ( aMethod . getModifiers ( ) ) ) ) ) {