Bug 34754 Array out of bounds in code assist
Build: 2.1 RC2 I got into a state when invoking code assist where the popup window was empty. I can't reproduce it, but I was typing while the popup was open. When I entered a character that narrowed down the possible search values to zero, I was left with an empty popup window. In my case I had entered resource.getK (and there are no methods starting with "getk" on IResource). This resulted in an ArrayIndexOutOfBoundsException in the log. I will attach the log.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposal.java
Assert.isTrue(cursorPosition >= 0);
		fCursorPosition= cursorPosition;
		fContextInformationPosition= (fContextInformation != null ? fCursorPosition : -1);
	}	
	
	/*
	 * @see ICompletionProposalExtension#apply(IDocument, char, int)
	 */
	public void apply(IDocument document, char trigger, int offset) {
		try {
			
			int delta= offset - (fReplacementOffset + fReplacementLength);
			if (delta > 0)
				fReplacementLength += delta;
			
			String string;
			if (trigger == (char) 0) {
				string= fReplacementString;
			} else {
				StringBuffer buffer= new StringBuffer(fReplacementString);
				
				if ((fCursorPosition > 0 && fCursorPosition <= buffer.length() && buffer.charAt(fCursorPosition - 1) != trigger)) {
					buffer.insert(fCursorPosition, trigger);
					++fCursorPosition;
				}
				
				string= buffer.toString();
			}
			
			int referenceOffset= fReplacementOffset + fReplacementLength;