Bug 9440 Duplicate non-qualified class names no handled by import generator
If I have two types: org.acme.goodstuff.MyType and org.acme.coolstuff.MyType and I use Code Completion (or something that invokes the smart import logic). The smart import stuff generates imports for both references to these types, ignoring the fact that one of them has to remain qualified in the code in order not to conflict with the other. You cannot have two import statements which resolve the same non-qualified type identifier. The standard library has some instances of this (for instance the Interface 'Certificate' and the abstract Class 'Certificate').
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
return new JavaElementImageDescriptor(descriptor, JavaElementImageDescriptor.WARNING, size);	    
	}
	
	protected JavaCompletionProposal createCompletion(int start, int end, String completion, ImageDescriptor descriptor, String name, int relevance) {
		Image icon= (descriptor == null) ? null : fRegistry.get(descriptor);
		return new JavaCompletionProposal(completion, start, getLength(start, end), icon, name, relevance);
	}
	private int getLength(int start, int end) {
		int length;
		if (fUserReplacementLength == -1) {
			length= fPreventEating ? fCodeAssistOffset - start : end - start;
		} else {
			length= fUserReplacementLength;
			
			if (start < fCodeAssistOffset) {
				length+= fCodeAssistOffset - start;
			}
		}
		return length;
	}
	
	/**
	 * Specifies the context of the code assist operation.
	 * @param codeAssistOffset The Offset on which the code assist will be called.
	 * Used to modify the offsets of the created proposals. ('Non Eating')
	 * @param jproject The Java project to which the underlying source belongs.
	 * Needed to find types referred.
	 * @param cu The compilation unit that is edited. Used to add import statements.
	 * Can be <code>null</code> if no import statements should be added.
	 */