Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigation

Published: 01 June 2018 Publication History

Abstract

Code smells are symptoms of poor design and implementation choices that may hinder code comprehensibility and maintainability. Despite the effort devoted by the research community in studying code smells, the extent to which code smells in software systems affect software maintainability remains still unclear. In this paper we present a large scale empirical investigation on the diffuseness of code smells and their impact on code change- and fault-proneness. The study was conducted across a total of 395 releases of 30 open source projects and considering 17,350 manually validated instances of 13 different code smell kinds. The results show that smells characterized by long and/or complex code (e.g., Complex Class) are highly diffused, and that smelly classes have a higher change- and fault-proneness than smell-free classes.

References

[1]
Abbes M, Khomh F, Gueheneuc YG, Antoniol G (2011) An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In: Proceedings of the 2011 15th European conference on software maintenance and reengineering, IEEE Computer Society, CSMR ’11, pp 181–190
[2]
Antoniol G, Ayari K, Di Penta M, Khomh F, Guéhéneuc Y G (2008) Is it a bug or an enhancement?: a text-based approach to classify change requests. In: Proceedings of the 2008 conference of the centre for advanced studies on collaborative research (CASCON 2008). Richmond Hill
[3]
Arcoverde R, Garcia A, Figueiredo E (2011) Understanding the longevity of code smells: preliminary results of an explanatory survey. In: Proceedings of the international workshop on refactoring tools. ACM, pp 33–36
[4]
Bavota G, Qusef A, Oliveto R, De Lucia A, Binkley D (2012) An empirical analysis of the distribution of unit test smells and their impact on software maintenance. In: 28th IEEE international conference on software maintenance, ICSM 2012. Trento, pp 56–65
[5]
Bavota G, De Lucia A, Di Penta M, Oliveto R, Palomba F (2015) An experimental investigation on the innate relationship between quality and refactoring. J Syst Softw 107:1–14
[6]
Chatzigeorgiou A, Manakos A (2010) Investigating the evolution of bad smells in object-oriented code. In: Proceedings of the 2010 Seventh international conference on the quality of information and communications technology, IEEE Computer Society, QUATIC ’10, pp 106–115
[7]
Cohen J (1988) Statistical power analysis for the behavioral sciences, 2nd edn. Lawrence Earlbaum Associates
[8]
Conover WJ (1998) Practical nonparametric statistics, 3rd edn. Wiley
[9]
Cunningham W (1993) The WyCash portfolio management system. OOPS Messenger 4(2):29–30. 10.1145/157710.157715
[10]
D’Ambros M, Bacchelli A, Lanza M (2010) On the impact of design flaws on software defects. In: Proceedings of the 10th international conference on quality software, QSIC 2010. Zhangjiajie, pp 23-31
[11]
Deligiannis I, Stamelos I, Angelis L, Roumeliotis M, Shepperd M (2004) A controlled experiment investigation of an object-oriented design heuristic for maintainability. J Syst Softw 72(2):129–143
[12]
Fernandes E, Oliveira J, Vale G, Paiva T, Figueiredo E (2016) A review-based comparative study of bad smell detection tools. In: Proceedings of the 20th international conference on evaluation and assessment in software engineering EASE ’16. ACM, New York, pp 18:1–18:12
[13]
Fowler M (1999) Refactoring: improving the design of existing code. Addison-Wesley
[14]
Gatrell M, Counsell S (2015) The effect of refactoring on change and fault-proneness in commercial c# software. Sci Comput Program 102(0):44–56
[15]
Gîrba T, Ducasse S, Kuhn A, Marinescu R, Daniel R (2007) Using concept analysis to detect co-change patterns. In: Ninth international workshop on principles of software evolution: in conjunction with the 6th ESEC/FSE joint meeting. ACM, IWPSE ’07, pp 83–89
[16]
Grissom RJ, Kim JJ (2005) Effect sizes for research: a broad practical approach, 2nd edn. Lawrence Earlbaum Associates
[17]
Holm S (1979) A simple sequentially rejective Bonferroni test procedure. Scand J Stat 6:65–70
[18]
Hosmer DW Jr, Lemeshow S (2004) Applied logistic regression. Wiley
[19]
Kessentini M, Vaucher S, Sahraoui H (2010) Deviance from perfection is a better criterion than closeness to evil when identifying risky code. In: Proceedings of the IEEE/ACM international conference on automated software engineering. ACM, ASE ’10, pp 113–122
[20]
Khomh F, Di Penta M, Guéhéneuc Y G (2009a) An exploratory study of the impact of code smells on software change-proneness. In:16th working conference on reverse engineering, WCRE 2009 Lille,IEEE Computer Society pp 75-84
[21]
Khomh F, Vaucher S, Guéhéneuc Y G, Sahraoui H (2009b) A bayesian approach for the detection of code and design smells. In: Proceedings of the 9th international conference on quality software IEEE CS Press Hong Kong, pp 305-314
[22]
Khomh F, Di Penta M, Guéhéneuc Y G, Antoniol G (2012) An exploratory study of the impact of antipatterns on class change- and fault-proneness. Empir Softw Eng 17(3):243–275
[23]
Kruchten P, Nord RL, Ozkaya I (2012) Technical debt: from metaphor to theory and practice. IEEE Softw 29(6):18–21. 10.1109/MS.2012.167
[24]
Lanza M, Marinescu R (2010) Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer
[25]
Li W, Shatnawi R (2007) An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution. J Syst Softw 1120–1128
[26]
Lopez M, Habra N (2015) Relevance of the cyclomatic complexity threshold for the java programming language. Softw Measur Eur Forum
[27]
Lozano A, Wermelinger M, Nuseibeh B (2007) Assessing the impact of bad smells using historical information. In: Ninth international workshop on principles of software evolution: in conjunction with the 6th ESEC/FSE joint meeting IWPSE ’07. ACM, New York, pp 31–34
[28]
Marinescu R (2004) Detection strategies: metrics-based rules for detecting design flaws. In: 20th international conference on software maintenance ICSM 2004, Chicago, IEEE Computer Society, pp 350–359
[29]
Moha N, Guéhéneuc Y G, Duchien L, Meur AFL (2010) Decor: a method for the specification and detection of code and design smells. IEEE Trans Softw Eng 36 (1):20–36
[30]
Moonen L (2001) Generating robust parsers using island grammars. In: Proceedings of the eighth working conference on reverse engineering, WCRE’01. Stuttgart, p 13
[31]
Munro MJ (2005) Product metrics for automatic identification of “bad smell” design problems in java source-code. In: Proceedings of the 11th International software metrics symposium. IEEE Computer Society Press
[32]
Olbrich S, Cruzes DS, Basili V, Zazworka N (2009) The evolution and impact of code smells: a case study of two open source systems. In: Proceedings of the 2009 3rd international symposium on empirical software engineering and measurement, ESEM ’09, pp 390–400
[33]
Olbrich SM, Cruzes D, Sjøberg DIK (2010) Are all code smells harmful? a study of god classes and brain classes in the evolution of three open source systems. In: 26th IEEE international conference on software maintenance (ICSM 2010). Timisoara, pp 1–10
[34]
Oliveto R, Khomh F, Antoniol G, Guéhéneuc YG (2010) Numerical signatures of antipatterns: An approach based on b-splines. In: Capilla R, Ferenc R, Dueas JC (eds) Proceedings of the 14th conference on software maintenance and reengineering. IEEE Computer Society Press, Los Alamitos
[35]
Ostrand TJ, Weyuker EJ, Bell RM (2005) Predicting the location and number of faults in large software systems. IEEE Trans Software Eng 31(4):340–355
[36]
Palomba F, Bavota G, Di Penta M, Oliveto R, De Lucia A (2014) Do they really smell bad? a study on developers’ perception of bad code smells. In: Proceedings of the 30th IEEE international conference on software maintenance and evolution (ICSME’14). Victoria, pp 101–110
[37]
Palomba F, Bavota G, Di Penta M, Oliveto R, Poshyvanyk D, De Lucia A (2015a) Mining version histories for detecting code smells. IEEE Trans Softw Eng 41(5):462–489. 10.1109/TSE.2014.2372760
[38]
Palomba F, De Lucia A, Bavota G, Oliveto R (2015b) Anti-pattern detection: methods, challenges, and open issues. Adv Comput 95:201–238. 10.1016/B978-0-12-800160-8.00004-8
[39]
Palomba F, Di Nucci D, Panichella A, Oliveto R, De Lucia A (2016a) On the diffusion of test smells in automatically generated test code: an empirical study. In: Proceedings of the 9th international workshop on search-based software testing, SBST 2016
[40]
Palomba F, Panichella A, Lucia AD, Oliveto R, Zaidman A (2016b) A textual-based technique for smell detection. In: 2016 IEEE 24th international conference on program comprehension (ICPC), pp 1–10. 10.1109/ICPC.2016.7503704
[41]
Palomba F, Bavota G, Oliveto R, Fasano F, Di Penta M, De Lucia A (2017) Bad code smells study - online appendix. https://dibt.unimol.it/fpalomba/reports/badSmell-analysis/index.html
[42]
Peters R, Zaidman A (2012) Evaluating the lifespan of code smells using software repository mining. In: 16th European conference on software maintenance and reengineering, CSMR 2012. Szeged, pp 411–416
[43]
Ratiu D, Ducasse S, Gîrba T, Marinescu R (2004) Using history information to improve design flaws detection. In: 8th european conference on software maintenance and reengineering (CSMR 2004) ProceedingTampere IEEE Computer Society pp 223-232
[44]
Saboury A, Musavi P, Khomh F, Antoniol G (2017) An empirical study of code smells in javascript projects. In: 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER), pp 294–305. 10.1109/SANER.2017.7884630
[45]
Sahin D, Kessentini M, Bechikh S, Deb K (2014) Code-smell detection as a bilevel problem. ACM Trans Softw Eng Methodol 24(1):6:1–6:44. 10.1145/2675067
[46]
Sjoberg D, Yamashita A, Anda B, Mockus A, Dyba T (2013) Quantifying the effect of code smells on maintenance effort. IEEE Trans Softw Eng 39(8):1144–1156. 10.1109/TSE.2012.89
[47]
Sliwerski J, Zimmermann T, Zeller A (2005) When do changes induce fixes? In: Proceedings of the 2005 international workshop on mining software repositories, MSR. ACM
[48]
Student (1921) An experimental determination of the probable error of dr spearman’s correlation coefficients. Biometrika 13(2/3):263–282. http://www.jstor.org/stable/2331754
[49]
Tsantalis N, Chatzigeorgiou A (2009) Identification of move method refactoring opportunities. IEEE Trans Softw Eng 35(3):347–367
[50]
Tufano M, Palomba F, Bavota G, Oliveto R, Di Penta M, De Lucia A, Poshyvanyk D (2015) When and why your code starts to smell bad. In: 37th IEEE/ACM international conference on software engineering, ICSE 2015, vol 1. Florence, pp 403–414
[51]
Tufano M, Palomba F, Bavota G, Di Penta M, Oliveto R, De Lucia A, Poshyvanyk D (2016) An empirical investigation into the nature of test smells. In: Proceedings of the 31st IEEE/ACM international conference on automated software engineering ASEACM New York vol 2016 pp 4–15
[52]
Tufano M, Palomba F, Bavota G, Oliveto R, Penta MD, Lucia AD, Poshyvanyk D (2017) When and why your code starts to smell bad (and whether the smells go away). IEEE Trans Softw Eng PP(99):1–1. 10.1109/TSE.2017.2653105
[53]
Vaucher S, Khomh F, Moha N, Gueheneuc YG (2009) Tracking design smells: Lessons from a study of god classes. In: Proceedings of the 2009 16th working conference on reverse engineering (WCRE’09), pp 145–158
[54]
Yamashita AF, Moonen L (2012) Do code smells reflect important maintainability aspects? In: 28th IEEE international conference on software maintenance, ICSM 2012. Trento, pp 306–315
[55]
Yamashita AF, Moonen L (2013) Exploring the impact of inter-smell relations on software maintainability: an empirical study. In: 35th International conference on software engineering, ICSE ’13. San Francisco, pp 682–691

