Buggy code:
public FieldBinding addSyntheticFieldForAssert ( BlockScope blockScope ) { } public FieldBinding addSyntheticFieldForEnumValues ( ) { } public SyntheticMethodBinding addSyntheticMethod ( FieldBinding targetField , boolean isReadAccess ) { } public SyntheticMethodBinding addSyntheticEnumMethod ( char [ ] selector ) { } public SyntheticFieldBinding addSyntheticFieldForSwitchEnum ( char [ ] fieldName , String key ) { } public SyntheticMethodBinding addSyntheticMethodForSwitchEnum ( TypeBinding enumBinding ) { } public SyntheticMethodBinding addSyntheticMethod ( MethodBinding targetMethod , boolean isSuperAccess ) { } public SyntheticMethodBinding addSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge , MethodBinding targetMethod ) { } public int kind ( ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } void faultInTypesForFieldsAndMethods ( ) { } public FieldBinding [ ] fields ( ) { } public char [ ] genericTypeSignature ( ) { } public char [ ] genericSignature ( ) { } public long getAnnotationTagBits ( ) { } public MethodBinding [ ] getDefaultAbstractMethods ( ) { } public MethodBinding getExactConstructor ( TypeBinding [ ] argumentTypes ) { } public MethodBinding getExactMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , CompilationUnitScope refScope ) { } public FieldBinding getField ( char [ ] fieldName , boolean needResolve ) { } public MethodBinding [ ] getMethods ( char [ ] selector ) { } public FieldBinding getSyntheticField ( LocalVariableBinding actualOuterLocalVariable ) { } public FieldBinding getSyntheticField ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch ) { } public SyntheticMethodBinding getSyntheticBridgeMethod ( MethodBinding inheritedMethodToBridge ) { } public void initializeDeprecatedAnnotationTagBits ( ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isGenericType ( ) { } public ReferenceBinding [ ] memberTypes ( ) { } public FieldBinding getUpdatedFieldBinding ( FieldBinding targetField , ReferenceBinding newDeclaringClass ) { } public MethodBinding getUpdatedMethodBinding ( MethodBinding targetMethod , ReferenceBinding newDeclaringClass ) { } public boolean hasMemberTypes ( ) { } public MethodBinding [ ] methods ( ) { } private FieldBinding resolveTypeFor ( FieldBinding field ) { } private MethodBinding resolveTypesFor ( MethodBinding method ) { if ( ( ( method . modifiers ) & ( ExtraCompilerModifiers . AccUnresolved ) ) == 0 ) return method ; if ( ( this . scope . compilerOptions ( ) . sourceLevel ) >= ( ClassFileConstants . JDK1_5 ) ) { if ( ( ( method . getAnnotationTagBits ( ) ) & ( TagBits . AnnotationDeprecated ) ) != 0 ) method . modifiers |= ClassFileConstants . AccDeprecated ; } if ( ( isViewedAsDeprecated ( ) ) && ( ! ( method . isDeprecated ( ) ) ) ) method . modifiers |= ExtraCompilerModifiers . AccDeprecatedImplicitly ; if ( hasRestrictedAccess ( ) ) method . modifiers |= ExtraCompilerModifiers . AccRestrictedAccess ; AbstractMethodDeclaration methodDecl = method . sourceMethod ( ) ; if ( methodDecl == null ) return null ; TypeParameter [ ] typeParameters = methodDecl . typeParameters ( ) ; if ( typeParameters != null ) { methodDecl . scope . connectTypeVariables ( typeParameters , true ) ; for ( int i = 0 , paramLength = typeParameters . length ; i < paramLength ; i ++ ) typeParameters [ i ] . checkBounds ( methodDecl . scope ) ; } TypeReference [ ] exceptionTypes = methodDecl . thrownExceptions ; if ( exceptionTypes != null ) { int size = exceptionTypes . length ; method . thrownExceptions = new ReferenceBinding [ size ] ; int count = 0 ; ReferenceBinding resolvedExceptionType ; for ( int i = 0 ; i < size ; i ++ ) { resolvedExceptionType = ( ( ReferenceBinding ) ( exceptionTypes [ i ] . resolveType ( methodDecl . scope , true ) ) ) ; if ( resolvedExceptionType == null ) continue ; if ( resolvedExceptionType . isBoundParameterizedType ( ) ) { methodDecl . scope . problemReporter ( ) . invalidParameterizedExceptionType ( resolvedExceptionType , exceptionTypes [ i ] ) ; continue ; } if ( ( resolvedExceptionType . findSuperTypeErasingTo ( TypeIds . T_JavaLangThrowable , true ) ) == null ) { <START_BUG> methodDecl . scope . problemReporter ( ) . cannotThrowType ( this , methodDecl , exceptionTypes [ i ] , resolvedExceptionType ) ; <END_BUG> continue ; } if ( ( ( resolvedExceptionType . modifiers ) & ( ExtraCompilerModifiers . AccGenericSignature ) ) != 0 ) method . modifiers |= ExtraCompilerModifiers . AccGenericSignature ; method . thrownExceptions [ ( count ++ ) ] = resolvedExceptionType ; } if ( count < size ) System . arraycopy ( method . thrownExceptions , 0 , ( method . thrownExceptions = new ReferenceBinding [ count ] ) , 0 , count ) ; } boolean foundArgProblem = false ; Argument [ ] arguments = methodDecl . arguments ; if ( arguments != null ) { int size = arguments . length ; method . parameters = new TypeBinding [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { Argument arg = arguments [ i ] ; TypeBinding parameterType = arg . type . resolveType ( methodDecl . scope , true ) ; if ( parameterType == null ) { foundArgProblem = true ; } else if ( parameterType == ( TypeBinding . VOID ) ) { methodDecl . scope . problemReporter ( ) . argumentTypeCannotBeVoid ( this , methodDecl , arg ) ; foundArgProblem = true ; } else if ( ( parameterType . isArrayType ( ) ) && ( ( ( ( ArrayBinding ) ( parameterType ) ) . leafComponentType ) == ( TypeBinding . VOID ) ) ) { methodDecl . scope . problemReporter ( ) . argumentTypeCannotBeVoidArray ( this , methodDecl , arg ) ; foundArgProblem = true ; } else { TypeBinding leafType = parameterType . leafComponentType ( ) ; if ( ( leafType instanceof ReferenceBinding ) && ( ( ( ( ( ReferenceBinding ) ( leafType ) ) . modifiers ) & ( ExtraCompilerModifiers . AccGenericSignature ) ) != 0 ) ) method . modifiers |= ExtraCompilerModifiers . AccGenericSignature ; method . parameters [ i ] = parameterType ; } } }

Fix:
methodDecl . scope . problemReporter ( ) . cannotThrowType ( exceptionTypes [ i ] , resolvedExceptionType ) ;