Buggy code:
public void addProblemMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems ) { } public void addProblemMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems , int savedOffset ) { } public void addSpecialMethods ( ) { } public void addSyntheticConstructorAccessMethod ( SyntheticMethodBinding methodBinding ) { } public void addSyntheticEnumValueOfMethod ( SyntheticMethodBinding methodBinding ) { } public void addSyntheticEnumValuesMethod ( SyntheticMethodBinding methodBinding ) { } public void addSyntheticFieldReadAccessMethod ( SyntheticMethodBinding methodBinding ) { } public void addSyntheticFieldWriteAccessMethod ( SyntheticMethodBinding methodBinding ) { } public void addSyntheticMethodAccessMethod ( SyntheticMethodBinding methodBinding ) { } public void completeCodeAttribute ( int codeAttributeOffset ) { } public void completeCodeAttributeForClinit ( int codeAttributeOffset ) { } public void completeCodeAttributeForClinit ( int codeAttributeOffset , int [ ] startLineIndexes , int problemLine ) { } public void completeCodeAttributeForMissingAbstractProblemMethod ( MethodBinding binding , int codeAttributeOffset , int [ ] startLineIndexes , int problemLine ) { } public void completeCodeAttributeForProblemMethod ( AbstractMethodDeclaration method , MethodBinding binding , int codeAttributeOffset , int [ ] startLineIndexes , int problemLine ) { } public void completeCodeAttributeForSyntheticMethod ( SyntheticMethodBinding binding , int codeAttributeOffset , int [ ] startLineIndexes ) { } public void completeMethodInfo ( int methodAttributeOffset , int attributeNumber ) { } public char [ ] fileName ( ) { } private void generateAnnotation ( Annotation annotation , int attributeOffset ) { if ( ( ( contentsOffset ) + 4 ) >= ( this . contents . length ) ) { resizeContents ( 4 ) ; } TypeBinding annotationTypeBinding = annotation . resolvedType ; if ( annotationTypeBinding == null ) { this . contentsOffset = attributeOffset ; return ; } final int typeIndex = constantPool . literalIndex ( annotationTypeBinding . signature ( ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( typeIndex > > 8 ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( typeIndex ) ) ; if ( annotation instanceof NormalAnnotation ) { NormalAnnotation normalAnnotation = ( ( NormalAnnotation ) ( annotation ) ) ; MemberValuePair [ ] memberValuePairs = normalAnnotation . memberValuePairs ; if ( memberValuePairs != null ) { final int memberValuePairsLength = memberValuePairs . length ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( memberValuePairsLength > > 8 ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( memberValuePairsLength ) ) ; for ( int i = 0 ; i < memberValuePairsLength ; i ++ ) { MemberValuePair memberValuePair = memberValuePairs [ i ] ; if ( ( ( contentsOffset ) + 2 ) >= ( this . contents . length ) ) { resizeContents ( 2 ) ; } final int elementNameIndex = constantPool . literalIndex ( memberValuePair . name ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( elementNameIndex > > 8 ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( elementNameIndex ) ) ; MethodBinding methodBinding = memberValuePair . binding ; if ( methodBinding == null ) { contentsOffset = attributeOffset ; } else { generateElementValue ( memberValuePair . value , methodBinding . returnType , attributeOffset ) ; } } } else { contents [ ( ( contentsOffset ) ++ ) ] = 0 ; contents [ ( ( contentsOffset ) ++ ) ] = 0 ; } } else if ( annotation instanceof SingleMemberAnnotation ) { SingleMemberAnnotation singleMemberAnnotation = ( ( SingleMemberAnnotation ) ( annotation ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = 0 ; contents [ ( ( contentsOffset ) ++ ) ] = 1 ; if ( ( ( contentsOffset ) + 2 ) >= ( this . contents . length ) ) { resizeContents ( 2 ) ; } final int elementNameIndex = constantPool . literalIndex ( TypeConstants . VALUE ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( elementNameIndex > > 8 ) ) ; contents [ ( ( contentsOffset ) ++ ) ] = ( ( byte ) ( elementNameIndex ) ) ; <START_BUG> MethodBinding methodBinding = singleMemberAnnotation . singlePair . binding ; <END_BUG> if ( methodBinding == null ) { contentsOffset = attributeOffset ; } else { generateElementValue ( singleMemberAnnotation . memberValue , methodBinding . returnType , attributeOffset ) ; } } else { contents [ ( ( contentsOffset ) ++ ) ] = 0 ; contents [ ( ( contentsOffset ) ++ ) ] = 0 ; } } public void generateCodeAttributeHeader ( ) { } private void generateElementValue ( Expression defaultValue , TypeBinding memberValuePairReturnType , int attributeOffset ) { } private void generateElementValue ( int attributeOffset , Expression defaultValue , Constant constant , TypeBinding binding ) { } private void generateElementValueForNonConstantExpression ( Expression defaultValue , int attributeOffset , TypeBinding defaultValueBinding ) { } public int generateMethodInfoAttribute ( MethodBinding methodBinding ) { } public int generateMethodInfoAttribute ( MethodBinding methodBinding , boolean createProblemMethod ) { } public int generateMethodInfoAttribute ( MethodBinding methodBinding , AnnotationMethodDeclaration declaration ) { } public void generateMethodInfoHeader ( MethodBinding methodBinding ) { } public void generateMethodInfoHeader ( MethodBinding methodBinding , int accessFlags ) { } public void generateMethodInfoHeaderForClinit ( ) { } public void generateMissingAbstractMethods ( MethodDeclaration [ ] methodDeclarations , CompilationResult compilationResult ) { } private int generateRuntimeAnnotations ( final Annotation [ ] annotations ) { } private int generateRuntimeAnnotationsForParameters ( Argument [ ] arguments ) { } public byte [ ] getBytes ( ) { } public char [ ] [ ] getCompoundName ( ) { } protected void initByteArrays ( ) { } private boolean isRuntimeInvisible ( Annotation annotation ) { } private boolean isRuntimeVisible ( Annotation annotation ) { } public ClassFile outerMostEnclosingClassFile ( ) { } public void recordEnclosingTypeAttributes ( ReferenceBinding binding ) { }

Fix:
MethodBinding methodBinding = singleMemberAnnotation . memberValuePairs ( ) [ 0 ] . binding ;