Java J2EE Portal
Enterprise Java Station
J2EE curve
Java News / Articles
Java News / Articles
What are Digital Signatures? Compute and Verify a Digital Signature Using J
Building User Interfaces Using Google Web Toolkit (GWT)
Synergies between J2EE, SOA and Web2.0
Processing...
Buy Java, Deals On Software Technology Store
Click here for great deals on computers, laptops, software and books
Four tools that make Java code review painless and effective PDF Print
Written by Harshad Oak   
Jan 19, 2005 at 12:04 AM
Just read about the release of a new Java code review tool and that reminded me of an article I had written quite some time back.
The article was based on my experiences in a company. Code reviews in that company were more of a ritual than meant to actually deliver some results.
Code review tools have the potential to make a big difference to the quality of code delivered.

Have a look at this article Three tools that make Java code review painless and effective. Although the article was written in 2003, I believe all the tools discussed, namely PMD, Checkstyle, and Jalopy are still very much around. The latest release was of the review tool Hammurapi. So that makes it four code review tools you should look at.

Do you think code reviews are important and what do you think is the best way to review Java code?
User Comments

Comment by Guest on 2005-01-19 02:38:50
http://findbugs.sourceforge.net/

Comment by Guest on 2005-01-19 13:56:27
By pair programming...

Comment by Guest on 2005-01-19 22:41:12
Checkstyle is great. We used to use PMD, but dropped it as CheckStyle now has many of the same rules PMD does. But these are just one TYPE of checking tool Others include: 
 
[URL=http://artho.com/jlint/]JLint[/URL] - Very fast. Good for detecting NPE's 
[URL=http://www.jutils.com]Lint4j[/URL] 
[URL=http://findbugs.sf.net]FindBugs[/URL] 
[URL=http://www.redhillconsulting.com.au/products/simian]Simian[/URL] - Dupliate code. 
[URL=http://www.niii.ru.nl/ita/sos/escjava/]ESC/Java 2[/URL] 
 
The first 3 intelligently scan your bytecode across multiple files. Checkstyle only looks for patterns in your source code. 
 
ESC is the best, I think, but it's hard to use. We use it successfully, but it took a while to figure it out. It has almost completely eliminated the chance for NPE, index of out of bouncds, and class cast exceptions. It requires lots and lots of design-by-contract annotations.

Comment by Guest on 2005-01-19 22:46:42
Pair programming does NOT replace the usefulness of a code review tool. I doubt it allows you to write bug-free code that is completly free of design shortcommingg. People aren't perfect. Tools won't fix that, but they certainly help. 
 
We pair program and it certain does help code quality.

Comment by Guest on 2005-01-19 23:13:29
but the site http://www.sos.cs.ru.nl/research/escjava is remarkably boring. no screenshots, userguide..nothing. 
 
was also surprised to see that the download size is 7.4 MB. perhaps the biggest of all code review tools.

Comment by Guest on 2005-01-20 00:07:21
Another tool that I've heard of in this space is Juliet which is used for code comprehension.

Comment by dumbjavacoder on 2005-01-20 10:58:22
Hi, 
 
I also blogged about these code review tools, primarily about PMD in my blog. You can check it here, ne_calendar.asp?team=Admin&location=Mayfair&order=6.3.1. 
 
My comments on these tools from my blog, 
 
" I want to say that this tool cannot completely replace manual code reviews which are more effective. Pareto's 80-20 rule applies here. ha ha... :-). As this tool will help to review 80% common problems and good old manual review can cover 20% critical problems. " 
 

Comment by dumbjavacoder on 2005-01-20 11:00:35
Sorry. The blog link is missing in above post. 
It is http://jroller.com/page/dumbjavacoder/20050119#pmd_open_source_java_code
Your Name / Email Address
Comment
Spam Protection - Please enter the code in the image -

Listen to code


Add This Feed Button

Enter your Email


Java Expert Interviews
Sameer Tyagi Sun
Understanding Web Services and SOA
TonyMorrisJTiger
Why pick JTiger Java Unit Testing Framework over good old JUnit?
Satish Talim
Java and J2EE Today: An interview with Satish Talim
Processing...
Go to top of page  Home |
SiteMap

Copyright 2004 to 2008 Rightrix Solutions. All rights reserved. All product names are trademarks of their respective companies. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Rightrix Solutions and IndicThreads.com are independent of Sun Microsystems, Inc.

Views expressed at IndicThreads.com reflect the views of the authors alone, and do not necessarily reflect those of IndicThreads.com. IndicThreads.com and it's authors are not responsible for reader comments and opinions.

Enterprise Java J2EE JEE Portal >> IndicThreads.com