Friday, August 10, 2012

Relationships about commenting the code and software bugs...

On the relationship between comment update practices and Software Bugs - a recent paper from JSS
http://dx.doi.org/10.1016/j.jss.2011.09.019

Looking closer and closer into the field of Mining Software Repositories and finding dependencies between code and defects, I've come across this paper. It shows how insufficient or wrong commenting influences quality.

I am sure I need not convince anyone about the direction of this relationship :) However, i wanted to highlight the actual numbers that they've worked with:
  • In FreeBSD, there are 2x more inconsistency (i.e. misleading) comments that the consistent ones - this causes the developers to mistrust comments and skip them at all. A vicious circle
  • Eclipse has a majority of consistent comments - probably caused by the involvment of more rigid processes.
  • A link to the graphs showing these dependencies: http://www.sciencedirect.com/science/article/pii/S016412121100238X#gr2 
The results are interesting since they do not identify a linear dependency between consistent and inconsistent commenting and bugs. Instead they identify relationships like this:
- If the number of inconsistent changes are large, then adding new changes (even if they are consistent) usually leads to bugs.

To sum up - interesting article to read for all of us who want to build automated prediction systems for defects.

@MiroslawStaron
Post a Comment