The Unused Code Ruleset contains a collection of rules that find unused code. Unused Private Field detects when a private field is declared that is not used by the class. Unused Local Variables detects when a variable is declared, but not used (except for possibly initial assignment) Unused Private Method detects when a private method is declared but is unused. Avoid passing parameters to methods and then not using those parameters. Unnecessary constructor detects when a constructor is not necessary; i.e., when there's only one constructor, it's public, has an empty body, and takes no arguments.