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
String preview3= getPreviewContent(proposal);
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("import java.util.Vector;\n");
		buf.append("public class E<T> {\n");
		buf.append("    public void goo(Vector<String> v) {\n");
		buf.append("    }\n");
		buf.append("    public Vector<String> foo() {\n");
		buf.append("        goo(this.foo());\n");
		buf.append("        return 9;\n");	
		buf.append("    }\n");
		buf.append("}\n");
		String expected3= buf.toString();
		
		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });		
	}
	
	
	public void testParameterMismatchLessArguments() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
				
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E {\n");
		buf.append("    public void foo(String s, int i, Object o) {\n");
		buf.append("        int x= 0;\n");
		buf.append("        foo(x);\n");
		buf.append("    }\n");
		buf.append("}\n");