Buggy code:
private int [ ] acceptedAnnotationsModifiers ; int acceptedClassesCount ; int acceptedInterfacesCount ; int acceptedEnumsCount ; int acceptedAnnotationsCount ; boolean noProposal = true ; CategorizedProblem problem = null ; public SelectionEngine ( SearchableEnvironment nameEnvironment , ISelectionRequestor requestor , Map settings ) { } public void acceptType ( char [ ] packageName , char [ ] simpleTypeName , char [ ] [ ] enclosingTypeNames , int modifiers , AccessRestriction accessRestriction ) { } public void acceptPackage ( char [ ] packageName ) { } private void acceptQualifiedTypes ( ) { } private boolean checkSelection ( char [ ] source , int selectionStart , int selectionEnd ) { } private boolean checkTypeArgument ( Scanner scanner ) { } public AssistParser getParser ( ) { } private boolean isLocal ( ReferenceBinding binding ) { } public void select ( ICompilationUnit sourceUnit , int selectionSourceStart , int selectionSourceEnd ) { } private void selectMemberTypeFromImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref , boolean staticOnly ) { } private void selectStaticFieldFromStaticImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref ) { } private void selectStaticMethodFromStaticImport ( CompilationUnitDeclaration parsedUnit , char [ ] lastToken , ReferenceBinding ref ) { } private void selectFrom ( Binding binding , CompilationUnitDeclaration parsedUnit , boolean isDeclaration ) { } private void selectLocalDeclaration ( ASTNode node ) { } public void selectType ( char [ ] typeName , IType context ) throws JavaModelException { try { this . acceptedAnswer = false ; if ( ( CharOperation . indexOf ( '<' , typeName ) ) != ( - 1 ) ) { char [ ] typeSig = Signature . createCharArrayTypeSignature ( typeName , false ) ; typeSig = Signature . getTypeErasure ( typeSig ) ; typeName = Signature . toCharArray ( typeSig ) ; } IType outerType = context ; IType parent = context . getDeclaringType ( ) ; while ( parent != null ) { outerType = parent ; parent = parent . getDeclaringType ( ) ; } CompilationUnitDeclaration parsedUnit = null ; TypeDeclaration typeDeclaration = null ; org . eclipse . jdt . core . ICompilationUnit cu = context . getCompilationUnit ( ) ; if ( cu != null ) { IType [ ] topLevelTypes = cu . getTypes ( ) ; int length = topLevelTypes . length ; SourceTypeElementInfo [ ] topLevelInfos = new SourceTypeElementInfo [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { topLevelInfos [ i ] = ( ( SourceTypeElementInfo ) ( ( ( SourceType ) ( topLevelTypes [ i ] ) ) . getElementInfo ( ) ) ) ; } ISourceType outerTypeInfo = ( ( ISourceType ) ( ( ( SourceType ) ( outerType ) ) . getElementInfo ( ) ) ) ; CompilationResult result = new CompilationResult ( outerTypeInfo . getFileName ( ) , 1 , 1 , this . compilerOptions . maxProblemsPerUnit ) ; int flags = ( SourceTypeConverter . FIELD_AND_METHOD ) | ( SourceTypeConverter . MEMBER_TYPE ) ; if ( ( context . isAnonymous ( ) ) || ( context . isLocal ( ) ) ) flags |= SourceTypeConverter . LOCAL_TYPE ; parsedUnit = SourceTypeConverter . buildCompilationUnit ( topLevelInfos , flags , this . parser . problemReporter ( ) , result ) ; if ( ( parsedUnit != null ) && ( ( parsedUnit . types ) != null ) ) { if ( SelectionEngine . DEBUG ) { System . out . println ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>Diet<seq2seq4repair_space>AST<seq2seq4repair_space>:" ) ; System . out . println ( parsedUnit . toString ( ) ) ; } typeDeclaration = new ASTNodeFinder ( parsedUnit ) . findType ( context ) ; } } else { ClassFile classFile = ( ( ClassFile ) ( context . getClassFile ( ) ) ) ; <START_BUG> ClassFileReader reader = ( ( ClassFileReader ) ( classFile . getBinaryTypeInfo ( ( ( IFile ) ( classFile . getResource ( ) ) ) , false ) ) ) ; <END_BUG> CompilationResult result = new CompilationResult ( reader . getFileName ( ) , 1 , 1 , this . compilerOptions . maxProblemsPerUnit ) ; parsedUnit = new CompilationUnitDeclaration ( this . parser . problemReporter ( ) , result , 0 ) ; HashSetOfCharArrayArray typeNames = new HashSetOfCharArrayArray ( ) ; typeDeclaration = BinaryTypeConverter . buildTypeDeclaration ( context , parsedUnit , result , typeNames ) ; parsedUnit . imports = BinaryTypeConverter . buildImports ( typeNames , reader ) ; } if ( typeDeclaration != null ) { FieldDeclaration field = new FieldDeclaration ( ) ; int dot ; if ( ( dot = CharOperation . lastIndexOf ( '.' , typeName ) ) == ( - 1 ) ) { this . selectedIdentifier = typeName ; field . type = new SelectionOnSingleTypeReference ( typeName , ( - 1 ) ) ; } else { char [ ] [ ] previousIdentifiers = CharOperation . splitOn ( '.' , typeName , 0 , dot ) ; char [ ] selectionIdentifier = CharOperation . subarray ( typeName , ( dot + 1 ) , typeName . length ) ; this . selectedIdentifier = selectionIdentifier ; field . type = new SelectionOnQualifiedTypeReference ( previousIdentifiers , selectionIdentifier , new long [ ( previousIdentifiers . length ) + 1 ] ) ; } field . name = "<fakeField>" . toCharArray ( ) ; typeDeclaration . fields = new FieldDeclaration [ ] { field } ; this . lookupEnvironment . buildTypeBindings ( parsedUnit , null ) ; if ( ( this . unitScope = parsedUnit . scope ) != null ) { try { this . lookupEnvironment . completeTypeBindings ( parsedUnit , true ) ; parsedUnit . scope . faultInTypes ( ) ; parsedUnit . resolve ( ) ; } catch ( SelectionNodeFound e ) { if ( ( e . binding ) != null ) { if ( SelectionEngine . DEBUG ) { System . out . println ( "SELECTION<seq2seq4repair_space>-<seq2seq4repair_space>Selection<seq2seq4repair_space>binding<seq2seq4repair_space>:" ) ; System . out . println ( e . binding . toString ( ) ) ; }

Fix:
ClassFileReader reader = ( ( ClassFileReader ) ( classFile . getBinaryTypeInfo ( ( ( IFile ) ( classFile . resource ( ) ) ) , false ) ) ) ;