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

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: 
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.


1 comment:

Muhammad Amir said...
This comment has been removed by a blog administrator.