PMD
Initial release4 November 2002
Stable release
7.19.0[1] Edit this on Wikidata / 28 November 2025
Written inJava
Operating systemWindows, Linux, macOS
TypeStatic program analysis tool
LicenseBSD License, Apache License 2.0, GNU Lesser General Public License[2]
Websitepmd.github.io Edit this on Wikidata
Repository

PMD is an open source static source code analyzer that reports on issues found within application code. PMD includes built-in rule sets and supports the ability to write custom rules. PMD does not report compilation errors, as it only can process well-formed source files. Rather, PMD is designed to detect inefficient code or bad programming habits, which can reduce the performance and maintainability of the program if they accumulate. It can analyze files written in Java, JavaScript, Apex and Visualforce, PLSQL, Apache Velocity, XML, and XSL.[3]

While PMD does not officially stand for anything,[4] several retro acronyms have been suggested, including for instance Programming Mistake Detector and Project Meets Deadline.[5]

Features

edit

PMD is able to detect flaws or possible flaws in source code, like:

  • Bugs—Empty try/catch/finally/switch blocks.
  • Dead code—Unused local variables, parameters and private methods.
  • Empty if/while statements.
  • Overcomplicated expressions—Unnecessary if statements, for loops that could be while loops.
  • Suboptimal code—Wasteful String/StringBuffer usage.
  • Classes with high Cyclomatic Complexity measurements.
  • Duplicate code—Copied/pasted code can mean copied/pasted bugs, and decreases maintainability.

License

edit

PMD is released under a BSDish license while parts of it are under Apache License 2.0 and the LGPL.[2]

Copy/Paste Detector (CPD)

edit

The Copy/Paste Detector (CPD) is an add-on to PMD that uses the Rabin–Karp string search algorithm to find duplicated code. Unlike PMD, CPD works with a broader range of languages including Java, JavaServer Pages (JSP), C, C++, Fortran, PHP, and C# code.[6]

Plugins

edit

PMD has plugins for JDeveloper, Eclipse, jEdit, JBuilder, Omnicore's CodeGuide, NetBeans/Sun Studio, IntelliJ IDEA, TextPad, Maven, Ant, Gradle, Gel, JCreator, Hudson, Jenkins, SonarQube, Visual Studio Code and Emacs.[7] There is also a CLI version.

See also

edit

References

edit
  1. ^ "Release PMD 7.19.0 (28-November-2025)". Retrieved 30 December 2025.
  2. ^ a b "License". GitHub. 18 January 2015. Retrieved 13 August 2015.
  3. ^ "PMD Capable Languages | PMD Source Code Analyzer". docs.pmd-code.org. Retrieved 2025-12-30.
  4. ^ "What does 'PMD' mean?". pmd-code.org. Retrieved 31 March 2023.
  5. ^ "Destroy annoying bugs part 4: the end is near". freesoftwaremagazine.com.
  6. ^ "CPD Capable Languages | PMD Source Code Analyzer". docs.pmd-code.org. Retrieved 2025-12-30.
  7. ^ "Tools / Integrations". pmd-code.org. Retrieved 31 March 2023.

Further reading

edit
edit

📚 Artikel Terkait di Wikipedia

PMD

maszynowy dywersyjny, a 1939 Polish machine pistol design PMD (software), code analyzer for Java PMD 85, 8-bit personal computer produced in Czechoslovakia

List of tools for static code analysis

ST, FBD, LD) Coverity Facebook Infer Fluid Attacks Klocwork LDRA Testbed PMD RIPS Semgrep SourceMeter Understand ESLint – JavaScript syntax checker and

Time-of-flight camera

Azure Kineck DK pmd - camera reference designs and software (pmd[vision], including TOF modules [CamBoard]) and TOF imagers (PhotonICs) by PMD Technologies

List of free and open-source software packages

Frama-C Infer JSHint lint PMD Pylint Semgrep Soot Sparse Splint Yasca Docker Kubernetes Podman Doxygen – tool for writing software reference documentation

United States Air Force Plant 42

United States Air Force Plant 42 (IATA: PMD, ICAO: KPMD, FAA LID: PMD) is a classified aircraft manufacturing plant owned by the United States Air Force

Personal computer

systems run commercial software, free-of-charge software ("freeware"), which is most often proprietary, or free and open-source software, which is provided

Comparison of continuous integration software

compendium of software tools that support continuous integration. The following table compares notable continuous integration software on the basis of

Code smell

code quality are often the causes of such smells. Tools such as Checkstyle, PMD, FindBugs, and SonarQube can automatically identify code smells. Duplicated