Bug 40243 inline method: loses comments [refactoring]
20030715 inline method loses comments that are places before call sites. example: package p; public class A { private void helper1(int startLine, int startColumn, int endLine, int endColumn, boolean replaceAll, boolean makeFinal, String tempName) throws Exception{ helper1(startLine, startColumn, endLine, endColumn, replaceAll, makeFinal, tempName, tempName); } private void helper1(int startLine, int startColumn, int endLine, int endColumn, boolean replaceAll, boolean makeFinal, String tempName, String tempName2) { } public void test0() throws Exception{ // regression test for bug XYZ helper1(4, 16, 4, 17, false, false, "temp"); } } inline the first helper1 the all-important (for me) comment is gone!
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/argument_in/TestLocalReferencePrefix.java
package argument_in;
public class TestLocalReferencePrefix {
	public void main() {
		int a = 0;
		int b = 1;
		int c = 2;
		int d = 3;
    
		a = aa((a + bb( b, c, d)), 0) + b;
	}
	
	private int bb(int u, int v, int w) {
	  return (u & v) | (~u & w);
	}
	private int aa(int x, int n) {
	  return (x << n) | (x >>> (32 - n));
	}
}