Title :
Assert Use in GitHub Projects
Author :
Casalnuovo, Casey ; Devanbu, Prem ; Oliveira, Abilio ; Filkov, Vladimir ; Ray, Baishakhi
Author_Institution :
Comput. Sci. Dept., Univ. of California, Davis, Davis, CA, USA
Abstract :
Asserts have long been a strongly recommended (if non-functional) adjunct to programs. They certainly don´t add any user-evident feature value; and it can take quite some skill and effort to devise and add useful asserts. However, they are believed to add considerable value to the developer. Certainly, they can help with automated verification; but even in the absence of that, claimed advantages include improved understandability, maintainability, easier fault localization and diagnosis, all eventually leading to better software quality. We focus on this latter claim, and use a large dataset of asserts in C and C++ programs to explore the connection between asserts and defect occurrence. Our data suggests a connection: functions with asserts do have significantly fewer defects. This indicates that asserts do play an important role in software quality; we therefore explored further the factors that play a role in assertion placement: specifically, process factors (such as developer experience and ownership) and product factors, particularly interprocedural factors, exploring how the placement of assertions in functions are influenced by local and global network properties of the callgraph. Finally, we also conduct a differential analysis of assertion use across different application domains.
Keywords :
formal verification; software quality; C program; C++ program; GitHub projects; application domain; assert use; assertion placement; asserts occurrence; automated verification; callgraph global network property; callgraph local network property; defect occurrence; differential analysis; interprocedural factors; process factors; product factors; software quality; Collaboration; Computer bugs; Gain measurement; History; Java; Runtime; Software; Assertions; Defects; GitHub;
Conference_Titel :
Software Engineering (ICSE), 2015 IEEE/ACM 37th IEEE International Conference on
Conference_Location :
Florence
DOI :
10.1109/ICSE.2015.88