Buggy code:
private , int [ ] missingElementssStarts , int [ ] missingElementsEnds , boolean missingElementsHaveProblems ) { } private void findImplicitMessageSends ( char [ ] token , TypeBinding [ ] argTypes , Scope scope , InvocationSite invocationSite , Scope invocationScope ) { } private void findLocalMethods ( char [ ] methodName , TypeBinding [ ] typeArgTypes , TypeBinding [ ] argTypes , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , ReferenceBinding receiverType , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall , boolean canBePrefixed , Binding [ ] missingElements , int [ ] missingElementsStarts , int [ ] missingElementsEnds , boolean missingElementsHaveProblems ) { } private void findLocalMethodsFromFavorites ( char [ ] methodName , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , ReferenceBinding receiverType , InvocationSite invocationSite , Scope invocationScope ) { } private CompletionProposal createRequiredTypeProposal ( Binding binding , int start , int end , int relevance ) { } private void findLocalMethodsOfStaticImports ( char [ ] methodName , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , ReferenceBinding receiverType , InvocationSite invocationSite ) { } int computeRelevanceForCaseMatching ( char [ ] token , char [ ] proposalName ) { } private int computeRelevanceForAnnotation ( ) { } private int computeRelevanceForClass ( ) { } private int computeRelevanceForEnum ( ) { } private int computeRelevanceForInterface ( ) { } private int computeRelevanceForMissingElements ( boolean hasProblems ) { } int computeRelevanceForQualification ( boolean prefixRequired ) { } int computeRelevanceForRestrictions ( int accessRuleKind ) { } private int computeRelevanceForStatic ( boolean onlyStatic , boolean isStatic ) { } private int computeRelevanceForException ( ) { } private int computeRelevanceForException ( char [ ] proposalName ) { } private int computeRelevanceForExpectingType ( TypeBinding proposalType ) { } private int computeRelevanceForExpectingType ( char [ ] packageName , char [ ] typeName ) { } private int computeRelevanceForInheritance ( ReferenceBinding receiverType , ReferenceBinding declaringClass ) { } int computeRelevanceForInterestingProposal ( ) { } private int computeRelevanceForInterestingProposal ( Binding binding ) { } private void computeUninterestingBindings ( ASTNode parent , Scope scope ) { } private void findLabels ( char [ ] label , char [ ] [ ] choices ) { } private void findLocalMethodDeclarations ( char [ ] methodName , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , boolean exactMatch , ReferenceBinding receiverType ) { } private void createTypeVariable ( TypeVariableBinding typeVariable , StringBuffer completion ) { } private void createType ( TypeBinding type , StringBuffer completion ) { } private void createVargsType ( TypeBinding type , StringBuffer completion ) { } private char [ ] createImportCharArray ( char [ ] importedElement , boolean isStatic , boolean onDemand ) { } private void createMethod ( MethodBinding method , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , char [ ] [ ] parameterNames , StringBuffer completion ) { } private boolean isIgnored ( int kind , boolean missingTypes ) { } private boolean isIgnored ( int kind ) { } private boolean isIgnored ( int kind , int requiredProposalKind ) { } private void findMethods ( char [ ] selector , TypeBinding [ ] typeArgTypes , TypeBinding [ ] argTypes , ReferenceBinding receiverType , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , boolean isCompletingDeclaration , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall , boolean canBePrefixed , Binding [ ] missingElements , int [ ] missingElementsStarts , int [ ] missingElementsEnds , boolean missingElementsHaveProblems ) { } private char [ ] [ ] findMethodParameterNames ( MethodBinding method , char [ ] [ ] parameterTypeNames ) { } private void findNestedTypes ( char [ ] typeName , SourceTypeBinding currentType , Scope scope , boolean proposeAllMemberTypes , ObjectVector typesFound ) { } private void findPackages ( CompletionOnPackageReference packageStatement ) { } private void findParameterizedType ( TypeReference ref , Scope scope ) { } private void findTypeParameters ( char [ ] token , Scope scope ) { } private void findTypesAndPackages ( char [ ] token , Scope scope , ObjectVector typesFound ) { } private void findTypesAndSubpackages ( char [ ] token , PackageBinding packageBinding , Scope scope ) { } private void findTypesFromStaticImports ( char [ ] token , Scope scope , boolean proposeAllMemberTypes , ObjectVector typesFound ) { } private void findVariablesAndMethods ( char [ ] token , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean insideTypeAnnotation , boolean insideAnnotationAttribute ) { } private char [ ] [ ] findVariableFromUnresolvedReference ( LocalDeclaration variable , BlockScope scope , final char [ ] [ ] discouragedNames ) { } private char [ ] [ ] findUnresolvedReferenceAfter ( int from , BlockScope scope , final char [ ] [ ] discouragedNames ) { } private void findUnresolvedReference ( int completedNameStart , int completedNameEnd , BlockScope scope , char [ ] [ ] discouragedNames ) { } private char [ ] [ ] findUnresolvedReferenceBefore ( int recordTo , int parseTo , BlockScope scope , final char [ ] [ ] discouragedNames ) { } private void findVariableName ( char [ ] token , char [ ] qualifiedPackageName , char [ ] qualifiedSourceName , char [ ] sourceName , final TypeBinding typeBinding , char [ ] [ ] discouragedNames , final char [ ] [ ] forbiddenNames , int dim , int kind , int modifiers ) { } private void findVariableNames ( char [ ] name , TypeReference type , char [ ] [ ] discouragedNames , char [ ] [ ] forbiddenNames , int kind , int modifiers ) { } private ImportBinding [ ] getFavoriteReferenceBindings ( Scope scope ) { if ( ( this . favoriteReferenceBindings ) != null ) return this . favoriteReferenceBindings ; String [ ] favoriteReferences = this . requestor . getFavoriteReferences ( ) ; if ( ( favoriteReferences == null ) || ( ( favoriteReferences . length ) == 0 ) ) return null ; ImportBinding [ ] resolvedImports = new ImportBinding [ favoriteReferences . length ] ; int count = 0 ; next : for ( int i = 0 ; i < ( favoriteReferences . length ) ; i ++ ) { String favoriteReference = favoriteReferences [ i ] ; int length ; if ( ( favoriteReference == null ) || ( ( length = favoriteReference . length ( ) ) == 0 ) ) continue next ; boolean onDemand = ( favoriteReference . charAt ( ( length - 1 ) ) ) == '*' ; char [ ] [ ] compoundName = CharOperation . splitOn ( '.' , favoriteReference . toCharArray ( ) ) ; if ( onDemand ) { compoundName = CharOperation . subarray ( compoundName , 0 , ( ( compoundName . length ) - 1 ) ) ; } for ( int j = 0 ; j < count ; j ++ ) { ImportReference f = resolvedImports [ j ] . reference ; if ( CharOperation . equals ( f . tokens , compoundName ) ) continue next ; <START_BUG> if ( ( ! onDemand ) && ( ! ( f . onDemand ) ) ) { <END_BUG>

Fix:
if ( ( ! onDemand ) && ( ( ( f . bits ) & ( ASTNode . OnDemand ) ) == 0 ) ) {