Reports redundant method parameters that can be replaced with local variables. If all local usages of a parameter are preceded by assignments to that parameter, the parameter can be removed and its usages replaced with local variables. There is no sense to have such parameter as values passed to it are overwritten. Usually the problem appears as a result of refactoring.

For example:


  void test(int p) {
    p = 1;
    System.out.print(p);
  }

will be replaced with


  void test(int p) {
    p = 1;
    System.out.print(p);
  }