Buggy code:
public class CodeSnippetAllocationExpression extends AllocationExpression implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetAllocationExpression ( EvaluationContext evaluationContext ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public TypeBinding resolveType ( BlockScope scope ) { this . constant = Constant . NotAConstant ; this . resolvedType = this . type . resolveType ( scope , true ) ; boolean argsContainCast = false ; TypeBinding [ ] argumentTypes = NoParameters ; if ( ( this . arguments ) != null ) { boolean argHasError = false ; int length = this . arguments . length ; argumentTypes = new TypeBinding [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Expression argument = this . arguments [ i ] ; if ( argument instanceof CastExpression ) { argument . bits |= ASTNode . DisableUnnecessaryCastCheck ; argsContainCast = true ; } if ( ( argumentTypes [ i ] = argument . resolveType ( scope ) ) == null ) { argHasError = true ; } } if ( argHasError ) { return this . resolvedType ; } } if ( ( this . resolvedType ) == null ) { return null ; } if ( ! ( this . resolvedType . canBeInstantiated ( ) ) ) { scope . problemReporter ( ) . cannotInstantiate ( this . type , this . resolvedType ) ; return this . resolvedType ; } ReferenceBinding allocatedType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( ! ( ( this . binding = scope . getConstructor ( allocatedType , argumentTypes , this ) ) . isValidBinding ( ) ) ) { if ( ( ( this . binding ) instanceof ProblemMethodBinding ) && ( ( ( ( ProblemMethodBinding ) ( this . binding ) ) . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) { if ( ( this . evaluationContext . declaringTypeName ) != null ) { this . delegateThis = scope . getField ( scope . enclosingSourceType ( ) , EvaluationConstants . DELEGATE_THIS , this ) ; if ( ( this . delegateThis ) == null ) { if ( ( this . binding . declaringClass ) == null ) { this . binding . declaringClass = allocatedType ; } scope . problemReporter ( ) . invalidConstructor ( this , this . binding ) ; return this . resolvedType ; } } else { if ( ( this . binding . declaringClass ) == null ) { this . binding . declaringClass = allocatedType ; } scope . problemReporter ( ) . invalidConstructor ( this , this . binding ) ; return this . resolvedType ; } CodeSnippetScope localScope = new CodeSnippetScope ( scope ) ; MethodBinding privateBinding = localScope . getConstructor ( ( ( ReferenceBinding ) ( this . delegateThis . type ) ) , argumentTypes , this ) ; if ( ! ( privateBinding . isValidBinding ( ) ) ) { if ( ( this . binding . declaringClass ) == null ) { this . binding . declaringClass = allocatedType ; } scope . problemReporter ( ) . invalidConstructor ( this , this . binding ) ; return this . resolvedType ; } else { this . binding = privateBinding ; } } else { if ( ( this . binding . declaringClass ) == null ) { this . binding . declaringClass = allocatedType ; } scope . problemReporter ( ) . invalidConstructor ( this , this . binding ) ; return this . resolvedType ; } } <START_BUG> if ( isMethodUseDeprecated ( this . binding , scope ) ) { <END_BUG> scope . problemReporter ( ) . deprecatedMethod ( this . binding , this ) ; } if ( ( arguments ) != null ) { for ( int i = 0 ; i < ( arguments . length ) ; i ++ ) { TypeBinding parameterType = binding . parameters [ i ] ; TypeBinding argumentType = argumentTypes [ i ] ; arguments [ i ] . computeConversion ( scope , parameterType , argumentType ) ; if ( argumentType . needsUncheckedConversion ( parameterType ) ) { scope . problemReporter ( ) . unsafeTypeConversion ( arguments [ i ] , argumentType , parameterType ) ; } } if ( argsContainCast ) { CastExpression . checkNeedForArgumentCasts ( scope , null , allocatedType , binding , this . arguments , argumentTypes , this ) ; } } if ( ( allocatedType . isRawType ( ) ) && ( this . binding . hasSubstitutedParameters ( ) ) ) { scope . problemReporter ( ) . unsafeRawInvocation ( this , this . binding ) ; } return allocatedType ; } }

Fix:
if ( isMethodUseDeprecated ( this . binding , scope , true ) ) {