Buggy code:
private Map settings , IJavaProject javaProject ) { } public void acceptClass ( char [ ] packageName , char [ ] className , int modifiers ) { } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , int modifiers ) { } public void acceptPackage ( char [ ] packageName ) { } public void acceptType ( char [ ] packageName , char [ ] typeName ) { } private void complete ( ASTNode astNode , ASTNode astNodeParent , Binding qualifiedBinding , Scope scope ) { } public void complete ( IType type , char [ ] snippet , int position , char [ ] [ ] localVariableTypeNames , char [ ] [ ] localVariableNames , int [ ] localVariableModifiers , boolean isStatic ) { } private Initializer parseSnippeInitializer ( char [ ] snippet , int position , char [ ] [ ] localVariableTypeNames , char [ ] [ ] localVariableNames , int [ ] localVariableModifiers , boolean isStatic ) { } public void complete ( ICompilationUnit sourceUnit , int completionPosition , int pos ) { } private TypeBinding [ ] computeTypes ( Expression [ ] arguments , BlockScope scope ) { } private void findAnonymousType ( ReferenceBinding currentType , TypeBinding [ ] argTypes , Scope scope , InvocationSite invocationSite ) { } private void findClassField ( char [ ] token , TypeBinding receiverType , Scope scope ) { } private void findExplicitConstructors ( char [ ] name , ReferenceBinding currentType , MethodScope scope , InvocationSite invocationSite ) { } private void findConstructors ( ReferenceBinding currentType , TypeBinding [ ] argTypes , Scope scope , InvocationSite invocationSite , boolean forAnonymousType ) { } private void findFields ( char [ ] fieldName , FieldBinding [ ] fields , Scope scope , ObjectVector fieldsFound , ObjectVector localsFound , boolean onlyStaticFields , ReferenceBinding receiverType , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall ) { } private void findFields ( char [ ] fieldName , ReferenceBinding receiverType , Scope scope , ObjectVector fieldsFound , ObjectVector localsFound , boolean onlyStaticFields , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall ) { } private void findFieldsAndMethods ( char [ ] token , TypeBinding receiverType , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall ) { } private void findImports ( CompletionOnImportReference importReference ) { } private void findKeywords ( char [ ] keyword , char [ ] [ ] choices ) { } private void findKeywordsForMember ( char [ ] token , int modifiers ) { } private void findMemberTypes ( char [ ] typeName , ReferenceBinding [ ] memberTypes , ObjectVector typesFound , ReferenceBinding receiverType , SourceTypeBinding invocationType ) { } private void findMemberTypes ( char [ ] typeName , ReferenceBinding receiverType , Scope scope , SourceTypeBinding typeInvocation ) { } private void findIntefacesMethods ( char [ ] selector , TypeBinding [ ] argTypes , ReferenceBinding receiverType , ReferenceBinding [ ] itsInterfaces , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , boolean isCompletingDeclaration , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall ) { } private void findImplicitMessageSends ( char [ ] token , TypeBinding [ ] argTypes , Scope scope , InvocationSite invocationSite , Scope invocationScope ) { } private void findLocalMethods ( char [ ] methodName , TypeBinding [ ] argTypes , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , ReferenceBinding receiverType , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall ) { } int computeRelevanceForCaseMatching ( char [ ] token , char [ ] proposalName ) { } private int computeRelevanceForClass ( ) { } private int computeRelevanceForInterface ( ) { } private int computeRelevanceForQualification ( boolean prefixRequired ) { } private int computeRelevanceForStatic ( boolean onlyStatic , boolean isStatic ) { } private int computeRelevanceForStaticOveride ( boolean isStatic ) { } private int computeRelevanceForException ( char [ ] proposalName ) { } private int computeRelevanceForExpectingType ( TypeBinding proposalType ) { } private int computeRelevanceForExpectingType ( char [ ] packageName , char [ ] typeName ) { } int computeRelevanceForInterestingProposal ( ) { } private int computeRelevanceForInterestingProposal ( Binding binding ) { } private void computeUninterestingBindings ( ASTNode parent , Scope scope ) { } private void findLocalMethodDeclarations ( char [ ] methodName , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , ReferenceBinding receiverType ) { } private void findMethods ( char [ ] selector , TypeBinding [ ] argTypes , ReferenceBinding receiverType , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , boolean isCompletingDeclaration , InvocationSite invocationSite , Scope invocationScope , boolean implicitCall , boolean superCall ) { } private char [ ] [ ] findMethodParameterNames ( MethodBinding method , char [ ] [ ] parameterTypeNames ) { ReferenceBinding bindingType = method . declaringClass ; char [ ] [ ] parameterNames = null ; int length = parameterTypeNames . length ; if ( length == 0 ) { return CharOperation . NO_CHAR_CHAR ; } if ( bindingType instanceof SourceTypeBinding ) { SourceTypeBinding sourceType = ( ( SourceTypeBinding ) ( bindingType ) ) ; if ( ( sourceType . scope ) != null ) { TypeDeclaration parsedType ; if ( ( parsedType = sourceType . scope . referenceContext ) != null ) { AbstractMethodDeclaration methodDecl = parsedType . declarationOf ( method . original ( ) ) ; if ( methodDecl != null ) { Argument [ ] arguments = methodDecl . arguments ; parameterNames = new char [ length ] [ ] ; for ( int i = 0 ; i < length ; i ++ ) { parameterNames [ i ] = arguments [ i ] . name ; } } } } } if ( parameterNames == null ) { char [ ] compoundName = CharOperation . concatWith ( bindingType . compoundName , '.' ) ; Object type = typeCache . get ( compoundName ) ; ISourceType sourceType = null ; if ( type != null ) { if ( type instanceof ISourceType ) { sourceType = ( ( ISourceType ) ( type ) ) ; } } else { NameEnvironmentAnswer answer = nameEnvironment . findType ( bindingType . compoundName ) ; if ( ( answer != null ) && ( answer . isSourceType ( ) ) ) { sourceType = answer . getSourceTypes ( ) [ 0 ] ; typeCache . put ( compoundName , sourceType ) ; } } if ( sourceType != null ) { ISourceMethod [ ] sourceMethods = sourceType . getMethods ( ) ; <START_BUG> int len = ( sourceMethods == null ) ? 0 : sourceMethods . length ; <END_BUG>

Fix:
int len = sourceMethods . length ;