skip to main content
10.1145/3555228.3555268acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

Code Smell Co-occurrences: A Systematic Mapping

Published: 05 October 2022 Publication History

Abstract

Code 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 about the impact of removing the smells co-occurrence via software refactoring on internal quality attributes, such as coupling, cohesion, complexity, and inheritance. There are several literature reviews on code smells and refactoring. However, we did not identify any literature review investigating the impact of co-occurring code smells in primary studies. Thus, this work presents a systematic mapping of code smell co-occurrences state of the art. To guide the mapping, we defined the following research questions: (i) Which code smells are most tend to co-occur?; (ii) How are code smells co-occurrences refactored?; (iii) What is the impact of code smell co-occurrences on internal quality attributes?; (iv) Which datasets are considered to analyze code smells co-occurrences?; (v) How are code smells co-occurrences detected?; and, (vi) What are the most common code smells co-occurrences?. With main findings, we identified that the code smells that most co-occur are: Feature Envy (19 co-occurrences), Long Method (14 co-occurrences), Long Parameter List (11 co-occurrences) and God Class (11 co-occurrences). No studies were found to answer how the code smells co-occurrences are refactored and the co-occurrences that most impacted the quality attributes, all of which were negative. Only three datasets were considered in the studies to analyze the code smell co-occurrences. Manual detection of co-occurrences is the most used. The co-occurrences Class Data Should Be Private + Feature Envy and Feature Envy + Long Method were the most common co-occurrences in the studies.

References

