ABSTRACT
Previous studies demonstrated how code smells (i.e., symptoms of the presence of system degradation) impact the software maintainability. However, few studies have investigated which code smell types tend to co-occur in the source code. Moreover, it is not clear to what extent the removal of code smell co-occurrences -through refactoring operations - has a positive impact on quality attributes such as cohesion, coupling, inheritance, complexity, and size. We aim at addressing these gaps through an empirical study. By investigating the impact of the smells co-occurrences in 11 releases of 3 closed-source systems, we observe (i) which code smells tend to co-occur together, (ii) the impact of the removal of code smell co-occurrences on quality internal attributes before and after refactoring, and (iii) which are the most difficult co-occurrences to refactoring from the developers' perspective. Our results show that 2 types of code smell co-occurrences generally tend to co-occur. Moreover, we observed that the removal of code smells co-occurrences lead to a significant reduction in the complexity of the systems studied was obtained. Conversely, cohesion and coupling tend to get worse. We also found that two code smells cooccurrences (God Class-Long Method and Disperse Coupling-Long Method) as the most difficult to refactor indicating that attention is needed not to insert these anomalies in the source code. Based on our findings, we argue that further research is needed on the impact of code smells co-occurrences on internal quality attributes.
- Marwen Abbes, Foutse Khomh, Yann-Gael Gueheneuc, and Giuliano Antoniol. 2011. An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In 15th CSMR. IEEE, 181--190.Google Scholar
- Jehad Al Dallal. 2013. Object-oriented class maintainability prediction using internal quality attributes. Inf. Softw. Technol. 55, 11 (2013), 2028--2048.Google ScholarDigital Library
- Rafa E Al-Qutaish. 2010. Quality models in software engineering literature: an analytical and comparative study. Journal of American Science 6, 3 (2010), 166--175.Google Scholar
- Mamdouh Alenezi and Khaled Almustafa. 2015. Empirical analysis of the complexity evolution in open-source software systems. International Journal of Hybrid Information Technology 8, 2 (2015), 257--266.Google ScholarCross Ref
- Ajay Bandi, Byron J Williams, and Edward B Allen. 2013. Empirical evidence of code decay: A systematic mapping study. In 2013 20th Working Conference on Reverse Engineering (WCRE). IEEE, 341--350.Google ScholarCross Ref
- James M Bieman and Byung-Kyoo Kang. 1995. Cohesion and reuse in an object-oriented system. ACM SIGSOFT Software Engineering Notes 20, SI (1995), 259--262.Google Scholar
- Alexander Chávez, Isabella Ferreira, Eduardo Fernandes, Diego Cedrim, and Alessandro Garcia. 2017. How does refactoring affect internal quality attributes?: A multi-project study. In 31st SBES. ACM, 74--83.Google Scholar
- Shyam R Chidamber and Chris F Kemerer. 1994. A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20, 6 (1994), 476--493.Google ScholarDigital Library
- Istehad Chowdhury and Mohammad Zulkernine. 2010. Can complexity, coupling, and cohesion metrics be used as early indicators of vulnerabilities?. In Proceedings of the 2010 ACM Symposium on Applied Computing. ACM, 1963--1969.Google ScholarDigital Library
- David P Darcy, Chris F Kemerer, Sandra A Slaughter, and James E Tomayko. 2005. The structural complexity of software an experimental test. IEEE Trans. Softw. Eng. 31, 11 (2005), 982--995.Google ScholarDigital Library
- Rafael de Mello, Anderson Uchôa, Roberto Oliveira, Willian Oizumi, Jairo Souza, Kleyson Mendes, Daniel Oliveira, Baldoino Fonseca, and Alessandro Garcia. 2019. Do Research and Practice of Code Smell Identification Walk Together? A Social Representations Analysis. In 13th ESEM. 1--6.Google Scholar
- Elder Vicente de Paulo Sobrinho, Andrea De Lucia, and Marcelo de Almeida Maia. 2018. A systematic literature review on bad smells---5 W's: which, when, what, who, where. IEEE Trans. Softw. Eng. (2018).Google Scholar
- Giuseppe Destefanis, Steve Counsell, Giulio Concas, and Roberto Tonelli. 2014. Software metrics in agile software: An empirical study. In International Conference on Agile Software Development. Springer, 157--170.Google ScholarCross Ref
- Robert Dyer, Hridesh Rajan, and Yuanfang Cai. 2012. An exploratory study of the design impact of language features for aspect-oriented interfaces. In 11th AOSD. ACM, 143--154.Google Scholar
- Eduardo Fernandes, Alexander Chávez, Alessandro Garcia, Isabella Ferreira, Diego Cedrim, Leonardo Sousa, and Willian Oizumi. 2020. Refactoring Effect on Internal Quality Attributes: What Haven't They Told You Yet? Inf. Softw. Technol. (2020), 106347.Google Scholar
- Eduardo Fernandes, Johnatan Oliveira, Gustavo Vale, Thanis Paiva, and Eduardo Figueiredo. 2016. A review-based comparative study of bad smell detection tools. In 20th EASE. ACM, 18.Google Scholar
- Eduardo Fernandes, Gustavo Vale, Leonardo Sousa, Eduardo Figueiredo, Alessandro Garcia, and Jaejoon Lee. 2017. No Code Anomaly is an Island. In 16th ICSR. Springer, 48--64.Google Scholar
- Francesca Arcelli Fontana, Vincenzo Ferme, and Marco Zanoni. 2015. Towards assessing software architecture quality by exploiting code smell relations. In 2015 IEEE/ACM 2nd International Workshop on Software Architecture and Metrics. IEEE, 1--7.Google ScholarDigital Library
- Francesca Arcelli Fontana, Valentina Lenarduzzi, Riccardo Roveda, and Davide Taibi.2019. Are architectural smells independent from code smells? An empirical study. J. Syst. Softw. 154 (2019), 139--156.Google ScholarDigital Library
- Martin Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.Google ScholarDigital Library
- ISO. 2011. IEC 25010: 2011 systems and software engineering-systems and software quality requirements and evaluation (square)-system and software quality models. International Organization for Standardization 34 (2011), 2910.Google Scholar
- Fehmi Jaafar, Angela Lozano, Yann-Gaël Guéhéneuc, and Kim Mens. 2017. On the analysis of co-occurrence of anti-patterns and clones. In 2017 IEEE International Conference on Software Quality, Reliability and Security (QRS). IEEE, 274--284.Google ScholarCross Ref
- Amandeep Kaur. 2019. A Systematic Literature Review on Empirical Analysis of the Relationship Between Code Smells and Software Quality Attributes. Archives of Computational Methods in Engineering (2019), 1--30.Google Scholar
- Sharanpreet Kaur and Satwinder Singh. 2016. Spotting & eliminating type checking code smells using eclipse plug-in: Jdeodorant. International Journal of Computer Science and Communication Engineering 5, 1 (2016).Google Scholar
- V Krishnapriya and K Ramar. 2010. Exploring the difference between object oriented class inheritance and interfaces using coupling measures. In 2010 International Conference on Advances in Computer Engineering. IEEE, 207--211.Google ScholarDigital Library
- Guilherme Lacerda, Fabio Petrillo, Marcelo Pimenta, and Yann Gaël Guéhéneuc. 2020. Code smells and refactoring: a tertiary systematic review of challenges and observations. J. Syst. Softw. (2020), 110610.Google Scholar
- Michele Lanza and Radu Marinescu. 2007. Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer Science & Business Media.Google ScholarDigital Library
- Mark Lorenz and Jeff Kidd. 1994. Object-oriented software metrics: a practical guide. Prentice-Hall, Inc.Google ScholarDigital Library
- Angela Lozano, Kim Mens, and Jawira Portugal. 2015. Analyzing code evolution to uncover relations. In 2nd PPAP. IEEE, 1--4.Google Scholar
- Isela Macia, Joshua Garcia, Daniel Popescu, Alessandro Garcia, Nenad Medvidovic, and Arndt von Staa. 2012. Are automatically-detected code anomalies relevant to architectural modularity?. In 11th AOSD. 167--178.Google Scholar
- Ruchika Malhotra and Anuradha Chug. 2016. An empirical study to assess the effects of refactoring on software maintainability. In International Conference on Advances in Computing, Communications and Informatics (ICACCI). IEEE, 110--117.Google ScholarCross Ref
- Júlio Martins, Carla Ilane Moreira Bezerra, and Anderson Uchôa. 2019. Analyzing the Impact of Inter-smell Relations on Software Maintainability: An Empirical Study with Software Product Lines. In Proceedings of the XV Brazilian Symposium on Information Systems. 1--8.Google ScholarDigital Library
- Thomas J McCabe. 1976. A complexity measure. IEEE Trans. Softw. Eng. 4 (1976), 308--320.Google ScholarDigital Library
- Sandro Morasca. 2009. A probability-based approach for measuring external attributes of software artifacts. In 3rd ESEM. IEEE Computer Society, 44--55.Google Scholar
- Iulian Neamtiu, Guowu Xie, and Jianbo Chen. 2013. Towards a better understanding of software evolution: an empirical study on open-source software. J. Softw.: Evol. Process 25, 3 (2013), 193--218.Google ScholarDigital Library
- Willian Oizumi, Alessandro Garcia, Leonardo da Silva Sousa, Bruno Cafeo, and Yixue Zhao. 2016. Code anomalies flock together: Exploring code anomaly agglomerations for locating design problems. In 38th ICSE. IEEE, 440--451.Google Scholar
- Willian Nalepa Oizumi, Alessandro Fabricio Garcia, Thelma Elita Colanzi, Manuele Ferreira, and Arndt von Staa. 2014. When code-anomaly agglomerations represent architectural problems? An exploratory study. In 28th SBES. IEEE, 91--100.Google Scholar
- Matheus Paixão, Anderson Uchôa, Ana Carla Bibiano, Daniel Oliveira, Alessandro Garcia, Jens Krinke, and Emilio Arvonio. 2020. Behind the Intents: An In-depth Empirical Study on Software Refactoring in Modern Code Review. In 17th MSR.Google Scholar
- Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Fausto Fasano, Rocco Oliveto, and Andrea De Lucia. 2018. A large-scale empirical study on the life cycle of code smell co-occurrences. Inf. Softw. Technol. 99 (2018), 1--10.Google ScholarDigital Library
- Fabio Palomba, Rocco Oliveto, and Andrea De Lucia. 2017. Investigating code smell co-occurrences using association rule learning: A replicated study. In 2017 IEEE Workshop on Machine Learning Techniques for Software Quality Evaluation (MaLTeSQuE). IEEE, 8--13.Google ScholarCross Ref
- Błażej Pietrzak and Bartosz Walter. 2006. Leveraging code smell detection with inter-smell relations. Extreme Programming and Agile Processes in Software Engineering (2006), 75--84.Google Scholar
- Benjamin Reilly. 2002. Social choice in the south seas: Electoral innovation and the borda count in the pacific island countries. International Political Science Review 23, 4 (2002), 355--372.Google ScholarCross Ref
- José Amancio M Santos, João B Rocha-Junior, Luciana Carla Lins Prates, Rogeres Santos do Nascimento, Mydiã Falcão Freitas, and Manoel Gomes de Mendonça. 2018. A systematic review on the code smell effect. J. Syst. Softw. 144 (2018), 450--477.Google ScholarDigital Library
- Dag IK Sjøberg, Aiko Yamashita, Bente CD Anda, Audris Mockus, and Tore Dybå. 2012. Quantifying the effect of code smells on maintenance effort. IEEE Trans. Softw. Eng. 39, 8 (2012), 1144--1156.Google ScholarDigital Library
- Ramanath Subramanyam and Mayuram S. Krishnan. 2003. Empirical analysis of ck metrics for object-oriented design complexity: Implications for software defects. IEEE Trans. Softw. Eng. 29, 4 (2003), 297--310.Google ScholarDigital Library
- Sandhya Tarwani and Anuradha Chug. 2016. Sequencing of refactoring techniques by Greedy algorithm for maximizing maintainability. In Proceedings of the International Conference on Advances in Computing, Communications and Informatics (ICACCI). IEEE, 1397--1403.Google ScholarCross Ref
- Nikolaos Tsantalis, Theodoros Chaikalis, and Alexander Chatzigeorgiou. 2018. Ten years of JDeodorant: Lessons learned from the hunt for smells. In 25th SANER. IEEE, 4--14.Google Scholar
- Anderson Uchôa, Eduardo Fernandes, Ana Carla Bibiano, and Alessandro Garcia. 2017. Do Coupling Metrics Help Characterize Critical Components in Component-based SPL? An Empirical Study. In Proceedings of the 5th Workshop on Software Visualization, Evolution and Maintenance (VEM). 36--43.Google Scholar
- Anderson Uchôa, Caio Barbosa, Willian Oizumi, Publio Blenílio, Rafael Lima, Alessandro Garcia, and Carla Bezerra. 2020. How Does Modern Code Review Impact Software Design Degradation? An In-depth Empirical Study. In 36th ICSME. 1--12.Google Scholar
- Santiago Vidal, Hernan Vazquez, J Andres Diaz-Pace, Claudia Marcos, Alessandro Garcia, and Willian Oizumi. 2015. JSpIRIT: a flexible tool for the analysis of code smells. In 34th SCCC. IEEE, 1--6.Google Scholar
- Santiago A Vidal, Claudia Marcos, and J Andrés Díaz-Pace. 2016. An approach to prioritize code smells for refactoring. Automated Software Engineering 23, 3 (2016), 501--532.Google ScholarDigital Library
- Bartosz Walter, Francesca Arcelli Fontana, and Vincenzo Ferme. 2018. Code smells and their collocations: A large-scale experiment on open-source systems. J. Syst. Softw. 144 (2018), 1--21.Google ScholarDigital Library
- Claes Wohlin, Per Runeson, Martin Höst, Magnus C Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Experimentation in software engineering. Springer Science & Business Media.Google ScholarCross Ref
- Aiko Yamashita and Leon Moonen. 2013. Do developers care about code smells? An exploratory survey. In 20th WCRE. IEEE, 242--251.Google Scholar
- Aiko Yamashita and Leon Moonen. 2013. Exploring the impact of inter-smell relations on software maintainability: An empirical study. In 35th ICSE. IEEE, 682--691.Google Scholar
- Aiko Yamashita, Marco Zanoni, Francesca Arcelli Fontana, and Bartosz Walter. 2015. Inter-smell relations in industrial and open source systems: A replication and comparative analysis. In 31st ICSME. IEEE, 121--130.Google Scholar
Index Terms
- Are Code Smell Co-occurrences Harmful to Internal Quality Attributes?: A Mixed-Method Study
Recommendations
Code Smell Co-occurrences: A Systematic Mapping
SBES '22: Proceedings of the XXXVI Brazilian Symposium on Software EngineeringCode smells co-occurrences, i.e., occurrences of more than one code smell in the same class or method, can be better indicators of design problems for software quality. Despite its importance as an indicator of design problems, we have little known ...
How do Code Smell Co-occurrences Removal Impact Internal Quality Attributes? A Developers’ Perspective
SBES '21: Proceedings of the XXXV Brazilian Symposium on Software EngineeringCode smells are poor code structures that might harm the software quality and evolution. However, previous studies has shown that only individual occurrences of smells may not be enough to assess the real impact that these smells can bring on systems. ...
A large-scale empirical study on the lifecycle of code smell co-occurrences
Abstract ContextCode smells are suboptimal design or implementation choices made by programmers during the development of a software system that possibly lead to low code maintainability and higher maintenance costs.
...
Comments