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/ui/org/eclipse/jdt/internal/ui/text/correction/ChangeMethodSignatureProposal.java
k++;
			} else if (curr instanceof InsertDescription) {
				InsertDescription desc= (InsertDescription) curr;
				String type= imports.addImport(desc.type);
				ASTNode newNode= ASTNodeFactory.newName(ast, type);
				listRewrite.insertAt(newNode, i, null);
				String key= getExceptionTypeGroupId(i);
				addLinkedPosition(rewrite.track(newNode), false, key);
				Javadoc javadoc= methodDecl.getJavadoc();
				if (javadoc != null) {
					TagElement newTagElement= ast.newTagElement();
					newTagElement.setTagName(TagElement.TAG_THROWS);
					ASTNode newRef= ASTNodeFactory.newName(ast, type);
					newTagElement.fragments().add(newRef);
					insertTabStop(rewrite, newTagElement.fragments(), "throws_tagcomment" + i); 
					insertThrowsTag(rewrite.getListRewrite(javadoc, Javadoc.TAGS_PROPERTY), exceptions, k, newTagElement);
					addLinkedPosition(rewrite.track(newRef), false, key);
				}
			} else if (curr instanceof RemoveDescription) {
				Name node= (Name) exceptions.get(k);
				listRewrite.remove(node, null);
				k++;
				TagElement tagNode= findThrowsTag(methodDecl, node);
				if (tagNode != null) {
					rewrite.remove(tagNode, null);
				}
			} else if (curr instanceof EditDescription) {
				EditDescription desc= (EditDescription) curr;
				Name oldNode= (Name) exceptions.get(k);
				String type= imports.addImport(desc.type);