--- title: PMD Introduction keywords: java tags: [getting_started] permalink: index.html toc: false summary: > Welcome to PMD, an extensible cross-language static code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code. last_updated: August 2017 --- {% include image.html file="pmd-logo-big.png" alt="PMD Logo" %} **PMD** scans source code in Java and other languages 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 **CPD**, the copy-pase-detector, finds duplicated code in many languages: * Duplicate code is often just copied and pasted. This means, the bugs are also copied and pasted. Fixing them means, fix all duplicated code locations. ## Features {::options parse_block_html="true" /}