Buggy code:
public class BinaryIndexer extends AbstractIndexer implements SuffixConstants { private static final char [ ] BYTE = "byte" . toCharArray ( ) ; private static final char [ ] CHAR = "char" . toCharArray ( ) ; private static final char [ ] DOUBLE = "double" . toCharArray ( ) ; private static final char [ ] FLOAT = "float" . toCharArray ( ) ; private static final char [ ] INT = "int" . toCharArray ( ) ; private static final char [ ] LONG = "long" . toCharArray ( ) ; private static final char [ ] SHORT = "short" . toCharArray ( ) ; private static final char [ ] BOOLEAN = "boolean" . toCharArray ( ) ; private static final char [ ] VOID = "void" . toCharArray ( ) ; private static final char [ ] INIT = "<init>" . toCharArray ( ) ; public BinaryIndexer ( SearchDocument document ) { } public void addTypeReference ( char [ ] typeName ) { } private void convertToArrayType ( char [ ] [ ] parameterTypes , int counter , int arrayDim ) { } private char [ ] convertToArrayType ( char [ ] typeName , int arrayDim ) { } private char [ ] decodeFieldType ( char [ ] signature ) throws ClassFormatException { } private char [ ] [ ] decodeParameterTypes ( char [ ] signature ) throws ClassFormatException { } private char [ ] decodeReturnType ( char [ ] signature ) throws ClassFormatException { } private int extractArgCount ( char [ ] signature ) throws ClassFormatException { } private char [ ] extractClassName ( int [ ] constantPoolOffsets , ClassFileReader reader , int index ) { } private char [ ] extractName ( int [ ] constantPoolOffsets , ClassFileReader reader , int index ) { } private char [ ] extractClassReference ( int [ ] constantPoolOffsets , ClassFileReader reader , int index ) { } private void extractReferenceFromConstantPool ( byte [ ] contents , ClassFileReader reader ) throws ClassFormatException { } private char [ ] extractType ( int [ ] constantPoolOffsets , ClassFileReader reader , int index ) { } public void indexDocument ( ) { try { <START_BUG> byte [ ] contents = this . document . getByteContents ( ) ; <END_BUG> if ( contents == null ) return ; ClassFileReader reader = new ClassFileReader ( contents , this . document . getPath ( ) . toCharArray ( ) ) ; char [ ] className = replace ( '//' , '.' , reader . getName ( ) ) ; int packageNameIndex = CharOperation . lastIndexOf ( '.' , className ) ; char [ ] packageName = null ; char [ ] name = null ; if ( packageNameIndex >= 0 ) { packageName = CharOperation . subarray ( className , 0 , packageNameIndex ) ; name = CharOperation . subarray ( className , ( packageNameIndex + 1 ) , className . length ) ; } else { packageName = CharOperation . NO_CHAR ; name = className ; } char [ ] enclosingTypeName = null ; if ( reader . isNestedType ( ) ) { if ( reader . isAnonymous ( ) ) { name = CharOperation . NO_CHAR ; } else { name = reader . getInnerSourceName ( ) ; } if ( ( reader . isLocal ( ) ) || ( reader . isAnonymous ( ) ) ) { enclosingTypeName = IIndexConstants . ONE_ZERO ; } else { char [ ] fullEnclosingName = reader . getEnclosingTypeName ( ) ; int nameLength = ( ( fullEnclosingName . length ) - packageNameIndex ) - 1 ; if ( nameLength <= 0 ) { return ; } enclosingTypeName = new char [ nameLength ] ; System . arraycopy ( fullEnclosingName , ( packageNameIndex + 1 ) , enclosingTypeName , 0 , nameLength ) ; } } char [ ] [ ] typeParameterSignatures = null ; char [ ] genericSignature = reader . getGenericSignature ( ) ; if ( genericSignature != null ) { CharOperation . replace ( genericSignature , '//' , '.' ) ; typeParameterSignatures = Signature . getTypeParameters ( genericSignature ) ; } if ( name == null ) return ; char [ ] [ ] superinterfaces = replace ( '//' , '.' , reader . getInterfaceNames ( ) ) ; char [ ] [ ] enclosingTypeNames = ( enclosingTypeName == null ) ? null : new char [ ] [ ] { enclosingTypeName } ; switch ( reader . getKind ( ) ) { case CLASS_DECL : char [ ] superclass = replace ( '//' , '.' , reader . getSuperclassName ( ) ) ; addClassDeclaration ( reader . getModifiers ( ) , packageName , name , enclosingTypeNames , superclass , superinterfaces , typeParameterSignatures ) ; break ; case INTERFACE_DECL : addInterfaceDeclaration ( reader . getModifiers ( ) , packageName , name , enclosingTypeNames , superinterfaces , typeParameterSignatures ) ; break ; case ENUM_DECL : addEnumDeclaration ( reader . getModifiers ( ) , packageName , name , enclosingTypeNames , superinterfaces ) ; break ; case ANNOTATION_TYPE_DECL : addAnnotationTypeDeclaration ( reader . getModifiers ( ) , packageName , name , enclosingTypeNames ) ; break ; } MethodInfo [ ] methods = ( ( MethodInfo [ ] ) ( reader . getMethods ( ) ) ) ; if ( methods != null ) { for ( int i = 0 , max = methods . length ; i < max ; i ++ ) { MethodInfo method = methods [ i ] ; char [ ] descriptor = method . getMethodDescriptor ( ) ; char [ ] [ ] parameterTypes = decodeParameterTypes ( descriptor ) ; char [ ] returnType = decodeReturnType ( descriptor ) ; char [ ] [ ] exceptionTypes = replace ( '//' , '.' , method . getExceptionTypeNames ( ) ) ; if ( method . isConstructor ( ) ) { addConstructorDeclaration ( className , parameterTypes , exceptionTypes ) ; }

Fix:
final byte [ ] contents = this . document . getByteContents ( ) ;