Bug 102142 [quick fix] Change method signature quick fix renames parameter
In 3.1. Code: public class Foo { Foo(String string) { System.out.println("" + string); } private void bar() { new Foo(3); } } The compile error on new Foo(3) offers a quick fix: "Change constructor Foo(String) to Foo(int)". Selecting it changes not only the type, but the name of the parameter: String string becomes int i. Accepting this default leads to a compile error.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java
buf.append("class E {\n");
		buf.append("    void foo(@Deprecated final String map){}\n");
		buf.append("    {foo(Collections.EMPTY_MAP);}\n");
		buf.append("}\n");
		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
		CompilationUnit astRoot= getASTRoot(cu);
		ArrayList proposals= collectCorrections(cu, astRoot);
		assertCorrectLabels(proposals);
		assertNumberOfProposals(proposals, 2);
		String[] expected= new String[2];
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("import java.util.Collections;\n");
		buf.append("import java.util.Map;\n");
		buf.append("\n");
		buf.append("class E {\n");
		buf.append("    void foo(@Deprecated final Map map){}\n");
		buf.append("    {foo(Collections.EMPTY_MAP);}\n");
		buf.append("}\n");
		expected[0]= buf.toString();
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("import java.util.Collections;\n");
		buf.append("import java.util.Map;\n");
		buf.append("\n");
		buf.append("class E {\n");
		buf.append("    void foo(@Deprecated final String map){}\n");
		buf.append("    {foo(Collections.EMPTY_MAP);}\n");