Buggy code:
public class SelectionRequestor implements ISelectionRequestor { protected NameLookup nameLookup ; protected Openable openable ; protected IJavaElement [ ] elements = JavaElement . NO_ELEMENTS ; protected int elementIndex = - 1 ; protected HandleFactory handleFactory = new HandleFactory ( ) ; public SelectionRequestor ( NameLookup nameLookup , Openable openable ) { } private void acceptBinaryMethod ( IType type , IMethod method , char [ ] uniqueKey , boolean isConstructor ) { } protected void acceptBinaryMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , String [ ] parameterSignatures , char [ ] [ ] typeParameterNames , char [ ] [ ] [ ] typeParameterBoundNames , char [ ] uniqueKey , boolean isConstructor ) { } public void acceptType ( char [ ] packageName , char [ ] typeName , int modifiers , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptType ( IType type ) { } public void acceptError ( CategorizedProblem error ) { } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name , boolean isDeclaration , char [ ] uniqueKey , int start , int end ) { } public void acceptLocalField ( FieldBinding fieldBinding ) { } public void acceptLocalMethod ( MethodBinding methodBinding ) { <START_BUG> IJavaElement res = findLocalElement ( methodBinding . sourceStart ( ) ) ; <END_BUG> if ( res != null ) { if ( ( res . getElementType ( ) ) == ( IJavaElement . METHOD ) ) { IMethod method = ( ( IMethod ) ( res ) ) ; char [ ] uniqueKey = methodBinding . computeUniqueKey ( ) ; if ( method . isBinary ( ) ) { ResolvedBinaryMethod resolvedRes = new ResolvedBinaryMethod ( ( ( JavaElement ) ( res . getParent ( ) ) ) , method . getElementName ( ) , method . getParameterTypes ( ) , new String ( uniqueKey ) ) ; resolvedRes . occurrenceCount = method . getOccurrenceCount ( ) ; res = resolvedRes ; } else { ResolvedSourceMethod resolvedRes = new ResolvedSourceMethod ( ( ( JavaElement ) ( res . getParent ( ) ) ) , method . getElementName ( ) , method . getParameterTypes ( ) , new String ( uniqueKey ) ) ; resolvedRes . occurrenceCount = method . getOccurrenceCount ( ) ; res = resolvedRes ; } addElement ( res ) ; if ( SelectionEngine . DEBUG ) { System . out . print ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>accept<seq2seq4repair_space>method(" ) ; System . out . print ( res . toString ( ) ) ; System . out . println ( ")" ) ; } } else if ( ( ( methodBinding . selector ) == ( TypeConstants . INIT ) ) && ( ( res . getElementType ( ) ) == ( IJavaElement . TYPE ) ) ) { res = ( ( JavaElement ) ( res ) ) . resolved ( methodBinding . declaringClass ) ; addElement ( res ) ; if ( SelectionEngine . DEBUG ) { System . out . print ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>accept<seq2seq4repair_space>type(" ) ; System . out . print ( res . toString ( ) ) ; System . out . println ( ")" ) ; } } } } public void acceptLocalType ( TypeBinding typeBinding ) { } public void acceptLocalTypeParameter ( TypeVariableBinding typeVariableBinding ) { } public void acceptLocalMethodTypeParameter ( TypeVariableBinding typeVariableBinding ) { } public void acceptLocalVariable ( LocalVariableBinding binding ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , String enclosingDeclaringTypeSignature , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , String [ ] parameterSignatures , char [ ] [ ] typeParameterNames , char [ ] [ ] [ ] typeParameterBoundNames , 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 , String [ ] parameterSignatures , char [ ] [ ] typeParameterNames , char [ ] [ ] [ ] typeParameterBoundNames , char [ ] uniqueKey ) { } protected void acceptMethodDeclaration ( IType type , char [ ] selector , 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 ) { } private boolean areTypeParametersCompatible ( IMethod method , char [ ] [ ] typeParameterNames , char [ ] [ ] [ ] typeParameterBoundNames ) { } protected IJavaElement findLocalElement ( int pos ) { } public IJavaElement findMethodFromBinding ( MethodBinding method , String [ ] signatures , ReferenceBinding declaringClass ) { } 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:
IJavaElement res = findLocalElement ( methodBinding . original ( ) . sourceStart ( ) ) ;