Buggy code:
public char [ ] [ ] [ ] allSuperTypeNames ; public MatchLocatorParser parser ; private Parser basicParser ; public INameEnvironment nameEnvironment ; public NameLookup nameLookup ; public LookupEnvironment lookupEnvironment ; public HierarchyResolver hierarchyResolver ; public CompilerOptions options ; public int numberOfMatches ; public PossibleMatch [ ] matchesToProcess ; public PossibleMatch currentPossibleMatch ; public long resultCollectorTime = 0 ; int progressStep ; int progressWorked ; CompilationUnitScope unitScope ; SimpleLookupTable bindings ; HashSet methodHandles ; public class LocalDeclarationVisitor extends ASTVisitor { IJavaElement enclosingElement ; Binding enclosingElementBinding ; MatchingNodeSet nodeSet ; HashtableOfIntValues occurrencesCounts = new HashtableOfIntValues ( ) ; public LocalDeclarationVisitor ( IJavaElement enclosingElement , Binding enclosingElementBinding , MatchingNodeSet nodeSet ) { } public boolean visit ( TypeDeclaration typeDeclaration , BlockScope unused ) { } } public static class WorkingCopyDocument extends JavaSearchDocument { public ICompilationUnit workingCopy ; WorkingCopyDocument ( ICompilationUnit workingCopy , SearchParticipant participant ) { } public String toString ( ) { } } public class WrappedCoreException extends RuntimeException { private static final long serialVersionUID = 8354329870126121212L ; public CoreException coreException ; public WrappedCoreException ( CoreException coreException ) { } } public static SearchDocument [ ] addWorkingCopies ( InternalSearchPattern pattern , SearchDocument [ ] indexMatches , ICompilationUnit [ ] copies , SearchParticipant participant ) { } public static void setFocus ( InternalSearchPattern pattern , IJavaElement focus ) { } private static HashMap workingCopiesThatCanSeeFocus ( ICompilationUnit [ ] copies , IJavaElement focus , boolean isPolymorphicSearch , SearchParticipant participant ) { } public static ClassFileReader classFileReader ( IType type ) { } public static SearchPattern createAndPattern ( final SearchPattern leftPattern , final SearchPattern rightPattern ) { } public static void findIndexMatches ( InternalSearchPattern pattern , Index index , IndexQueryRequestor requestor , SearchParticipant participant , IJavaSearchScope scope , IProgressMonitor monitor ) throws IOException { } public static IJavaElement getProjectOrJar ( IJavaElement element ) { } public static boolean isPolymorphicSearch ( InternalSearchPattern pattern ) { } public static IJavaElement projectOrJarFocus ( InternalSearchPattern pattern ) { } public MatchLocator ( SearchPattern pattern , SearchRequestor requestor , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { } public void accept ( IBinaryType binaryType , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } public void accept ( org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit , AccessRestriction accessRestriction ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } protected Parser basicParser ( ) { } protected BinaryTypeBinding cacheBinaryType ( IType type , IBinaryType binaryType ) throws JavaModelException { } protected char [ ] [ ] [ ] computeSuperTypeNames ( IType focusType ) { } protected IJavaElement createHandle ( AbstractMethodDeclaration method , IJavaElement parent ) { } IMethod createBinaryMethodHandle ( IType type , char [ ] methodSelector , char [ ] [ ] argumentTypeNames ) { ClassFileReader reader = MatchLocator . classFileReader ( type ) ; if ( reader != null ) { IBinaryMethod [ ] methods = reader . getMethods ( ) ; if ( methods != null ) { int argCount = ( argumentTypeNames == null ) ? 0 : argumentTypeNames . length ; nextMethod : for ( int i = 0 , methodsLength = methods . length ; i < methodsLength ; i ++ ) { IBinaryMethod binaryMethod = methods [ i ] ; char [ ] selector = ( binaryMethod . isConstructor ( ) ) ? type . getElementName ( ) . toCharArray ( ) : binaryMethod . getSelector ( ) ; if ( CharOperation . equals ( selector , methodSelector ) ) { char [ ] signature = binaryMethod . getGenericSignature ( ) ; if ( signature == null ) signature = binaryMethod . getMethodDescriptor ( ) ; char [ ] [ ] parameterTypes = Signature . getParameterTypes ( signature ) ; if ( argCount != ( parameterTypes . length ) ) continue nextMethod ; if ( argumentTypeNames != null ) { for ( int j = 0 ; j < argCount ; j ++ ) { char [ ] parameterTypeName = ClassFileMatchLocator . convertClassFileFormat ( parameterTypes [ j ] ) ; <START_BUG> if ( ! ( CharOperation . endsWith ( Signature . toCharArray ( Signature . getTypeErasure ( parameterTypeName ) ) , argumentTypeNames [ j ] ) ) ) <END_BUG> continue nextMethod ; parameterTypes [ j ] = parameterTypeName ; } } return ( ( IMethod ) ( createMethodHandle ( type , new String ( selector ) , CharOperation . toStrings ( parameterTypes ) ) ) ) ; } } } } return null ; } private IJavaElement createMethodHandle ( IType type , String methodName , String [ ] parameterTypeSignatures ) { } protected IJavaElement createHandle ( FieldDeclaration fieldDeclaration , TypeDeclaration typeDeclaration , IJavaElement parent ) { } protected IJavaElement createHandle ( AbstractVariableDeclaration variableDeclaration , IJavaElement parent ) { } protected boolean createHierarchyResolver ( IType focusType , PossibleMatch [ ] possibleMatches ) { } protected IJavaElement createImportHandle ( ImportReference importRef ) { } protected IJavaElement createPackageDeclarationHandle ( CompilationUnitDeclaration unit ) { } protected IType createTypeHandle ( String simpleTypeName ) { } protected boolean encloses ( IJavaElement element ) { } private long findLastTypeArgumentInfo ( TypeReference typeRef ) { } protected IBinaryType getBinaryInfo ( ClassFile classFile , IResource resource ) throws CoreException { } protected IType getFocusType ( ) { } protected void getMethodBodies ( CompilationUnitDeclaration unit , MatchingNodeSet nodeSet ) { } protected TypeBinding getType ( Object typeKey , char [ ] typeName ) { } public MethodBinding getMethodBinding ( MethodPattern methodPattern ) { } protected boolean hasAlreadyDefinedType ( CompilationUnitDeclaration parsedUnit ) { } public void initialize ( JavaProject project , int possibleMatchSize ) throws JavaModelException { } protected void locateMatches ( JavaProject javaProject , PossibleMatch [ ] possibleMatches , int start , int length ) throws CoreException { } protected void locateMatches ( JavaProject javaProject , PossibleMatchSet matchSet , int expected ) throws CoreException { } public void locateMatches ( SearchDocument [ ] searchDocuments ) throws CoreException { } public void locatePackageDeclarations ( SearchParticipant participant ) throws CoreException { }

Fix:
if ( ! ( CharOperation . endsWith ( Signature . toCharArray ( Signature . getTypeErasure ( parameterTypeName ) ) , CharOperation . replaceOnCopy ( argumentTypeNames [ j ] , '$' , '.' ) ) ) )