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
op.run(null);
		buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append("import pack0.MyAnnot1;\n");
		buf.append("import pack0.MyAnnot2;\n");
		buf.append("import pack0.MyAnnot3;\n");
		buf.append("\n");
		buf.append("@MyAnnot3 public class Test2 {\n");
		buf.append("    @MyAnnot1 Object e;\n");
		buf.append("    @MyAnnot2(1) void foo() {\n");
		buf.append("    }\n");
		buf.append("}\n");
		assertEqualString(cu.getSource(), buf.toString());
	}
	
	public void testAnnotationImports2() throws Exception {
		IPackageFragmentRoot sourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
		IPackageFragment pack0= sourceFolder.createPackageFragment("pack0", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package pack0;\n");
		buf.append("public @interface MyAnnot1 {\n");
		buf.append("}\n");
		pack0.createCompilationUnit("MyAnnot1.java", buf.toString(), false, null);
		buf= new StringBuffer();
		buf.append("package pack0;\n");
		buf.append("public @interface MyAnnot2 {\n");
		buf.append("    char value();\n");
		buf.append("}\n");
		pack0.createCompilationUnit("MyAnnot2.java", buf.toString(), false, null);