Bug 60078 NPE in ASTConverter
Failing test in N-N20040427-200404270010, org.eclipse.jdt.ui.tests. I disabled the test for the I-build. java.lang.NullPointerException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.NullPointerException.<init>(NullPointerException.java:60) at java.lang.StringBuffer.append(StringBuffer.java:493) at org.eclipse.jdt.core.dom.TypeBinding.getKey(TypeBinding.java) at org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveType(DefaultBindingResolver.java:457) at org.eclipse.jdt.core.dom.TypeDeclaration.resolveBinding(TypeDeclaration.java:779) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:277) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:338) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:271) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1809) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:767) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:333) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:271) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:149) at org.eclipse.jdt.core.dom.ASTParser.convert(ASTParser.java:707) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:677) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:573) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.<init>(OrganizeImportsOperation.java:516) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.<init>(OrganizeImportsOperation.java:520) at org.eclipse.jdt.ui.tests.core.ImportOrganizeTest.testImportOfMemberFromLocal(ImportOrganizeTest.java:1093) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:422) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:306) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30) at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:91) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2569) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2274) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1437) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1408) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:244) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:34) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:280) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:240) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:267) at org.eclipse.core.launcher.Main.run(Main.java:699) at org.eclipse.core.launcher.Main.main(Main.java:683)
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
IPackageFragment pack1= sourceFolder.createPackageFragment("pack1", false, null);
		buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append("import java.util.Set;\n");
		buf.append("import java.util.Vector;\n");
		buf.append("import java.util.Map;\n");
		buf.append("\n");
		buf.append("public class C {\n");
		buf.append("    Vector v;\n");
		buf.append("    Set v2;\n");
		buf.append("    Map v3;\n");
		buf.append("    List1 v4;\n");
		buf.append("    List2 v5;\n");
		buf.append("    String v6;\n");
		buf.append("}\n");
		ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
		String[] order= new String[] { "java", "pack" };
		IChooseImportQuery query= createQuery("C", new String[] {}, new int[] {});
		OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 2, false, true, true, query);
		op.run(null);
		buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append("import List1;\n");
		buf.append("import List2;\n");
		buf.append("\n");	
		buf.append("import java.util.*;\n");
		buf.append("\n");
		buf.append("public class C {\n");