views:

558

answers:

2

Are there any automated code review tools for Java? Especially plugins for Eclipse? The tool I expect is an automated code review plugin or tool that can automatically detect the problems in Code. ( Microsoft does this using OACR ).Plugins like Jupiter won't help because they are just peer review tools for eclipse.

+9  A: 

What you mean is not automated code-review but static code analysis.

For Java tools see: http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis#Java

Basically, the difference between code-review and static-code-analysis is one you've already noted. You're curious about software that you can run that will tell you potential issues or bugs, generate reports etc... not software that allows other developers to review and annotate your code for issues.

FindBugs is very popular and has a high level of support, and checkstyle isn't far behind. I've not used any others. (the websites aren't much to look at, but the software works)

altCognito
+1. PMD has a good Eclipse plugin too.
pjz
A: 

Static code analysis for Java can be automated with Apache Maven, which can be extended with many analysis plugins like FindBugs, CheckStyle or PMD. With jxr plugin, the reports can also contain a source code cross reference.

There are many other advantages of Maven (repeatable builds, dependency management), but the biggest advantage of Maven for code analysis is that it can be run during your lunch break, or on a different computer, so it will not slow down your IDE.

The XRadar takes a different road, it builds graphical output and also can visualize changes of the code quality over time:

The XRadar is available in two views. XRadar Statics gives reports on the current build of the system. The other view, XRadar Dynamics, includes the time dimension and views the historical and present versions along the time axis.

http://xradar.sourceforge.net/introduction/reports.html

mjustin