Welcome to PMD

PMD scans Java source code and looks for potential problems like:

  • Possible bugs - empty try/catch/finally/switch statements
  • Dead code - unused local variables, parameters and private methods
  • Suboptimal code - wasteful String/StringBuffer usage
  • Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
  • Duplicate code - copied/pasted code means copied/pasted bugs

Download (early access)

A new snapshot of the 5.0 release is generated daily using a Hudson continuous integration server.

Source and binary packages are available here in the artifacts section in the center of the page. The packages for older builds can be accessed by navigating to the details page for a given build.

Maven packages are also generated daily and uploaded to the snapshot repository.

You can get an overview of all the rules at the rulesets index page.

Integrations

PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.