DocumentCode :
3787242
Title :
Defect frequency and design patterns: an empirical study of industrial code
Author :
M. Vokac
Author_Institution :
Simula Res. Lab., Lysaker, Norway
Volume :
30
Issue :
12
fYear :
2004
Firstpage :
904
Lastpage :
917
Abstract :
Software "design patterns" seek to package proven solutions to design problems in a form that makes it possible to find, adapt, and reuse them. A common claim is that a design based on properly applied patterns will have fewer defects than more ad hoc solutions. This case study analyzes the weekly evolution and maintenance of a large commercial product (C++, 500,000 LOC) over three years, comparing defect rates for classes that participated in selected design patterns to the code at large. We found that there are significant differences in defect rates among the patterns, ranging from 63 percent to 154 percent of the average rate. We developed a new set of tools able to extract design pattern information at a rate of 3/spl times/10/sup 6/ lines of code per hour, with relatively high precision. Based on a qualitative analysis of the code and the nature of the patterns, we conclude that the Observer and Singleton patterns are correlated with larger code structures and, so, can serve as indicators of code that requires special attention. Conversely, code designed with the Factory pattern is more compact and possibly less closely coupled and, consequently, has lower defect numbers. The Template Method pattern was used in both simple and complex situations, leading to no clear tendency.
Keywords :
"Frequency","Pattern analysis","Production facilities","Testing","Packaging","Lab-on-a-chip","Data mining","Computer architecture","User interfaces","Computer industry"
Journal_Title :
IEEE Transactions on Software Engineering
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/TSE.2004.99
Filename :
1377188
Link To Document :
بازگشت