PMD can be used as a source code analyser. It can identify common programming flaws such as empty catch blocks, unused variables, and unnecessary object creation. It supports Java, JavaScript and Salesforce.com Apex, PLSQL.
CPD, or copy-paste detector, is also included. CPD detects duplicate code in Java, C++ and C#, Groovy and PHP, Ruby and Fortran. It also finds PLSQL, Apache Velocity and Scala.
Version 6.39.0:
Full list of changes available here