##### Overview

- Download PMD 3.9
- What's new in PMD 3.9
- PMD in the news
- PMD-related products and books
- Best practices
- Future directions
- Similar projects
- Credits
- License
- What does 'PMD' mean?

##### Usage

- Installation
- Command line usage
- Ant task usage
- Maven plugin usage
- IDE plugin usage
- Suppressing warnings
- Finding duplicated code
- JSP support

##### Customizing PMD

- Compiling PMD
- How to write a rule
- Writing XPath rules
- How to make a rule set
- How it works

##### For example

- Run PMD on a Sourceforge project

##### Rule Sets

- Index
- Basic
- Braces
- Code Size
- Clone
- Controversial
- Coupling
- Design
- Finalizers
- Import Statements
- J2EE
- Javabeans
- JUnit Tests
- Logging (Java)
- Logging (Jakarta)
- Migrating
- Naming
- Optimizations
- Strict Exceptions
- Strings
- Sun Security
- Unused Code
- Java Server Pages
- Java Server Faces

##### Project Documentation

- About PMD
- Project Info
- Project Reports
- Development Process

## scratchpad

These are new rules that are still in progress.

### DataflowAnomalyAnalysis

The dataflow analysis tracks local definitions, undefinitions and references to variables on different paths on the data flow. From those informations there can be found various problems. 1. UR - Anomaly: There is a reference to a variable that was not defined before. This is a bug and leads to an error. 2. DU - Anomaly: A recently defined variable is undefined. These anomalies may appear in normal source text. 3. DD - Anomaly: A recently defined variable is redefined. This is ominous but don't have to be a bug.

This rule is defined by the following Java class: net.sourceforge.pmd.dfa.DaaRule

Here's an example of code that would trigger this rule:

    public class Foo {
        public void foo() {
    	 int buz = 5;
    	 buz = 6; // redefinition of buz -&gt; dd-anomaly
    	 foo(buz);
    	 buz = 2;
        } // buz is undefined when leaving scope -&gt; du-anomaly
    }

This rule has the following properties:

Name | Default value | Description
maxviolations | 100 |
maxpaths | 1000 |