Buggy code:
public class LookupEnvironment implements BaseTypes , ProblemReasons , TypeConstants { static final int BUILD_FIELDS_AND_METHODS = 4 ; static final int BUILD_TYPE_HIERARCHY = 1 ; static final int CHECK_AND_SET_IMPORTS = 2 ; static final int CONNECT_TYPE_HIERARCHY = 3 ; static final ProblemPackageBinding TheNotFoundPackage = new ProblemPackageBinding ( CharOperation . NO_CHAR , ProblemReasons . NotFound ) ; static final ProblemReferenceBinding TheNotFoundType = new ProblemReferenceBinding ( CharOperation . NO_CHAR , ProblemReasons . NotFound ) ; private Map accessRestrictions ; ImportBinding [ ] defaultImports ; PackageBinding defaultPackage ; HashtableOfPackage knownPackages ; private int lastCompletedUnitIndex = - 1 ; private int lastUnitIndex = - 1 ; public INameEnvironment nameEnvironment ; public CompilerOptions options ; public ProblemReporter problemReporter ; public boolean sharedArraysUsed = true ; public byte [ ] sharedClassFileContents = null ; public byte [ ] sharedClassFileHeader = null ; private int stepCompleted ; public ITypeRequestor typeRequestor ; private ArrayBinding [ ] [ ] uniqueArrayBindings ; private SimpleLookupTable uniqueParameterizedTypeBindings ; private SimpleLookupTable uniqueRawTypeBindings ; private SimpleLookupTable uniqueWildcardBindings ; public CompilationUnitDeclaration unitBeingCompleted = null ; private CompilationUnitDeclaration [ ] units = new CompilationUnitDeclaration [ 4 ] ; private MethodVerifier verifier ; public LookupEnvironment ( ITypeRequestor typeRequestor , CompilerOptions options , ProblemReporter problemReporter , INameEnvironment nameEnvironment ) { } public ReferenceBinding askForType ( char [ ] [ ] compoundName ) { } ReferenceBinding askForType ( PackageBinding packageBinding , char [ ] name ) { } public void buildTypeBindings ( CompilationUnitDeclaration unit , AccessRestriction accessRestriction ) { } public BinaryTypeBinding cacheBinaryType ( IBinaryType binaryType , AccessRestriction accessRestriction ) { } public BinaryTypeBinding cacheBinaryType ( IBinaryType binaryType , boolean needFieldsAndMethods , AccessRestriction accessRestriction ) { } public void completeTypeBindings ( ) { } public void completeTypeBindings ( CompilationUnitDeclaration parsedUnit ) { } public void completeTypeBindings ( CompilationUnitDeclaration parsedUnit , boolean buildFieldsAndMethods ) { } private PackageBinding computePackageFrom ( char [ ] [ ] constantPoolName ) { } public ArrayBinding createArrayType ( TypeBinding type , int dimensionCount ) { } public BinaryTypeBinding createBinaryTypeFrom ( IBinaryType binaryType , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } public BinaryTypeBinding createBinaryTypeFrom ( IBinaryType binaryType , PackageBinding packageBinding , boolean needFieldsAndMethods , AccessRestriction accessRestriction ) { } PackageBinding createPackage ( char [ ] [ ] compoundName ) { } public ParameterizedTypeBinding createParameterizedType ( ReferenceBinding genericType , TypeBinding [ ] originalArguments , ReferenceBinding enclosingType ) { } public RawTypeBinding createRawType ( ReferenceBinding genericType , ReferenceBinding enclosingType ) { } public WildcardBinding createWildcard ( ReferenceBinding genericType , int rank , TypeBinding bound , int kind ) { } public AccessRestriction getAccessRestriction ( TypeBinding type ) { } public ReferenceBinding getCachedType ( char [ ] [ ] compoundName ) { } PackageBinding getPackage0 ( char [ ] name ) { } PackageBinding getTopLevelPackage ( char [ ] name ) { } public ReferenceBinding getType ( char [ ] [ ] compoundName ) { } private TypeBinding [ ] getTypeArgumentsFromSignature ( SignatureWrapper wrapper , TypeVariableBinding [ ] staticVariables , ReferenceBinding enclosingType , ReferenceBinding genericType ) { } ReferenceBinding getTypeFromConstantPoolName ( char [ ] signature , int start , int end , boolean isParameterized ) { } TypeBinding getTypeFromSignature ( char [ ] signature , int start , int end , boolean isParameterized , TypeBinding enclosingType ) { } TypeBinding getTypeFromTypeSignature ( SignatureWrapper wrapper , TypeVariableBinding [ ] staticVariables , ReferenceBinding enclosingType ) { } TypeBinding getTypeFromVariantTypeSignature ( SignatureWrapper wrapper , TypeVariableBinding [ ] staticVariables , ReferenceBinding enclosingType , ReferenceBinding genericType , int rank ) { } boolean isPackage ( char [ ] [ ] compoundName , char [ ] name ) { } public MethodVerifier methodVerifier ( ) { } public void reset ( ) { } public void setAccessRestriction ( ReferenceBinding type , AccessRestriction accessRestriction ) { } void updateCaches ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType ) { if ( ( this . uniqueParameterizedTypeBindings . get ( unresolvedType ) ) != null ) { Object [ ] keys = this . uniqueParameterizedTypeBindings . keyTable ; for ( int i = 0 , l = keys . length ; i < l ; i ++ ) { if ( ( keys [ i ] ) == unresolvedType ) { keys [ i ] = resolvedType ; break ; } } } if ( ( this . uniqueWildcardBindings . get ( unresolvedType ) ) != null ) { Object [ ] keys = this . uniqueWildcardBindings . keyTable ; for ( int i = 0 , l = keys . length ; i < l ; i ++ ) { if ( ( keys [ i ] ) == unresolvedType ) { <START_BUG> keys [ i ] = ( resolvedType . isGenericType ( ) ) ? createRawType ( resolvedType , resolvedType . enclosingType ( ) ) : resolvedType ; <END_BUG> break ; } } } } }

Fix:
keys [ i ] = resolvedType ;