Bug finding tools for Java

I came across an article in the 15th International Symposium on Software Reliability Engineering (2004) titled “A Comparison of Bug Finding Tools for Java“. The authors, Nick Rutar, Christian B. Almazan, and Jeffrey S. Foster, have carried out probably the first detailed comparison of the most popular automatic bug finding tools for Java.

They tested PMD, FindBugs, JLint, ESC/Java and Bandera. They ran most of these tools on five open source projects: Azureus, Art of Illusions, Tomcat, JBoss and Megamek.

From reading their article one gets the impression that the usefulness of these tools is greatly hurt by their tendency to report false positives, i.e. warnings that really are not bugs. Neither does there seem to be a great correlation between the tools, but this might be considered a good thing: some tools are better at finding certain categories of bugs than others.

I have used FindBugs before on a small project with three developers, and its use helped us uncover hidden bugs that mights have caused us much shame. One of us, for example, was casting to float an integer division, mistakenly assuming that 1/2 would be equal to 0.5. FindBugs caught that sorts of thing.

I have the feeling that the author’s choice of test data was perhaps not optimal. Popular open source projects tend to have code of excellent quality, which might be a reason for the high ratio of false positives. There simply aren’t enough bugs of the kind that can be caught by automatic tools. On more typical projects, I firmly believe that regular sweeps with this kind of tools have their place.

Oh, so what’s this got to do with smart buildings? Well, as I’ve argued elsewhere, the OSGi programming framework is ideally suited for programming home automation systems, and runs on Java. I therefore expect a lot of Java code to come the way of home automation in the near future, and any tools that might help in ensuring the code’s quality are welcome.

“Ecobilans” software presentation

IBPSA-CH, the newly created regional affiliate of IBPSA for Switzerland, hosted on 19 October 2006 in Geneva a software presentation of so-called “Ecobilans” programs.

These are programs that generally help an organisation assess its social and environmental impact. The programs that were presented were Ecoentreprise, Green-E and Eco-Bat. They all try to solve the same problem but from different perspectives. Eco-Bat, for instances, is exclusively focused on a building’s environmental impact throughout its whole life-cycle.

Two of them were server-based, the third was a standalone program. All can be tried in a demo version. I will not endorse here any of these programs, only note their existence. It is refreshing for me to see that simulation is slowly but surely gaining a foothold in Switzerland, although I have yet to see an integrated building simulation program being widely diffused in this country.