Buggy code:
public abstract class World implements Dump . INode { private IMessageHandler messageHandler = IMessageHandler . SYSTEM_ERR ; private ICrossReferenceHandler xrefHandler = null ; protected World . TypeMap typeMap = new World . TypeMap ( ) ; private World . AspectPrecedenceCalculator precedenceCalculator ; private CrosscuttingMembersSet crosscuttingMembersSet = new CrosscuttingMembersSet ( this ) ; private IHierarchy model = null ; private Lint lint = new Lint ( this ) ; private boolean XnoInline ; private boolean XlazyTjp ; private boolean XhasMember = false ; private boolean behaveInJava5Way = false ; private List dumpState_cantFindTypeExceptions = null ; protected World ( ) { } public void accept ( Dump . IVisitor visitor ) { } public ResolvedType resolve ( UnresolvedType ty ) { } public ResolvedType resolve ( UnresolvedType ty , ISourceLocation isl ) { } public ResolvedType [ ] resolve ( UnresolvedType [ ] types ) { } public ResolvedType resolve ( UnresolvedType ty , boolean allowMissing ) { } private void handleRequiredMissingTypeDuringResolution ( UnresolvedType ty ) { } public ResolvedType resolve ( ResolvedType ty ) { } public ResolvedType resolve ( String name ) { } public ResolvedType resolve ( String name , boolean allowMissing ) { } private final ResolvedType resolveToReferenceType ( UnresolvedType ty ) { if ( ty . isParameterizedType ( ) ) { ReferenceType genericType = ( ( ReferenceType ) ( resolveGenericTypeFor ( ty , false ) ) ) ; ReferenceType parameterizedType = TypeFactory . createParameterizedType ( genericType , ty . typeParameters , this ) ; return parameterizedType ; } else if ( ty . isGenericType ( ) ) { ReferenceType genericType = ( ( ReferenceType ) ( resolveGenericTypeFor ( ty , false ) ) ) ; return genericType ; } else if ( ty . isGenericWildcard ( ) ) { return resolveGenericWildcardFor ( ty ) ; } else { String erasedSignature = ty . getErasureSignature ( ) ; ReferenceType simpleOrRawType = new ReferenceType ( erasedSignature , this ) ; ReferenceTypeDelegate delegate = resolveDelegate ( simpleOrRawType ) ; if ( delegate == null ) return ResolvedType . MISSING ; <START_BUG> if ( delegate . isGeneric ( ) ) { <END_BUG> simpleOrRawType . typeKind = TypeKind . RAW ; ReferenceType genericType = new ReferenceType ( UnresolvedType . forGenericTypeSignature ( erasedSignature , delegate . getDeclaredGenericSignature ( ) ) , this ) ; simpleOrRawType . setDelegate ( delegate ) ; genericType . setDelegate ( delegate ) ; simpleOrRawType . setGenericType ( genericType ) ; return simpleOrRawType ; } else { simpleOrRawType . setDelegate ( delegate ) ; return simpleOrRawType ; } } } public ResolvedType resolveGenericTypeFor ( UnresolvedType anUnresolvedType , boolean allowMissing ) { } private ReferenceType resolveGenericWildcardFor ( UnresolvedType aType ) { } protected abstract ReferenceTypeDelegate resolveDelegate ( ReferenceType ty ) { } public ResolvedType getCoreType ( UnresolvedType tx ) { } public ReferenceType lookupOrCreateName ( UnresolvedType ty ) { } public ReferenceType lookupBySignature ( String signature ) { } public ResolvedMember resolve ( Member member ) { } public abstract Advice createAdviceMunger ( AjAttribute . AdviceAttribute attribute , Pointcut pointcut , Member signature ) { } public final Advice createAdviceMunger ( AdviceKind kind , Pointcut p , Member signature , int extraParameterFlags , IHasSourceLocation loc ) { } public abstract ConcreteTypeMunger makeCflowStackFieldAdder ( ResolvedMember cflowField ) { } public abstract ConcreteTypeMunger makeCflowCounterFieldAdder ( ResolvedMember cflowField ) { } public abstract ConcreteTypeMunger makePerClauseAspect ( ResolvedType aspect , PerClause . Kind kind ) { } public abstract ConcreteTypeMunger concreteTypeMunger ( ResolvedTypeMunger munger , ResolvedType aspectType ) { } public int compareByPrecedence ( ResolvedType aspect1 , ResolvedType aspect2 ) { } public int compareByPrecedenceAndHierarchy ( ResolvedType aspect1 , ResolvedType aspect2 ) { } public IMessageHandler getMessageHandler ( ) { } public void setMessageHandler ( IMessageHandler messageHandler ) { } public void showMessage ( Kind kind , String message , ISourceLocation loc1 , ISourceLocation loc2 ) { } public void setCrossReferenceHandler ( ICrossReferenceHandler xrefHandler ) { } public ICrossReferenceHandler getCrossReferenceHandler ( ) { } public List getDeclareParents ( ) { } public List getDeclareAnnotationOnTypes ( ) { } public List getDeclareAnnotationOnFields ( ) { } public List getDeclareAnnotationOnMethods ( ) { } public List getDeclareSoft ( ) { } public CrosscuttingMembersSet getCrosscuttingMembersSet ( ) { } public IHierarchy getModel ( ) { } public void setModel ( IHierarchy model ) { } public Lint getLint ( ) { } public void setLint ( Lint lint ) { } public boolean isXnoInline ( ) { } public void setXnoInline ( boolean xnoInline ) { } public boolean isXlazyTjp ( ) { } public void setXlazyTjp ( boolean b ) { } public boolean isHasMemberSupportEnabled ( ) { } public void setXHasMemberSupportEnabled ( boolean b ) { } public void setBehaveInJava5Way ( boolean b ) { } public boolean isInJava5Mode ( ) { } protected static class TypeMap { private Map tMap = new HashMap ( ) ; private Map expendableMap = new WeakHashMap ( ) ; private static final boolean debug = false ; public ResolvedType put ( String key , ResolvedType type ) { } public ResolvedType get ( String key ) { } public ResolvedType remove ( String key ) { } private boolean isExpendable ( ResolvedType type ) { } public String toString ( ) { } private String dumpthem ( Map m ) { } } private static class AspectPrecedenceCalculator { private World world ; private Map cachedResults ; public AspectPrecedenceCalculator ( World forSomeWorld ) { } public int compareByPrecedence ( ResolvedType firstAspect , ResolvedType secondAspect ) { } public int compareByPrecedenceAndHierarchy ( ResolvedType firstAspect , ResolvedType secondAspect ) { } private static class PrecedenceCacheKey { public ResolvedType aspect1 ; public ResolvedType aspect2 ; public PrecedenceCacheKey ( ResolvedType a1 , ResolvedType a2 ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } } } }

Fix:
if ( ( delegate . isGeneric ( ) ) && ( behaveInJava5Way ) ) {