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
modifyParameters(rewrite, decl, isInDifferentCU);
			}
			if (fExceptionChanges != null) {
				modifyExceptions(rewrite, decl);
			}
			return rewrite;
		}
		return null;
	}
	private void modifyParameters(ASTRewrite rewrite, MethodDeclaration methodDecl, boolean isInDifferentCU) throws CoreException {
		AST ast= methodDecl.getAST();
		ArrayList usedNames= new ArrayList();
		boolean hasCreatedVariables= false;
		IVariableBinding[] declaredFields= fSenderBinding.getDeclaringClass().getDeclaredFields();
		for (int i= 0; i < declaredFields.length; i++) { 
			usedNames.add(declaredFields[i].getName());
		}
		NewImportRewrite imports= getImportRewrite();
		ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY);
		List parameters= methodDecl.parameters(); 
		int k= 0; 
		for (int i= 0; i < fParameterChanges.length; i++) {
			ChangeDescription curr= fParameterChanges[i];
			if (curr == null) {
				SingleVariableDeclaration oldParam= (SingleVariableDeclaration) parameters.get(k);
				usedNames.add(oldParam.getName().getIdentifier());
				k++;
			} else if (curr instanceof InsertDescription) {
				InsertDescription desc= (InsertDescription) curr;
				SingleVariableDeclaration newNode= ast.newSingleVariableDeclaration();