Buggy code:
public class ClassFile implements CompilerModifiers , AttributeNamesConstants , TypeConstants , TypeIds { public static final int INITIAL_CONTENTS_SIZE = 400 ; public static final int INITIAL_HEADER_SIZE = 1500 ; public static final int INNER_CLASSES_SIZE = 5 ; public static String buildAllDirectoriesInto ( String outputPath , String relativeFileName ) throws IOException { } public static void createProblemType ( TypeDeclaration typeDeclaration , CompilationResult unitResult ) { } public static final int searchLineNumber ( int [ ] startLineIndexes , int position ) { } public static void writeToDisk ( boolean generatePackagesStructure , String outputPath , String relativeFileName , byte [ ] contents ) throws IOException { } public CodeStream codeStream ; public ConstantPool constantPool ; public int constantPoolOffset ; public byte [ ] contents ; public int contentsOffset ; protected boolean creatingProblemType ; public ClassFile enclosingClassFile ; public byte [ ] header ; public int headerOffset ; public ReferenceBinding [ ] innerClassesBindings ; public int methodCount ; public int methodCountOffset ; public int numberOfInnerClasses ; public boolean ownSharedArrays = false ; public int produceDebugAttributes ; public SourceTypeBinding referenceBinding ; public long targetJDK ; public ClassFile ( ) { } public ClassFile ( SourceTypeBinding aType , ClassFile enclosingClassFile , boolean creatingProblemType ) { } public void addAbstractMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding ) { } public void addAttributes ( ) { } public void addDefaultAbstractMethods ( ) { } private int addFieldAttributes ( FieldBinding fieldBinding , int fieldAttributeOffset ) { } private void addFieldInfo ( FieldBinding fieldBinding ) { } public void addFieldInfos ( ) { } private void addInnerClasses ( ReferenceBinding refBinding ) { } private void addMissingAbstractProblemMethod ( MethodDeclaration methodDeclaration , MethodBinding methodBinding , IProblem problem , CompilationResult compilationResult ) { } public void addProblemClinit ( IProblem [ ] problems ) { } public void addProblemConstructor ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems ) { } public void addProblemConstructor ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems , int savedOffset ) { } 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 ) { } 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 ) { final TypeBinding annotationBinding = annotation . resolvedType ; if ( annotationBinding == null ) { return false ; } <START_BUG> long metaTagBits = annotationBinding . tagBits ; <END_BUG> if ( ( metaTagBits & ( TagBits . AnnotationRetentionMASK ) ) == 0 ) return false ; return ( metaTagBits & ( TagBits . AnnotationRetentionMASK ) ) == ( TagBits . AnnotationRuntimeRetention ) ; } public ClassFile outerMostEnclosingClassFile ( ) { } public void recordEnclosingTypeAttributes ( ReferenceBinding binding ) { } public void recordNestedLocalAttribute ( ReferenceBinding binding ) { } public void recordNestedMemberAttribute ( ReferenceBinding binding ) { } private final void resizeContents ( int minimalSize ) { } public void setForMethodInfos ( ) { } }

Fix:
long metaTagBits = annotationBinding . getAnnotationTagBits ( ) ;