Buggy code:
public static final int DisableUnnecessaryCastCheck = ASTNode . Bit6 ; public static final int GenerateCheckcast = ASTNode . Bit7 ; public static final int UnsafeCast = ASTNode . Bit8 ; public static final int RestrictiveFlagMASK = ( ( ASTNode . Bit1 ) | ( ASTNode . Bit2 ) ) | ( ASTNode . Bit3 ) ; public static final int FirstAssignmentToLocal = ASTNode . Bit4 ; public static final int IsImplicitThis = ASTNode . Bit3 ; public static final int DepthSHIFT = 5 ; public static final int DepthMASK = ( ( ( ( ( ( ( ASTNode . Bit6 ) | ( ASTNode . Bit7 ) ) | ( ASTNode . Bit8 ) ) | ( ASTNode . Bit9 ) ) | ( ASTNode . Bit10 ) ) | ( ASTNode . Bit11 ) ) | ( ASTNode . Bit12 ) ) | ( ASTNode . Bit13 ) ; public static final int IsReachable = ASTNode . Bit32 ; public static final int LabelUsed = ASTNode . Bit7 ; public static final int DocumentedFallthrough = ASTNode . Bit30 ; public static final int IsLocalDeclarationReachable = ASTNode . Bit31 ; public static final int IsSubRoutineEscaping = ASTNode . Bit15 ; public static final int IsTryBlockExiting = ASTNode . Bit30 ; public static final int ContainsAssertion = ASTNode . Bit1 ; public static final int IsLocalType = ASTNode . Bit9 ; public static final int IsAnonymousType = ASTNode . Bit10 ; public static final int IsMemberType = ASTNode . Bit11 ; public static final int HasAbstractMethods = ASTNode . Bit12 ; public static final int IsSecondaryType = ASTNode . Bit13 ; public static final int HasLocalType = ASTNode . Bit2 ; public static final int ParenthesizedSHIFT = 21 ; public static final int ParenthesizedMASK = ( ( ( ( ( ( ( ASTNode . Bit22 ) | ( ASTNode . Bit23 ) ) | ( ASTNode . Bit24 ) ) | ( ASTNode . Bit25 ) ) | ( ASTNode . Bit26 ) ) | ( ASTNode . Bit27 ) ) | ( ASTNode . Bit28 ) ) | ( ASTNode . Bit29 ) ; public static final int IgnoreNoEffectAssignCheck = ASTNode . Bit30 ; public static final int IsStrictlyAssigned = ASTNode . Bit14 ; public static final int IsCompoundAssigned = ASTNode . Bit17 ; public static final int IsUsefulEmptyStatement = ASTNode . Bit1 ; public static final int UndocumentedEmptyBlock = ASTNode . Bit4 ; public static final int OverridingMethodWithSupercall = ASTNode . Bit5 ; public static final int HasAllMethodBodies = ASTNode . Bit5 ; public static final int IsImplicitUnit = ASTNode . Bit1 ; public static final int InsideJavadoc = ASTNode . Bit16 ; public static final int IsElseIfStatement = ASTNode . Bit30 ; public static final int IsSuperType = ASTNode . Bit5 ; public static final int IsVarArgs = ASTNode . Bit15 ; public static final int IgnoreRawTypeCheck = ASTNode . Bit31 ; public static final int IsAnnotationDefaultValue = ASTNode . Bit1 ; public static final int IsNonNull = ASTNode . Bit18 ; public static final int INVOCATION_ARGUMENT_OK = 0 ; public static final int INVOCATION_ARGUMENT_UNCHECKED = 1 ; public static final int INVOCATION_ARGUMENT_WILDCARD = 2 ; public ASTNode ( ) { } private static int checkInvocationArgument ( BlockScope scope , Expression argument , TypeBinding parameterType , TypeBinding argumentType , TypeBinding originalParameterType ) { } public static void checkInvocationArguments ( BlockScope scope , Expression receiver , TypeBinding receiverType , MethodBinding method , Expression [ ] arguments , TypeBinding [ ] argumentTypes , boolean argsContainCast , InvocationSite invocationSite ) { } public ASTNode concreteStatement ( ) { } public final boolean isFieldUseDeprecated ( FieldBinding field , Scope scope , boolean isStrictlyAssigned ) { } public boolean isImplicitThis ( ) { } public final boolean isMethodUseDeprecated ( MethodBinding method , Scope scope , boolean isExplicitUse ) { } public boolean isSuper ( ) { } public boolean isThis ( ) { } public final boolean isTypeUseDeprecated ( TypeBinding type , Scope scope ) { if ( type . isArrayType ( ) ) type = ( ( ArrayBinding ) ( type ) ) . leafComponentType ; if ( type . isBaseType ( ) ) return false ; ReferenceBinding refType = ( ( ReferenceBinding ) ( type ) ) ; <START_BUG> if ( ( refType . isPrivate ( ) ) && ( ! ( scope . isDefinedInType ( refType ) ) ) ) { <END_BUG> ( ( ReferenceBinding ) ( refType . erasure ( ) ) ) . modifiers |= ExtraCompilerModifiers . AccLocallyUsed ; } if ( refType . hasRestrictedAccess ( ) ) { AccessRestriction restriction = scope . environment ( ) . getAccessRestriction ( type . erasure ( ) ) ; if ( restriction != null ) { scope . problemReporter ( ) . forbiddenReference ( type , this , restriction . getMessageTemplate ( ) , restriction . getProblemId ( ) ) ; } } refType . initializeDeprecatedAnnotationTagBits ( ) ; if ( ! ( refType . isViewedAsDeprecated ( ) ) ) return false ; if ( scope . isDefinedInSameUnit ( refType ) ) return false ; if ( ( ! ( scope . compilerOptions ( ) . reportDeprecationInsideDeprecatedCode ) ) && ( scope . isInsideDeprecatedCode ( ) ) ) return false ; return true ; } public abstract StringBuffer print ( int indent , StringBuffer output ) { } public static StringBuffer printAnnotations ( Annotation [ ] annotations , StringBuffer output ) { } public static StringBuffer printIndent ( int indent , StringBuffer output ) { } public static StringBuffer printModifiers ( int modifiers , StringBuffer output ) { } public static void resolveAnnotations ( BlockScope scope , Annotation [ ] annotations , Binding recipient ) { } public static void resolveDeprecatedAnnotations ( BlockScope scope , Annotation [ ] annotations , Binding recipient ) { } public int sourceStart ( ) { } public int sourceEnd ( ) { } public String toString ( ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( refType . isPrivate ( ) ) || ( refType . isLocalType ( ) ) ) && ( ! ( scope . isDefinedInType ( refType ) ) ) ) {