Buggy code:
public class CompilationUnitScope extends Scope { public LookupEnvironment environment ; public CompilationUnitDeclaration referenceContext ; public char [ ] [ ] currentPackageName ; public PackageBinding fPackage ; public ImportBinding [ ] imports ; public HashtableOfObject typeOrPackageCache ; public SourceTypeBinding [ ] topLevelTypes ; private CompoundNameVector qualifiedReferences ; private SimpleNameVector simpleNameReferences ; private ObjectVector referencedTypes ; private ObjectVector referencedSuperTypes ; HashtableOfType constantPoolNameUsage ; public CompilationUnitScope ( CompilationUnitDeclaration unit , LookupEnvironment environment ) { } void buildFieldsAndMethods ( ) { } void buildTypeBindings ( AccessRestriction accessRestriction ) { } void checkAndSetImports ( ) { } void checkParameterizedTypeBounds ( ) { } public char [ ] computeConstantPoolName ( LocalTypeBinding localType ) { } void connectTypeHierarchy ( ) { } void faultInImports ( ) { } public void faultInTypes ( ) { } private Binding findImport ( char [ ] [ ] compoundName , int length ) { } private Binding findSingleImport ( char [ ] [ ] compoundName , boolean findStaticImports ) { } private Binding findSingleStaticImport ( char [ ] [ ] compoundName ) { Binding binding = findImport ( compoundName , ( ( compoundName . length ) - 1 ) ) ; if ( ! ( binding . isValidBinding ( ) ) ) return binding ; char [ ] name = compoundName [ ( ( compoundName . length ) - 1 ) ] ; if ( binding instanceof PackageBinding ) { Binding temp = ( ( PackageBinding ) ( binding ) ) . getTypeOrPackage ( name ) ; if ( ( temp != null ) && ( temp instanceof ReferenceBinding ) ) return new ProblemReferenceBinding ( compoundName , ( ( ReferenceBinding ) ( temp ) ) , ProblemReasons . InvalidTypeForStaticImport ) ; return binding ; } ReferenceBinding type = ( ( ReferenceBinding ) ( binding ) ) ; FieldBinding field = findField ( type , name , null , true ) ; <START_BUG> if ( ( ( ( field != null ) && ( field . isValidBinding ( ) ) ) && ( field . isStatic ( ) ) ) && ( field . canBeSeenBy ( fPackage ) ) ) <END_BUG> return field ; MethodBinding method = findStaticMethod ( type , name ) ; if ( method != null ) return method ; type = findMemberType ( name , type ) ; if ( ( type == null ) || ( ! ( type . isStatic ( ) ) ) ) { if ( ( ( field != null ) && ( ! ( field . isValidBinding ( ) ) ) ) && ( ( field . problemId ( ) ) != ( ProblemReasons . NotFound ) ) ) return field ; return new ProblemReferenceBinding ( compoundName , type , ProblemReasons . NotFound ) ; } if ( ! ( type . canBeSeenBy ( fPackage ) ) ) return new ProblemReferenceBinding ( compoundName , type , ProblemReasons . NotVisible ) ; return type ; } MethodBinding findStaticMethod ( ReferenceBinding currentType , char [ ] selector ) { } ImportBinding [ ] getDefaultImports ( ) { } public final Binding getImport ( char [ ] [ ] compoundName , boolean onDemand , boolean isStaticImport ) { } public ProblemReporter problemReporter ( ) { } void recordQualifiedReference ( char [ ] [ ] qualifiedName ) { } void recordReference ( char [ ] [ ] qualifiedEnclosingName , char [ ] simpleName ) { } void recordReference ( ReferenceBinding type , char [ ] simpleName ) { } void recordSimpleReference ( char [ ] simpleName ) { } void recordSuperTypeReference ( TypeBinding type ) { } public void recordTypeConversion ( TypeBinding superType , TypeBinding subType ) { } void recordTypeReference ( TypeBinding type ) { } void recordTypeReferences ( TypeBinding [ ] types ) { } Binding resolveSingleImport ( ImportBinding importBinding ) { } public void storeDependencyInfo ( ) { } public String toString ( ) { } private ReferenceBinding typeToRecord ( TypeBinding type ) { } public void verifyMethods ( MethodVerifier verifier ) { } }

Fix:
if ( ( ( ( field != null ) && ( field . isValidBinding ( ) ) ) && ( field . isStatic ( ) ) ) && ( field . canBeSeenBy ( type , null , this ) ) )