Reports method calls whose target is another method call. The quick-fix suggests to introduce a local variable.

Example:


  class X {
    int foo(File f) {
      return f.getName().length();
    }
  }

After the quick-fix is applied:


  class X {
    int foo(File f) {
      final String name = f.getName();
      return name.length();
    }
  }

Use the inspection options to toggle warnings for the following cases: