Bug 85831 Organize imports add an unused import [code manipulation]
Using I20050215-2300, run Organize import on this source: package test0069; class Outer<A> { class Inner<B> { } } public class X { test0069.Outer<String>.Inner<Integer> in = new Outer<String>().new Inner<Integer>(); } It adds import test0069.Outer.Inner; that is never used.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
{
			IJavaElement[] elements= cu1.codeSelect(content.indexOf("URL"), "URL".length());
			assertEquals(1, elements.length);
			String key= ((IType) elements[0]).getKey();
			String signature= new BindingKey(key).toSignature();
			
			importsStructure.addImportFromSignature(signature, ast);
		}
		{
			IJavaElement[] elements= cu1.codeSelect(content.indexOf("List"), "List".length());
			assertEquals(1, elements.length);
			String key= ((IType) elements[0]).getKey();
			String signature= new BindingKey(key).toSignature();
			
			importsStructure.addImportFromSignature(signature, ast);
		}
		
		importsStructure.create(true, null);
		
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("import java.util.List;\n");
		buf.append("\n");
		buf.append("import java.io.IOException;\n");
		buf.append("\n");
		buf.append("import java.net.SocketAddress;\n");
		buf.append("import java.net.URL;\n");
		buf.append("\n");
		buf.append("public class B {\n");