Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FindBugs

 
fred rosenberger
lowercase baba
Bartender
Posts: 12087
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if this is the correct forum... if not, apologies in advance.
I'm wondering if anybody here has ever used any kind of static code analyzer. I found one called "FindBugs", and played with it for a few minutes. it found a few things (well, a lot actually), like a possible Null Pointer exceptions (it was right), and so on.
does anybody see value in these tools? does anybody incorporate them into regular builds/auto testing? I'm trying to decide how much effor i need to put into convincing my boss this is a worthwhile tool.
thanks,
fred
 
Eric Sexton
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use WSAD and that thing checks your code after every keystroke. It is constantly finding problems and warning you about stuff. It doesn't necessarily analyze the code as hardcore as what you are describling, but I can find syntax errors and the like.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred,
There is a testing forum further down on the page. This will probably get moved there.
I use JTest (commercial product) which does static analysis. I find it to be useful. It can point out errors that are hard to find on your own. It also helps to create cleaner code. The null pointer exceptions are actual dynamic/runtime analysis. That is another useful feature of this kind of tool. At some point we will probably incorporate it into a nightly build.
What's the website for FindBugs? Is it commercial or open source.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12087
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
website for findbugs:
http://www.cs.umd.edu/~pugh/java/bugs/
it is open source.
also, believe it or not, it found a NULL POINTER exception (or a possible one) as a static analyzer. the code was not running. now it was a pretty silly mistake... something like

or some such.
thanks!! sorry for the wrong list posting!
f
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link. They have a paper on the site that explains how they can catch some null pointers through static analysis. It was really interesting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic