Pmd is described as '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 -'. There are three alternatives to Pmd for a variety of platforms, including Linux, Mac, Windows, Java Mobile and Online / Web-based. The best alternative is Codacy. It's not free, so if you're looking for a free alternative, you could try FindBugs or Checkstyle.
Codacy automates code reviews and monitors code quality on every commit and pull request reporting back the impact of every commit or pull request, issues concerning code style, best practices, security, and many others.
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.