Assessing the Relationship between Software Assertions and Code Quality : An Empirical Investigation

The use of assertions in software development is thought to help produce quali ty software. Unfortunately, there is scant empirical evidence in commercial soft ware systems for this argument to date. This paper presents an empirical case study of two commer cial software components at Microsoft Corporation. The developers of these components syst ematically employed assertions, which allowed us to investigate the relationship bet ween software assertions and code quality. We also compare the efficacy of assertions agains t th t of popular bug finding techniques like source code static analysis tools. We obser ve from our case study that with an increase in the assertion density in a file there is a statistically significant decrease in fault density. Further, the usage of software assertions in these co mponents found a large percentage of the faults in the bug database.

[1]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[2]  Hong Sun,et al.  Investigating the use of analysis contracts to support fault isolation in object oriented code , 2002, ISSTA '02.

[3]  David S. Rosenblum A Practical Approach to Programming With Assertions , 1995, IEEE Trans. Software Eng..

[4]  Thomas Ball,et al.  Static analysis tools as early indicators of pre-release defect density , 2005, ICSE.

[5]  Jeffrey M. Voas,et al.  Putting assertions in their place , 1994, Proceedings of 1994 IEEE International Symposium on Software Reliability Engineering.

[6]  Matthias M. Müller,et al.  Two controlled experiments concerning the usefulness of assertions as a means for programming , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[7]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[8]  N. Nagappan,et al.  Static analysis tools as early indicators of pre-release defect density , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[9]  C. A. R. Hoare Assertions: A Personal Perspective , 2002, Software Pioneers.

[10]  Jean-Marc Jézéquel,et al.  Robustness and diagnosability of OO systems designed by contracts , 2001, Proceedings Seventh International Software Metrics Symposium.

[11]  Richard N. Taylor Assertions in programming languages , 1980, SIGP.

[12]  William R. Bush,et al.  A static analyzer for finding dynamic programming errors , 2000, Softw. Pract. Exp..

[13]  Jessica Keyes,et al.  IEEE Standard Dictionary of Measures to Produce Reliable Software , 2002 .

[14]  James R. Larus,et al.  Righting software , 2004, IEEE Software.

[15]  Dolores R. Wallace,et al.  A Testability-Based Assertion Placement Tool for Object-Oriented Software, , 1998 .