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 , null , ProblemReasons . NotFound ) ; private Map accessRestrictions ; ImportBinding [ ] defaultImports ; PackageBinding defaultPackage ; HashtableOfPackage knownPackages ; private int lastCompletedUnitIndex = - 1 ; private int lastUnitIndex = - 1 ; public INameEnvironment nameEnvironment ; public CompilerOptions globalOptions ; 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 globalOptions , 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 ) { } public TypeBinding computeBoxingType ( TypeBinding type ) { } private PackageBinding computePackageFrom ( char [ ] [ ] constantPoolName ) { } public TypeBinding convertToRawType ( TypeBinding type ) { } public ArrayBinding createArrayType ( TypeBinding leafComponentType , 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 [ ] typeArguments , ReferenceBinding enclosingType ) { } public RawTypeBinding createRawType ( ReferenceBinding genericType , ReferenceBinding enclosingType ) { } public WildcardBinding createWildcard ( ReferenceBinding genericType , int rank , TypeBinding bound , TypeBinding [ ] otherBounds , int boundKind ) { } 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 ) { if ( accessRestriction == null ) return ; <START_BUG> type . modifiers |= CompilerModifiers . AccRestrictedAccess ; <END_BUG> this . accessRestrictions . put ( type , accessRestriction ) ; } void updateCaches ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType ) { } }

Fix:
type . modifiers |= ExtraCompilerModifiers . AccRestrictedAccess ;