Buggy code:
Scanner identifierScanner ; static final char [ ] [ ] baseTypes = new char [ ] [ ] { "boolean" . toCharArray ( ) , "byte" . toCharArray ( ) , "char" . toCharArray ( ) , "double" . toCharArray ( ) , "float" . toCharArray ( ) , "int" . toCharArray ( ) , "long" . toCharArray ( ) , "short" . toCharArray ( ) , "void" . toCharArray ( ) } ; static final char [ ] classField = "class" . toCharArray ( ) ; static final char [ ] lengthField = "length" . toCharArray ( ) ; static final char [ ] THIS = "this" . toCharArray ( ) ; static final char [ ] THROWS = "throws" . toCharArray ( ) ; public CompletionEngine ( ISearchableNameEnvironment nameEnvironment , ICompletionRequestor requestor , Map settings ) { } 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 , Binding qualifiedBinding , Scope scope ) { } public void complete ( ICompilationUnit sourceUnit , int completionPosition ) { } private TypeBinding [ ] computeTypes ( Expression [ ] arguments , BlockScope scope ) { } private void findClassField ( char [ ] token , TypeBinding receiverType ) { } private void findConstructors ( ReferenceBinding currentType , TypeBinding [ ] argTypes , Scope scope , InvocationSite invocationSite ) { } 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 ) { } private void findImports ( CompletionOnImportReference importReference ) { } private void findKeywords ( char [ ] keyword , char [ ] [ ] choices , Scope scope ) { } 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 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 ) { } private void findLocalMethodDeclarations ( char [ ] methodName , MethodBinding [ ] methods , Scope scope , ObjectVector methodsFound , boolean onlyStaticMethods , boolean exactMatch , ReferenceBinding receiverType ) { int methodLength = methodName . length ; next : for ( int f = methods . length ; ( -- f ) >= 0 ; ) { MethodBinding method = methods [ f ] ; if ( method . isConstructor ( ) ) continue next ; if ( onlyStaticMethods && ( ! ( method . isStatic ( ) ) ) ) continue next ; if ( ( options . checkVisibility ( ) ) && ( ! ( method . canBeSeenBy ( receiverType , false , scope ) ) ) ) continue next ; if ( exactMatch ) { if ( ! ( CharOperation . equals ( methodName , method . selector , false ) ) ) continue next ; } else { if ( methodLength > ( method . selector . length ) ) continue next ; if ( ! ( CharOperation . prefixEquals ( methodName , method . selector , false ) ) ) continue next ; } MethodBinding [ ] existingMethods = receiverType . methods ( ) ; <START_BUG> for ( int i = 0 ; i < ( existingMethods . length ) ; i ++ ) { <END_BUG> MethodBinding existingMethod = existingMethods [ i ] ; if ( ( CharOperation . equals ( method . selector , existingMethod . selector , true ) ) && ( method . areParametersEqual ( existingMethod ) ) ) { continue next ; } } for ( int i = methodsFound . size ; ( -- i ) >= 0 ; ) { MethodBinding otherMethod = ( ( MethodBinding ) ( methodsFound . elementAt ( i ) ) ) ; if ( method == otherMethod ) continue next ; if ( ( CharOperation . equals ( method . selector , otherMethod . selector , true ) ) && ( method . areParametersEqual ( otherMethod ) ) ) { if ( method . declaringClass . isSuperclassOf ( otherMethod . declaringClass ) ) continue next ; if ( otherMethod . declaringClass . isInterface ( ) ) if ( method . declaringClass . implementsInterface ( otherMethod . declaringClass , true ) ) continue next ; if ( method . declaringClass . isInterface ( ) ) if ( otherMethod . declaringClass . implementsInterface ( method . declaringClass , true ) ) continue next ; } } methodsFound . add ( method ) ; int length = method . parameters . length ; char [ ] [ ] parameterPackageNames = new char [ length ] [ ] ; char [ ] [ ] parameterTypeNames = new char [ length ] [ ] ; for ( int i = 0 ; i < length ;

Fix:
for ( int i = 0 , length = ( existingMethods == null ) ? 0 : existingMethods . length ; i < length ; i ++ ) {