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
import org.eclipse.jdt.testplugin.JavaProjectHelper;
import org.eclipse.jdt.testplugin.TestOptions;
import org.eclipse.jdt.ui.tests.core.ProjectTestSetup;
public class UnresolvedMethodsQuickFixTest extends QuickFixTest {
	private static final Class THIS= UnresolvedMethodsQuickFixTest.class;
	
	private IJavaProject fJProject1;
	private IPackageFragmentRoot fSourceFolder;
	public UnresolvedMethodsQuickFixTest(String name) {
		super(name);
	}
	public static Test allTests() {
		return setUpTest(new TestSuite(THIS));
	}
	
	public static Test suite() {
		return allTests();
	}
	public static Test setUpTest(Test test) {
		return new ProjectTestSetup(test);
	}
	protected void setUp() throws Exception {
		Hashtable options= TestOptions.getDefaultOptions();
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
		options.put(JavaCore.COMPILER_PB_NO_EFFECT_ASSIGNMENT, JavaCore.IGNORE);
		JavaCore.setOptions(options);			
		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);