Buggy code:
public class CodeSnippetMessageSend extends MessageSend implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetMessageSend ( EvaluationContext evaluationContext ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; this . qualifyingType = this . receiverType = receiver . resolveType ( scope ) ; TypeBinding [ ] argumentTypes = NoParameters ; if ( ( arguments ) != null ) { boolean argHasError = false ; int length = arguments . length ; argumentTypes = new TypeBinding [ length ] ; for ( int i = 0 ; i < length ; i ++ ) if ( ( argumentTypes [ i ] = arguments [ i ] . resolveType ( scope ) ) == null ) argHasError = true ; if ( argHasError ) return null ; } if ( ( receiverType ) == null ) return null ; if ( receiverType . isBaseType ( ) ) { scope . problemReporter ( ) . errorNoMethodFor ( this , receiverType , argumentTypes ) ; return null ; } binding = ( ( receiver ) == ( ThisImplicit ) ) ? scope . getImplicitMethod ( selector , argumentTypes , this ) : scope . getMethod ( receiverType , selector , argumentTypes , this ) ; if ( ! ( binding . isValidBinding ( ) ) ) { if ( ( ( binding ) instanceof ProblemMethodBinding ) && ( ( ( ( ProblemMethodBinding ) ( binding ) ) . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) { if ( ( this . evaluationContext . declaringTypeName ) != null ) { delegateThis = scope . getField ( scope . enclosingSourceType ( ) , EvaluationConstants . DELEGATE_THIS , this ) ; if ( ( delegateThis ) == null ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidMethod ( this , binding ) ; return null ; } } else { constant = NotAConstant ; scope . problemReporter ( ) . invalidMethod ( this , binding ) ; return null ; } CodeSnippetScope localScope = new CodeSnippetScope ( scope ) ; MethodBinding privateBinding = ( ( ( receiver ) instanceof CodeSnippetThisReference ) && ( ( ( CodeSnippetThisReference ) ( receiver ) ) . isImplicit ) ) ? localScope . getImplicitMethod ( ( ( ReferenceBinding ) ( delegateThis . type ) ) , selector , argumentTypes , this ) : localScope . getMethod ( delegateThis . type , selector , argumentTypes , this ) ; if ( ! ( privateBinding . isValidBinding ( ) ) ) { if ( ( binding . declaringClass ) == null ) { if ( ( receiverType ) instanceof ReferenceBinding ) { binding . declaringClass = ( ( ReferenceBinding ) ( receiverType ) ) ; } else { scope . problemReporter ( ) . errorNoMethodFor ( this , receiverType , argumentTypes ) ; return null ; } } scope . problemReporter ( ) . invalidMethod ( this , binding ) ; return null ; } else { binding = privateBinding ; } } else { if ( ( binding . declaringClass ) == null ) { if ( ( receiverType ) instanceof ReferenceBinding ) { binding . declaringClass = ( ( ReferenceBinding ) ( receiverType ) ) ; } else { scope . problemReporter ( ) . errorNoMethodFor ( this , receiverType , argumentTypes ) ; return null ; } } scope . problemReporter ( ) . invalidMethod ( this , binding ) ; return null ; } } if ( ! ( binding . isStatic ( ) ) ) { if ( ( receiver ) instanceof NameReference ) { if ( ( ( ( ( NameReference ) ( receiver ) ) . bits ) & ( BindingIds . TYPE ) ) != 0 ) { scope . problemReporter ( ) . mustUseAStaticMethod ( this , binding ) ; return null ; } } } if ( ( arguments ) != null ) for ( int i = 0 ; i < ( arguments . length ) ; i ++ ) arguments [ i ] . implicitWidening ( binding . parameters [ i ] , argumentTypes [ i ] ) ; if ( binding . isAbstract ( ) ) { if ( receiver . isSuper ( ) ) { scope . problemReporter ( ) . cannotDireclyInvokeAbstractMethod ( this , binding ) ; return null ; } } if ( isMethodUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedMethod ( binding , this ) ; <START_BUG> return this . expressionType = binding . returnType ; <END_BUG> } }

Fix:
return this . resolvedType = binding . returnType ;