skip to main content
10.1145/2938503.2938553acmotherconferencesArticle/Chapter ViewAbstractPublication PagesideasConference Proceedingsconference-collections
research-article

Software Analytics in Practice: A Defect Prediction Model Using Code Smells

Published: 11 July 2016 Publication History

Abstract

In software engineering, maintainability is related to investigating the defects and their causes, correcting the defects and modifying the system to meet customer requirements. Maintenance is a time consuming activity within the software life cycle. Therefore, there is a need for efficiently organizing the software resources in terms of time, cost and personnel for maintenance activity. One way of efficiently managing maintenance resources is to predict defects that may occur after the deployment. Many researchers so far have built defect prediction models using different sets of metrics such as churn and static code metrics. However, hidden causes of defects such as code smells have not been investigated thoroughly. In this study we propose using data science and analytics techniques on software data to build defect prediction models. In order to build the prediction model we used code smells metrics, churn metrics and combination of churn and code smells metrics. The results of our experiments on two different software companies show that code smells is a good indicator of defect proneness of the software product. Therefore, we recommend that code smells metrics should be used to train a defect prediction model to guide the software maintenance team.

References

[1]
M. Abbes, F. Khomh, Y.-G. Gueheneuc, and G. Antoniol. An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In Software Maintenance and Reengineering (CSMR), 2011 15th European Conference on, pages 181--190. IEEE, 2011.
[2]
M. Boussaa, W. Kessentini, M. Kessentini, S. Bechikh, and S. B. Chikha. Competitive coevolutionary code-smells detection. In Search Based Software Engineering, pages 50--65. Springer, 2013.
[3]
B. Çağlayan, A. Bener, and S. Koch. Merits of using repository metrics in defect prediction for open source projects. In Emerging Trends in Free/Libre/Open Source Software Research and Development, 2009. FLOSS'09. ICSE Workshop on, pages 31--36. IEEE, 2009.
[4]
M. D'Ambros, A. Bacchelli, and M. Lanza. On the impact of design flaws on software defects. In Quality Software (QSIC), 2010 10th International Conference on, pages 23--31. IEEE, 2010.
[5]
T. Fawcett. An introduction to roc analysis. Pattern recognition letters, 27(8):861--874, 2006.
[6]
N. E. Fenton and M. Neil. A critique of software defect prediction models. Software Engineering, IEEE Transactions on, 25(5):675--689, 1999.
[7]
M. Fowler. Refactoring: improving the design of existing code. Pearson Education India, 1999.
[8]
T. L. Graves, A. F. Karr, J. S. Marron, and H. Siy. Predicting fault incidence using software change history. Software Engineering, IEEE Transactions on, 26(7):653--661, 2000.
[9]
T. Hall, S. Beecham, D. Bowes, D. Gray, and S. Counsell. A systematic literature review on fault prediction performance in software engineering. Software Engineering, IEEE Transactions on, 38(6):1276--1304, 2012.
[10]
F. Khomh, M. Di Penta, Y.-G. Guéhéneuc, and G. Antoniol. An exploratory study of the impact of antipatterns on class change-and fault-proneness. Empirical Software Engineering, 17(3):243--275, 2012.
[11]
F. Khomh, M. D. Penta, and Y.-G. Gueheneuc. An exploratory study of the impact of code smells on software change-proneness. In Reverse Engineering, 2009. WCRE'09. 16th Working Conference on, pages 75--84. IEEE, 2009.
[12]
G. Langelier, H. Sahraoui, and P. Poulin. Visualization-based analysis of quality for large-scale software systems. In Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, pages 214--223. ACM, 2005.
[13]
S. Lessmann, B. Baesens, C. Mues, and S. Pietsch. Benchmarking classification models for software defect prediction: A proposed framework and novel findings. Software Engineering, IEEE Transactions on, 34(4):485--496, 2008.
[14]
M. Mäntylä. Bad smells in software-a taxonomy and an empirical study. Helsinki University of Technology, 2003.
[15]
M. Mäntylä, J. Vanhanen, and C. Lassenius. A taxonomy and an initial empirical study of bad smells in code. In Software Maintenance, 2003. ICSM 2003. Proceedings. International Conference on, pages 381--384. IEEE, 2003.
[16]
R. Marinescu. Detection strategies: Metrics-based rules for detecting design aws. In Software Maintenance, 2004. Proceedings. 20th IEEE International Conference on, pages 350--359. IEEE, 2004.
[17]
T. Menzies, J. Greenwald, and A. Frank. Data mining static code attributes to learn defect predictors. Software Engineering, IEEE Transactions on, 33(1):2--13, 2007.
[18]
T. Menzies and T. Zimmermann. Software analytics: so what? Software, IEEE, 30(4):31--37, 2013.
[19]
N. Moha, Y.-G. Gueheneuc, L. Duchien, and A.-F. Le Meur. Decor: A method for the specification and detection of code and design smells. Software Engineering, IEEE Transactions on, 36(1):20--36, 2010.
[20]
N. Nagappan and T. Ball. Use of relative code churn measures to predict system defect density. In Software Engineering, 2005. ICSE 2005. Proceedings. 27th International Conference on, pages 284--292. IEEE, 2005.
[21]
N. Nagappan and T. Ball. Using software dependencies and churn metrics to predict field failures: An empirical case study. In Empirical Software Engineering and Measurement, 2007. ESEM 2007. First International Symposium on, pages 364--373. IEEE, 2007.
[22]
D. M. Powers. Evaluation: from precision, recall and f-measure to roc, informedness, markedness and correlation. 2011.
[23]
H. D. Rombach. A controlled expeniment on the impact of software structure on maintainability. Software Engineering, IEEE Transactions on, (3):344--354, 1987.
[24]
D. Sjoberg, A. Yamashita, B. C. D. Anda, A. Mockus, T. Dyba, et al. Quantifying the effect of code smells on maintenance effort. Software Engineering, IEEE Transactions on, 39(8):1144--1156, 2013.
[25]
S. Slinger. Code smell detection in eclipse. Delft University of Technology, 2005.
[26]
G. Travassos, F. Shull, M. Fredericks, and V. R. Basili. Detecting defects in object-oriented designs: using reading techniques to increase software quality. In ACM Sigplan Notices, volume 34, pages 47--56. ACM, 1999.
[27]
M. Tufano, F. Palomba, G. Bavota, R. Oliveto, M. Di Penta, A. De Lucia, and D. Poshyvanyk. When and why your code starts to smell bad. 2015.
[28]
E. Van Emden and L. Moonen. Java quality assurance by detecting code smells. In Reverse Engineering, 2002. Proceedings. Ninth Working Conference on, pages 97--106. IEEE, 2002.
[29]
W. C. Wake. Refactoring workbook. Addison-Wesley Professional, 2004.
[30]
A. Yamashita and L. Moonen. Do code smells reect important maintainability aspects? In Software Maintenance (ICSM), 2012 28th IEEE International Conference on, pages 306--315. IEEE, 2012.
[31]
A. Yamashita and L. Moonen. Exploring the impact of inter-smell relations on software maintainability: An empirical study. In Proceedings of the 2013 International Conference on Software Engineering, pages 682--691. IEEE Press, 2013.
[32]
D. Zhang and T. Xie. Software analytics in practice: Mini tutorial. In Software Engineering (ICSE), 2012 34th International Conference on, pages 997--997. IEEE, 2012.
[33]
H. Zhang, Y.-F. Li, and H. B. K. Tan. Measuring design complexity of semantic web ontologies. Journal of Systems and Software, 83(5):803--814, 2010.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
IDEAS '16: Proceedings of the 20th International Database Engineering & Applications Symposium
July 2016
420 pages
ISBN:9781450341189
DOI:10.1145/2938503
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

  • Keio University: Keio University

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 July 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code Smells
  2. Defect Prediction Model
  3. Mining software repositories

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

IDEAS '16

Acceptance Rates

Overall Acceptance Rate 74 of 210 submissions, 35%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media