Buggy code:
public final class SelectionEngine extends Engine implements ISearchRequestor { public static boolean DEBUG = false ; SelectionParser parser ; ISelectionRequestor requestor ; boolean acceptedAnswer ; private int actualSelectionStart ; private int actualSelectionEnd ; private char [ ] selectedIdentifier ; private char [ ] [ ] [ ] acceptedClasses ; private char [ ] [ ] [ ] acceptedInterfaces ; int acceptedClassesCount ; int acceptedInterfacesCount ; boolean noProposal = true ; IProblem problem = null ; private class CheckState { public CheckState ( int depth ) { } public int depth = 0 ; } public SelectionEngine ( SearchableEnvironment nameEnvironment , ISelectionRequestor requestor , Map settings ) { } public void acceptClass ( char [ ] packageName , char [ ] className , int modifiers , AccessRestriction accessRestriction ) { } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , 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 , SelectionEngine . CheckState state ) throws InvalidInputException { } private void completeLocalTypes ( Binding binding ) { } public AssistParser getParser ( ) { } private boolean isLocal ( ReferenceBinding binding ) { } public void select ( ICompilationUnit sourceUnit , int selectionSourceStart , int selectionSourceEnd ) { } private void selectFrom ( Binding binding , CompilationUnitDeclaration parsedUnit , boolean isDeclaration ) { } private void selectLocalDeclaration ( ASTNode node ) { } public void selectType ( ISourceType sourceType , char [ ] typeName , SourceTypeElementInfo [ ] topLevelTypes , boolean searchInEnvironment ) { } private boolean selectDeclaration ( CompilationUnitDeclaration compilationUnit ) { } private boolean selectDeclaration ( TypeDeclaration typeDeclaration , char [ ] assistIdentifier , char [ ] packageName ) { if ( ( typeDeclaration . name ) == assistIdentifier ) { char [ ] qualifiedSourceName = null ; TypeDeclaration enclosingType = typeDeclaration ; while ( enclosingType != null ) { qualifiedSourceName = CharOperation . concat ( enclosingType . name , qualifiedSourceName , '.' ) ; enclosingType = enclosingType . enclosingType ; } <START_BUG> switch ( typeDeclaration . getKind ( ) ) { <END_BUG> case CLASS : this . requestor . acceptClass ( packageName , qualifiedSourceName , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; break ; case INTERFACE : this . requestor . acceptInterface ( packageName , qualifiedSourceName , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; break ; case ENUM : this . requestor . acceptClass ( packageName , qualifiedSourceName , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; break ; case ANNOTATION_TYPE : this . requestor . acceptInterface ( packageName , qualifiedSourceName , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; break ; } this . noProposal = false ; return true ; } TypeDeclaration [ ] memberTypes = typeDeclaration . memberTypes ; for ( int i = 0 , length = ( memberTypes == null ) ? 0 : memberTypes . length ; i < length ; i ++ ) { if ( selectDeclaration ( memberTypes [ i ] , assistIdentifier , packageName ) ) return true ; } FieldDeclaration [ ] fields = typeDeclaration . fields ; for ( int i = 0 , length = ( fields == null ) ? 0 : fields . length ; i < length ; i ++ ) { if ( ( fields [ i ] . name ) == assistIdentifier ) { char [ ] qualifiedSourceName = null ; TypeDeclaration enclosingType = typeDeclaration ; while ( enclosingType != null ) { qualifiedSourceName = CharOperation . concat ( enclosingType . name , qualifiedSourceName , '.' ) ; enclosingType = enclosingType . enclosingType ; } this . requestor . acceptField ( packageName , qualifiedSourceName , fields [ i ] . name , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; this . noProposal = false ; return true ; } } AbstractMethodDeclaration [ ] methods = typeDeclaration . methods ; for ( int i = 0 , length = ( methods == null ) ? 0 : methods . length ; i < length ; i ++ ) { AbstractMethodDeclaration method = methods [ i ] ; if ( ( method . selector ) == assistIdentifier ) { char [ ] qualifiedSourceName = null ; TypeDeclaration enclosingType = typeDeclaration ; while ( enclosingType != null ) { qualifiedSourceName = CharOperation . concat ( enclosingType . name , qualifiedSourceName , '.' ) ; enclosingType = enclosingType . enclosingType ; } this . requestor . acceptMethod ( packageName , qualifiedSourceName , null , method . selector , null , null , null , method . isConstructor ( ) , true , null , this . actualSelectionStart , this . actualSelectionEnd ) ; this . noProposal = false ; return true ; } TypeParameter [ ] methodTypeParameters = method . typeParameters ( ) ; for ( int j = 0 , length2 = ( methodTypeParameters == null ) ? 0 : methodTypeParameters . length ; j < length2 ; j ++ ) { TypeParameter methodTypeParameter = methodTypeParameters [ j ] ; if ( ( methodTypeParameter . name ) == assistIdentifier ) { char [ ] qualifiedSourceName = null ; TypeDeclaration enclosingType = typeDeclaration ; while ( enclosingType != null ) { qualifiedSourceName = CharOperation . concat ( enclosingType . name , qualifiedSourceName , '.' ) ; enclosingType = enclosingType . enclosingType ; } this . requestor . acceptMethodTypeParameter ( packageName , qualifiedSourceName , method . selector , method . sourceStart , method . sourceEnd , methodTypeParameter . name , true , this . actualSelectionStart , this . actualSelectionEnd ) ; this . noProposal = false ; return true ; } } } TypeParameter [ ] typeParameters = typeDeclaration . typeParameters ;

Fix:
switch ( typeDeclaration . kind ( ) ) {