This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
class Test { void foo(String something) { System.out.println(something); // Select 'something'->Refactor->Introduce->Field..., use default on the dialog } private String something; } will be transformed to class Test { void foo(String something) { something = something; System.out.println(something); // Select 'something'->Refactor->Introduce->Field..., use default on the dialog } private String something; } The resulting code does not make much sense as it leads to 'Assignment to itself'. I would say that: 1) User should not be offered (by default) the name of field which is shadowed in the method by the method parameter. 2) If this shadowing occurs, the usage of the field in the method should be qualified by 'this'.