[1]
Amjad AbuHassan, Mohammad Alshayeb, and Lahouari Ghouti. 2022. Prioritization of model smell refactoring using a covariance matrix-based adaptive evolution algorithm. Information and Software Technology 146 (2022), 106875. https://doi.org/10.1016/j.infsof.2022.106875
[2]
Bruno Cardoso and Eduardo Figueiredo. 2015. Co-Occurrence of Design Patterns and Bad Smells in Software Systems: An Exploratory Study. In Anais [...]. SIMPÓSIO BRASILEIRO DE SISTEMAS DE INFORMAÇÃO (SBSI), 11., 2015, goiania., Sociedade Brasileira de Computação, Porto Alegre, RS, Brasil, 347–354.
[3]
Luis Paulo da Silva Carvalho, Renato Lima Novais, and Manoel G. Mendonça. 2018. Investigating the Relationship between Code Smell Agglomerations and Architectural Concerns: Similarities and Dissimilarities from Distributed, Service-Oriented, and Mobile Systems. Proceedings of the VII Brazilian Symposium on Software Components, Architectures, and Reuse (2018).
[4]
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.
[5]
Martin Fowler. 2018. Refactoring. Addison-Wesley Professional.
[6]
Samireh Jalali and Claes Wohlin. 2012. Systematic literature studies: database searches vs. backward snowballing. In Proceedings of the 2012 ACM-IEEE international symposium on empirical software engineering and measurement. IEEE, 29–38.
[7]
Barbara Kitchenham, Rialette Pretorius, David Budgen, O Pearl Brereton, Mark Turner, Mahmood Niazi, and Stephen Linkman. 2010. Systematic literature reviews in software engineering–a tertiary study. Information and software technology 52, 8 (2010), 792–805.
[8]
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. Journal of Systems and Software 167 (2020), 110610. https://doi.org/10.1016/j.jss.2020.110610
[9]
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.
[10]
Willian Oizumi, Leonardo Sousa, Alessandro Garcia, Roberto Oliveira, Anderson Oliveira, OI Anne Benedicte Agbachi, and Carlos Lucena. 2017. Revealing design problems in stinky code: a mixed-method study. In Proceedings of the 11th Brazilian Symposium on Software Components, Architectures, and Reuse. 1–10.
[11]
Willian Oizumi, Leonardo Sousa, Anderson Oliveira, Alessandro Garcia, Anne Benedicte Agbachi, Roberto Oliveira, and Carlos Lucena. 2018. On the identification of design problems in stinky code: experiences and tool support. Journal of the Brazilian Computer Society 24, 1 (2018), 1–30.
[12]
Willian N Oizumi, Alessandro F Garcia, Thelma E Colanzi, Manuele Ferreira, and Arndt V Staa. 2015. On the relationship of code-anomaly agglomerations and architectural problems. Journal of Software Engineering Research and Development 3, 1(2015), 1–22.
[13]
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 2014 Brazilian symposium on software engineering. IEEE, 91–100.
[14]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Fausto Fasano, Rocco Oliveto, and Andrea De Lucia. 2018. A large-scale empirical study on the lifecycle of code smell co-occurrences. Information and Software Technology 99 (2018), 1–10.
[15]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Denys Poshyvanyk, and Andrea De Lucia. 2015. Mining Version Histories for Detecting Code Smells. IEEE Transactions on Software Engineering 41, 5 (2015), 462–489. https://doi.org/10.1109/TSE.2014.2372760
[16]
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). 8–13. https://doi.org/10.1109/MALTESQUE.2017.7882010
[17]
José Pereira dos Reis, Fernando Brito e Abreu, Glauco de Figueiredo Carneiro, and Craig Anslow. 2021. Code smells detection and visualization: a systematic literature review. Archives of Computational Methods in Engineering (2021), 1–48.
[18]
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.
[19]
Błażej Pietrzak and Bartosz Walter. 2006. Leveraging code smell detection with inter-smell relations. In International Conference on Extreme Programming and Agile Processes in Software Engineering. Springer, 75–84.
[20]
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. Journal of Systems and Software 144 (2018), 450–477. https://doi.org/10.1016/j.jss.2018.07.035
[21]
Dag I.K. Sjøberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, and Tore Dybå. 2013. Quantifying the Effect of Code Smells on Maintenance Effort. IEEE Transactions on Software Engineering 39, 8 (2013), 1144–1156. https://doi.org/10.1109/TSE.2012.89
[22]
Zéphyrin Soh, Aiko Yamashita, Foutse Khomh, and Yann-Gaël Guéhéneuc. 2016. Do Code Smells Impact the Effort of Different Maintenance Programming Activities?. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 1. 393–402. https://doi.org/10.1109/SANER.2016.103
[23]
Santiago Vidal, Willian Oizumi, Alessandro Garcia, Andrés Díaz Pace, and Claudia Marcos. 2019. Ranking architecturally critical agglomerations of code smells. Science of Computer Programming 182 (2019), 64–85.
[24]
Bartosz Walter, Francesca Arcelli Fontana, and Vincenzo Ferme. 2018. Code smells and their collocations: A large-scale experiment on open-source systems. Journal of Systems and Software 144 (2018), 1–21.
[25]
Claes Wohlin. 2014. Guidelines for snowballing in systematic literature studies and a replication in software engineering. In Proceedings of the 18th international conference on evaluation and assessment in software engineering. 1–10.
[26]
Aiko Yamashita and Leon Moonen. 2013. Exploring the impact of inter-smell relations on software maintainability: An empirical study. In 2013 35th International Conference on Software Engineering (ICSE). IEEE, 682–691.
[27]
Aiko Yamashita and Leon Moonen. 2013. To what extent can maintenance problems be predicted by code smell detection?–An empirical study. Information and Software Technology 55, 12 (2013), 2223–2242.
[28]
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 2015 IEEE International conference on software maintenance and evolution (ICSME). IEEE, 121–130.

Cited By

View all
  • (2024)A Methodology for Analysing Code Anomalies in Open-Source Software Using Big Data Analytics2024 IEEE International Conference on Big Data (BigData)10.1109/BigData62323.2024.10825952(8216-8218)Online publication date: 15-Dec-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
SBES '22: Proceedings of the XXXVI Brazilian Symposium on Software Engineering
October 2022
457 pages
ISBN:9781450397353
DOI:10.1145/3555228
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 October 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. code smells co-occurrences
  2. refactoring. internal quality attributes

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

SBES 2022
SBES 2022: XXXVI Brazilian Symposium on Software Engineering
October 5 - 7, 2022
Virtual Event, Brazil

Acceptance Rates

Overall Acceptance Rate 147 of 427 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)35
  • Downloads (Last 6 weeks)1
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)A Methodology for Analysing Code Anomalies in Open-Source Software Using Big Data Analytics2024 IEEE International Conference on Big Data (BigData)10.1109/BigData62323.2024.10825952(8216-8218)Online publication date: 15-Dec-2024

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media