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
fToggleEating= (stateMask & SWT.MOD1) != 0;
		if (insertCompletion() ^ fToggleEating)
			fReplacementLength= offset - fReplacementOffset;
		
		apply(document, trigger, offset);
		fToggleEating= false;
	}
	private static Color getForegroundColor(StyledText text) {
		IPreferenceStore preference= JavaPlugin.getDefault().getPreferenceStore();
		RGB rgb= PreferenceConverter.getColor(preference, PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND);
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		return textTools.getColorManager().getColor(rgb);
	}
	private static Color getBackgroundColor(StyledText text) {
		IPreferenceStore preference= JavaPlugin.getDefault().getPreferenceStore();
		RGB rgb= PreferenceConverter.getColor(preference, PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND);
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		return textTools.getColorManager().getColor(rgb);
	}
	
	private void repairPresentation(ITextViewer viewer) {
		if (fRememberedStyleRange != null) {
			 if (viewer instanceof ITextViewerExtension2) {
			 	
			 	ITextViewerExtension2 viewer2= (ITextViewerExtension2) viewer;
			 	
			 	if (viewer instanceof ITextViewerExtension3) {
			 		
			 		ITextViewerExtension3 extension= (ITextViewerExtension3) viewer;
			 		IRegion widgetRange= extension.modelRange2WidgetRange(new Region(fRememberedStyleRange.start, fRememberedStyleRange.length));