Google CodePro Analytix

posted Oct 25, 2012, 8:07 PM by Marsh Gosnell
When I work on C or C++,  I turn up the compiler warning level to the highest setting because I firmly believe that a compiler warning is a bug you haven't found yet.  Java on the other hand, will keep you honest in many respects but it is still pretty easily create a bug and not easily find it. 

Google offers a really nice set of free tools for Java developers that think Android developers will also find very useful.   The package is named Google CodePro Analytix and offers code analysis, similar code analysis, JUnit test editing and generation, code coverage, and other features.  More information about the package can be found at

Static code analysis is great because it can find those bugs you stare at and don't see.  One mistake I almost always see a new Java developer make is to compare strings with "==" instead of equals().  If you are diligent code reviewer or have excellent coverage during unit testing, this problem will usually be found.  CodePro will find and complain about this bug.

The code analysis also offers suggestions to improve performance.  Did you know that passing a single character to String::append() is faster than passing a String containing a single character?  CodePro does.  Similarly, CodePro suggests using charAt(0) instead of startsWith() when searching for a single character.

If you work in Java and use Eclipse, you really should take a look at Google CodePro Analytix.  Your customers will appreciate it when you find the bugs before they do.