Title :
An investigation of the relationships between lines of code and defects
Author_Institution :
Sch. of Software, Tsinghua Univ., Beijing, China
Abstract :
It is always desirable to understand the quality of a software system based on static code metrics. In this paper, we analyze the relationships between lines of code (LOC) and defects (including both pre-release and post-release defects). We confirm the ranking ability of LOC discovered by Fenton and Ohlsson. Furthermore, we find that the ranking ability of LOC can be formally described using Weibull functions. We can use defect density values calculated from a small percentage of largest modules to predict the number of total defects accurately. We also find that, given LOC we can predict the number of defective components reasonably well using typical classification techniques. We perform an extensive experiment using the public Eclipse dataset, and replicate the study using the NASA dataset. Our results confirm that simple static code attributes such as LOC can be useful predictors of software quality.
Keywords :
program diagnostics; software metrics; software quality; Eclipse dataset; lines of code; post-release defects; pre-release defects; software system quality; static code metrics; Density measurement; Lab-on-a-chip; Laboratories; NASA; Packaging machines; Predictive models; Software metrics; Software quality; Software systems; System testing;
Conference_Titel :
Software Maintenance, 2009. ICSM 2009. IEEE International Conference on
Conference_Location :
Edmonton, AB
Print_ISBN :
978-1-4244-4897-5
Electronic_ISBN :
1063-6773
DOI :
10.1109/ICSM.2009.5306304