Buggy code:
public class MethodLocator extends PatternLocator { protected MethodPattern pattern ; protected boolean isDeclarationOfReferencedMethodsPattern ; public char [ ] [ ] [ ] allSuperDeclaringTypeNames ; private HashMap methodDeclarationsWithInvalidParam = new HashMap ( ) ; public MethodLocator ( MethodPattern pattern ) { } protected void clear ( ) { } public void initializePolymorphicSearch ( MatchLocator locator ) { } private boolean isTypeInSuperDeclaringTypeNames ( char [ ] [ ] typeName ) { } protected boolean isVirtualInvoke ( MethodBinding method , MessageSend messageSend ) { } public int match ( ASTNode node , MatchingNodeSet nodeSet ) { } public int match ( MethodDeclaration node , MatchingNodeSet nodeSet ) { if ( ! ( this . pattern . findDeclarations ) ) return PatternLocator . IMPOSSIBLE_MATCH ; if ( ! ( matchesName ( this . pattern . selector , node . selector ) ) ) return PatternLocator . IMPOSSIBLE_MATCH ; boolean resolve = ( ( InternalSearchPattern ) ( this . pattern ) ) . mustResolve ; if ( ( this . pattern . parameterSimpleNames ) != null ) { int length = this . pattern . parameterSimpleNames . length ; ASTNode [ ] args = node . arguments ; int argsLength = ( args == null ) ? 0 : args . length ; if ( length != argsLength ) return PatternLocator . IMPOSSIBLE_MATCH ; for ( int i = 0 ; i < argsLength ; i ++ ) { <START_BUG> if ( ! ( matchesTypeReference ( this . pattern . parameterSimpleNames [ i ] , ( ( Argument ) ( args [ i ] ) ) . type ) ) ) { <END_BUG> if ( this . mayBeGeneric ) { if ( ! ( ( ( InternalSearchPattern ) ( this . pattern ) ) . mustResolve ) ) { nodeSet . mustResolve = true ; resolve = true ; } this . methodDeclarationsWithInvalidParam . put ( node , null ) ; } else { return PatternLocator . IMPOSSIBLE_MATCH ; } } } } if ( this . pattern . hasMethodArguments ( ) ) { if ( ( ( node . typeParameters ) == null ) || ( ( node . typeParameters . length ) != ( this . pattern . methodArguments . length ) ) ) return PatternLocator . IMPOSSIBLE_MATCH ; } return nodeSet . addMatch ( node , ( resolve ? PatternLocator . POSSIBLE_MATCH : PatternLocator . ACCURATE_MATCH ) ) ; } public int match ( MemberValuePair node , MatchingNodeSet nodeSet ) { } public int match ( MessageSend node , MatchingNodeSet nodeSet ) { } public int match ( Annotation node , MatchingNodeSet nodeSet ) { } protected int matchContainer ( ) { } protected void matchLevelAndReportImportRef ( ImportReference importRef , Binding binding , MatchLocator locator ) throws CoreException { } protected int matchMethod ( MethodBinding method , boolean skipImpossibleArg ) { } private boolean matchOverriddenMethod ( ReferenceBinding type , MethodBinding method , MethodBinding matchMethod ) { } protected void matchReportReference ( ASTNode reference , IJavaElement element , Binding elementBinding , int accuracy , MatchLocator locator ) throws CoreException { } void matchReportReference ( MessageSend messageSend , MatchLocator locator , MethodBinding methodBinding ) throws CoreException { } private boolean methodParametersEqualsPattern ( MethodBinding method ) { } public SearchMatch newDeclarationMatch ( ASTNode reference , IJavaElement element , Binding elementBinding , int accuracy , int length , MatchLocator locator ) { } protected int referenceType ( ) { } protected void reportDeclaration ( MethodBinding methodBinding , MatchLocator locator , SimpleSet knownMethods ) throws CoreException { } public int resolveLevel ( ASTNode possibleMatchingNode ) { } public int resolveLevel ( Binding binding ) { } protected int resolveLevel ( MessageSend messageSend ) { } protected int resolveLevelAsSubtype ( char [ ] qualifiedPattern , ReferenceBinding type ) { } public String toString ( ) { } }

Fix:
if ( ( args != null ) && ( ! ( matchesTypeReference ( this . pattern . parameterSimpleNames [ i ] , ( ( Argument ) ( args [ i ] ) ) . type ) ) ) ) {