PMD scans Java source code and looks for potential problems like: Empty try/catch/finally/switch blocks; Unused local variables, parameters and private methods; Empty if/while statements; Overcomplicated expressions - unnecessary if statements, for loops that could be while loops; Classes with high Cyclomatic Complexity measurements Java PMD home is here.