Bug 24931 inline method - adds unnecessary assignment [refactoring]
I-20021016 linux-gtk: public class Moo { void foo(int a) { System.out.println(a); } void goo() { int n= 42; foo(n); int x= 7; // <-- } } 1. select foo in goo 2. inline method 3. press next 4. observe that the method invocation 'foo(n);' is replaced by 'int a= n; System.out.println(a);' This assignment is unnecessary und will go away if the following unrelated statement ('int x= 7;') is removed. I assume this is some sort of conservative strategy to avoid variable name clashes.
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/argument_out/TestLocalReferenceUnused.java
package argument_out;
public class TestLocalReferenceUnused {
	public void main() {
		int i= 10;
		i= i + 10;
		bar(i);
	}
	
	public void foo(int x) {
		x= x + 10;
		bar(x);
	}
	
	public void bar(int z) {
	}
}