Buggy code:
public class Member implements Comparable { private final Member . Kind kind ; private final TypeX declaringType ; protected final int modifiers ; private final TypeX returnType ; private final String name ; private final TypeX [ ] parameterTypes ; private final String signature ; public Member ( Member . Kind kind , TypeX declaringType , int modifiers , String name , String signature ) { } public Member ( Member . Kind kind , TypeX declaringType , int modifiers , TypeX returnType , String name , TypeX [ ] parameterTypes ) { } public ResolvedMember resolve ( World world ) { } public static String typesToSignature ( TypeX returnType , TypeX [ ] paramTypes ) { } private static Object [ ] signatureToTypes ( String sig ) { } public static Member field ( String declaring , int mods , String name , String signature ) { } public static Member field ( TypeX declaring , int mods , String name , TypeX type ) { } public static Member method ( TypeX declaring , int mods , String name , String signature ) { } public static Member pointcut ( TypeX declaring , String name , String signature ) { } private static Member field ( String declaring , int mods , TypeX ty , String name ) { } public static Member method ( TypeX declTy , int mods , TypeX rTy , String name , TypeX [ ] paramTys ) { } private static Member pointcut ( TypeX declTy , int mods , TypeX rTy , String name , TypeX [ ] paramTys ) { } public static Member makeExceptionHandlerSignature ( TypeX inType , TypeX catchType ) { } public static Member fieldFromString ( String str ) { } public static Member methodFromString ( String str ) { } private static String [ ] parseIds ( String str ) { } private static final String [ ] ZERO_STRINGS = new String [ 0 ] ; public boolean equals ( Object other ) { } public int compareTo ( Object other ) { } private volatile int hashCode = 0 ; public int hashCode ( ) { } public String toString ( ) { } public String toLongString ( ) { } public Member . Kind getKind ( ) { } public TypeX getDeclaringType ( ) { } public TypeX getReturnType ( ) { } public TypeX getType ( ) { } public String getName ( ) { } public TypeX [ ] getParameterTypes ( ) { } public String getSignature ( ) { } public int getArity ( ) { } public boolean isCompatibleWith ( Member am ) { } private static boolean equalTypes ( TypeX [ ] a , TypeX [ ] b ) { } public int getModifiers ( World world ) { } public TypeX [ ] getExceptions ( World world ) { } public final boolean isProtected ( World world ) { } public final boolean isStatic ( World world ) { } public final boolean isStrict ( World world ) { } public final boolean isStatic ( ) { } public final boolean isInterface ( ) { } public final boolean isPrivate ( ) { } public final int getCallsiteModifiers ( ) { } public final String getExtractableName ( ) { } public static final Member [ ] NONE = new Member [ 0 ] ; public static class Kind extends TypeSafeEnum { public Kind ( String name , int key ) { } public static Member . Kind read ( DataInputStream s ) throws IOException { } } public static final Member . Kind METHOD = new Member . Kind ( "METHOD" , 1 ) ; public static final Member . Kind FIELD = new Member . Kind ( "FIELD" , 2 ) ; public static final Member . Kind CONSTRUCTOR = new Member . Kind ( "CONSTRUCTOR" , 3 ) ; public static final Member . Kind STATIC_INITIALIZATION = new Member . Kind ( "STATIC_INITIALIZATION" , 4 ) ; public static final Member . Kind POINTCUT = new Member . Kind ( "POINTCUT" , 5 ) ; public static final Member . Kind ADVICE = new Member . Kind ( "ADVICE" , 6 ) ; public static final Member . Kind HANDLER = new Member . Kind ( "HANDLER" , 7 ) ; public Collection getDeclaringTypes ( World world ) { } private boolean walkUp ( Collection acc , ResolvedTypeX curr ) { } private boolean walkUpStatic ( Collection acc , ResolvedTypeX curr ) { if ( ( curr . lookupMemberNoSupers ( this ) ) != null ) { acc . add ( curr ) ; return true ; } else { boolean b = false ; for ( Iterator i = curr . getDirectSupertypes ( ) ; i . hasNext ( ) ; ) { <START_BUG> b |= walkUp ( acc , ( ( ResolvedTypeX ) ( i . next ( ) ) ) ) ; <END_BUG> } if ( b ) acc . add ( curr ) ; return b ; } } public String getSignatureMakerName ( ) { } public String getSignatureType ( ) { } public String getSignatureString ( World world ) { } private String getHandlerSignatureString ( World world ) { } private String getStaticInitializationSignatureString ( World world ) { } protected String getAdviceSignatureString ( World world ) { } protected String getMethodSignatureString ( World world ) { } protected String getConstructorSignatureString ( World world ) { } protected String getFieldSignatureString ( World world ) { } protected String makeString ( int i ) { } protected String makeString ( TypeX t ) { } protected String makeString ( TypeX [ ] types ) { } protected String makeString ( String [ ] names ) { } public String [ ] getParameterNames ( World world ) { } }

Fix:
b |= walkUpStatic ( acc , ( ( ResolvedTypeX ) ( i . next ( ) ) ) ) ;