Buggy code:
public abstract class Scope implements BaseTypes , BindingIds , CompilerModifiers , ProblemReasons , TagBits , TypeConstants , TypeIds { public static final int BLOCK_SCOPE = 1 ; public static final int METHOD_SCOPE = 2 ; public static final int CLASS_SCOPE = 3 ; public static final int COMPILATION_UNIT_SCOPE = 4 ; public int kind ; public Scope parent ; protected Scope ( int kind , Scope parent ) { } public static int compareTypes ( TypeBinding left , TypeBinding right ) { } public final ClassScope classScope ( ) { } public int compareUncheckedException ( ReferenceBinding type ) { } public final CompilationUnitScope compilationUnitScope ( ) { } protected final MethodBinding computeCompatibleMethod ( MethodBinding method , TypeBinding [ ] arguments , InvocationSite invocationSite ) { } protected boolean connectTypeVariables ( TypeParameter [ ] typeParameters ) { } public TypeVariableBinding [ ] createTypeVariables ( TypeParameter [ ] typeParameters , Binding declaringElement ) { } public ArrayBinding createArrayType ( TypeBinding type , int dimension ) { <START_BUG> if ( ( type . isValidBinding ( ) ) && ( ! ( type . isParameterizedType ( ) ) ) ) <END_BUG> return environment ( ) . createArrayType ( type , dimension ) ; return new ArrayBinding ( type , dimension , environment ( ) ) ; } public ParameterizedTypeBinding createParameterizedType ( ReferenceBinding genericType , TypeBinding [ ] arguments , ReferenceBinding enclosingType ) { } public boolean detectCycle ( ReferenceBinding superType ) { } public final ClassScope enclosingClassScope ( ) { } public final MethodScope enclosingMethodScope ( ) { } public final SourceTypeBinding enclosingSourceType ( ) { } public final LookupEnvironment environment ( ) { } protected void faultInReceiverType ( TypeBinding type ) { } public MethodBinding findDefaultAbstractMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite , ReferenceBinding classHierarchyStart , MethodBinding matchingMethod , ObjectVector found ) { } public ReferenceBinding findDirectMemberType ( char [ ] typeName , ReferenceBinding enclosingType ) { } public MethodBinding findExactMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public FieldBinding findField ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite , boolean needResolve ) { } public ReferenceBinding findMemberType ( char [ ] typeName , ReferenceBinding enclosingType ) { } public MethodBinding findMethod ( ReferenceBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public MethodBinding findMethodForArray ( ArrayBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public MethodBinding findMethodInSuperInterfaces ( ReferenceBinding currentType , char [ ] selector , ObjectVector found , MethodBinding matchingMethod ) { } public ReferenceBinding findType ( char [ ] typeName , PackageBinding declarationPackage , PackageBinding invocationPackage ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public TypeBinding getBaseType ( char [ ] name ) { } public Binding getBinding ( char [ ] name , int mask , InvocationSite invocationSite , boolean needResolve ) { } public MethodBinding getConstructor ( ReferenceBinding receiverType , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public final PackageBinding getCurrentPackage ( ) { } public int getDeclarationModifiers ( ) { } public FieldBinding getField ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding getImplicitMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public final ReferenceBinding getJavaIoSerializable ( ) { } public final ReferenceBinding getJavaLangAssertionError ( ) { } public final ReferenceBinding getJavaLangClass ( ) { } public final ReferenceBinding getJavaLangCloneable ( ) { } public final ReferenceBinding getJavaLangError ( ) { } public final ReferenceBinding getJavaLangIterable ( ) { } public final ReferenceBinding getJavaUtilIterator ( ) { } public final ReferenceBinding getJavaLangObject ( ) { } public final ReferenceBinding getJavaLangRuntimeException ( ) { } public final ReferenceBinding getJavaLangString ( ) { } public final ReferenceBinding getJavaLangThrowable ( ) { } public final ReferenceBinding getMemberType ( char [ ] typeName , ReferenceBinding enclosingType ) { } public MethodBinding getMethod ( TypeBinding receiverType , char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public final TypeBinding getType ( char [ ] name ) { } public final TypeBinding getType ( char [ ] [ ] compoundName , int typeNameLength ) { } final Binding getTypeOrPackage ( char [ ] name , int mask ) { } public final Binding getTypeOrPackage ( char [ ] [ ] compoundName ) { } public final boolean isDefinedInField ( FieldBinding field ) { } public final boolean isDefinedInMethod ( MethodBinding method ) { } public final boolean isDefinedInSameUnit ( ReferenceBinding type ) { } public final boolean isDefinedInType ( ReferenceBinding type ) { } public boolean isInsideDeprecatedCode ( ) { } public final MethodScope methodScope ( ) { } public TypeBinding mostSpecificCommonType ( TypeBinding [ ] types ) { } protected final MethodBinding mostSpecificClassMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } protected final MethodBinding mostSpecificInterfaceMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } protected final MethodBinding mostSpecificMethodBinding ( MethodBinding [ ] visible , int visibleSize , InvocationSite invocationSite ) { } public final ClassScope outerMostClassScope ( ) { } public final MethodScope outerMostMethodScope ( ) { } public abstract ProblemReporter problemReporter ( ) { } public final CompilationUnitDeclaration referenceCompilationUnit ( ) { } int startIndex ( ) { } public static TypeBinding [ ] substitute ( Substitution substitution , TypeBinding [ ] originalTypes ) { } public static ReferenceBinding [ ] substitute ( Substitution substitution , ReferenceBinding [ ] originalTypes ) { } public CaseStatement switchCase ( ) { } }

Fix:
if ( type . isValidBinding ( ) )