Buggy code:
public void acceptAnnotation ( char [ ] packageName , char [ ] annotationName , boolean isDeclaration , char [ ] genericTypeSignature , int start , int end ) { } public void acceptClass ( char [ ] packageName , char [ ] className , boolean isDeclaration , char [ ] genericTypeSignature , int start , int end ) { } public void acceptEnum ( char [ ] packageName , char [ ] enumName , boolean isDeclaration , char [ ] genericTypeSignature , int start , int end ) { } public void acceptError ( IProblem error ) { } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , boolean isDeclaration , char [ ] genericTypeSignature , int start , int end ) { } public void acceptLocalField ( FieldBinding fieldBinding ) { } public void acceptLocalMethod ( MethodBinding methodBinding ) { } public void acceptLocalType ( TypeBinding typeBinding ) { } public void acceptLocalVariable ( LocalVariableBinding binding ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , String enclosingDeclaringTypeSignature , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , String [ ] parameterSignatures , boolean isConstructor , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptPackage ( char [ ] packageName ) { } protected void acceptSourceMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , char [ ] uniqueKey ) { String name = new String ( selector ) ; IMethod [ ] methods = null ; try { methods = type . getMethods ( ) ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { if ( ( methods [ i ] . getElementName ( ) . equals ( name ) ) && ( ( methods [ i ] . getParameterTypes ( ) . length ) == ( parameterTypeNames . length ) ) ) { if ( uniqueKey != null ) { IMethod method = methods [ i ] ; ParameterizedSourceMethod parameterizedSourceMethod = new ParameterizedSourceMethod ( ( ( JavaElement ) ( method . getParent ( ) ) ) , method . getElementName ( ) , method . getParameterTypes ( ) , new String ( uniqueKey ) ) ; addElement ( parameterizedSourceMethod ) ; } else { addElement ( methods [ i ] ) ; } } } } catch ( JavaModelException e ) { return ; } if ( ( this . elementIndex ) == ( - 1 ) ) { addElement ( type ) ; if ( SelectionEngine . DEBUG ) { System . out . print ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>accept<seq2seq4repair_space>type(" ) ; System . out . print ( type . toString ( ) ) ; System . out . println ( ")" ) ; } return ; } if ( ( this . elementIndex ) == 0 ) { if ( SelectionEngine . DEBUG ) { System . out . print ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>accept<seq2seq4repair_space>method(" ) ; System . out . print ( this . elements [ 0 ] . toString ( ) ) ; System . out . println ( ")" ) ; } return ; } IJavaElement [ ] matches = this . elements ; int matchesIndex = this . elementIndex ; this . elements = JavaElement . NO_ELEMENTS ; this . elementIndex = - 1 ; for ( int i = 0 ; i <= matchesIndex ; i ++ ) { IMethod method = ( ( IMethod ) ( matches [ i ] ) ) ; String [ ] signatures = method . getParameterTypes ( ) ; boolean match = true ; for ( int p = 0 ; p < ( signatures . length ) ; p ++ ) { <START_BUG> String simpleName = Signature . getSimpleName ( Signature . toString ( signatures [ p ] ) ) ; <END_BUG> char [ ] simpleParameterName = CharOperation . lastSegment ( parameterTypeNames [ p ] , '.' ) ; if ( ! ( simpleName . equals ( new String ( simpleParameterName ) ) ) ) { match = false ; break ; } } if ( match ) { addElement ( method ) ; if ( SelectionEngine . DEBUG ) { System . out . print ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>accept<seq2seq4repair_space>method(" ) ; System . out . print ( method . toString ( ) ) ; System . out . println ( ")" ) ; } } } } protected void acceptMethodDeclaration ( IType type , char [ ] selector , int start , int end ) { } protected void acceptType ( char [ ] packageName , char [ ] typeName , int acceptFlags , boolean isDeclaration , char [ ] genericTypeSignature , int start , int end ) { } public void acceptTypeParameter ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] typeParameterName , boolean isDeclaration , int start , int end ) { } public void acceptMethodTypeParameter ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] selector , int selectorStart , int selectorEnd , char [ ] typeParameterName , boolean isDeclaration , int start , int end ) { } protected void addElement ( IJavaElement element ) { } protected IJavaElement findLocalElement ( int pos ) { } public IJavaElement [ ] getElements ( ) { } protected IType resolveType ( char [ ] packageName , char [ ] typeName , int acceptFlags ) { } protected IType resolveTypeByLocation ( char [ ] packageName , char [ ] typeName , int acceptFlags , int start , int end ) { } }

Fix:
String simpleName = Signature . getSimpleName ( Signature . toString ( Signature . getTypeErasure ( signatures [ p ] ) ) ) ;