Cited By

View all
  • (2025)The downside of functional constructs: a quantitative and qualitative analysis of their fix-inducing effectsEmpirical Software Engineering10.1007/s10664-024-10568-z30:1Online publication date: 1-Feb-2025
  • (2024)Copilot-in-the-Loop: Fixing Code Smells in Copilot-Generated Python Code using CopilotProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695290(2230-2234)Online publication date: 27-Oct-2024
  • (2024)One-to-One or One-to-Many? Suggesting Extract Class Refactoring Opportunities with Intra-class Dependency Hypergraph Neural NetworkProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680379(1529-1540)Online publication date: 11-Sep-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Empirical Software Engineering
Empirical Software Engineering  Volume 23, Issue 3
Jun 2018
717 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 June 2018

Author Tags

  1. Code smells
  2. Empirical studies
  3. Mining software repositories

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 23 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2025)The downside of functional constructs: a quantitative and qualitative analysis of their fix-inducing effectsEmpirical Software Engineering10.1007/s10664-024-10568-z30:1Online publication date: 1-Feb-2025
  • (2024)Copilot-in-the-Loop: Fixing Code Smells in Copilot-Generated Python Code using CopilotProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695290(2230-2234)Online publication date: 27-Oct-2024
  • (2024)One-to-One or One-to-Many? Suggesting Extract Class Refactoring Opportunities with Intra-class Dependency Hypergraph Neural NetworkProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680379(1529-1540)Online publication date: 11-Sep-2024
  • (2024)How have iOS Development Technologies Changed over Time? A Study in Open-SourceProceedings of the IEEE/ACM 11th International Conference on Mobile Software Engineering and Systems10.1145/3647632.3647988(33-42)Online publication date: 14-Apr-2024
  • (2024)Comparing Multivariate Time Series Analysis and Machine Learning Performance for Technical Debt Prediction: The SQALE Index CaseProceedings of the 7th ACM/IEEE International Conference on Technical Debt10.1145/3644384.3644472(45-46)Online publication date: 14-Apr-2024
  • (2024)Automating Source Code Refactoring in the ClassroomProceedings of the 55th ACM Technical Symposium on Computer Science Education V. 110.1145/3626252.3630787(60-66)Online publication date: 7-Mar-2024
  • (2024)Behind the Intent of Extract Method Refactoring: A Systematic Literature ReviewIEEE Transactions on Software Engineering10.1109/TSE.2023.334580050:4(668-694)Online publication date: 4-Jan-2024
  • (2024)Prescriptive procedure for manual code smell annotationScience of Computer Programming10.1016/j.scico.2024.103168238:COnline publication date: 1-Dec-2024
  • (2024)An empirical study on bug severity estimation using source code metrics and static analysisJournal of Systems and Software10.1016/j.jss.2024.112179217:COnline publication date: 1-Nov-2024
  • (2024)On the effectiveness of developer features in code smell prioritizationJournal of Systems and Software10.1016/j.jss.2024.111968210:COnline publication date: 1-Apr-2024
  • Show More Cited By

View Options

View options

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media