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

skip to main content
10.1145/3546932.3547015acmconferencesArticle/Chapter ViewAbstractPublication PagessplcConference Proceedingsconference-collections
research-article

Code smell analysis in cloned Java variants: the apo-games case study

Published: 12 September 2022 Publication History

Abstract

Families of software products are usually created using opportunistic reuse (clone-and-own) in which products are cloned and adapted to meet new requirements, user preferences, or non-functional properties. Opportunistic reuse brings short-term benefits, e.g., reduced time-to-market, whereas creating long-term drawbacks, e.g., the need of changing multiple variants for any maintenance and evolution activity. This situation is even worse when the individual products have poor design or implementation choices, the so-called code smells. Due to their harmfulness to software quality, code smells should be detected and removed as early as possible. In a family of software products, the same code smell must be identified and removed in all variants where it is are present. Identifying instances of similar code smells affecting different variants has not been investigated in the literature yet. This is the case of the Apo-Games family, which has the challenge of identifying the flaws in the design and implementation of cloned games. To address this challenge, we applied our inconsistency and repair approach to detect and suggest solutions for six types of code smells in 19 products of the Apo-games family. Our results show that a considerable number of smells were identified, most of them for the long parameter list and data class types. The number of the same smells identified in multiple variants ranged between 2.9 and 20.2 on average, showing that clone-and-own may lead to the replication of code smells in multiple products. Lastly, our approach was able to generate between 4.9 and 28.98 repair alternatives per smell on average.

References

[1]
Wesley K. G. Assunção, Roberto E. Lopez-Herrejon, Lukas Linsbauer, Silvia R. Vergilio, and Alexander Egyed. 2017. Reengineering legacy applications into software product lines: a systematic mapping. Empirical Software Engineering 22, 6 (feb 2017), 2972--3016.
[2]
Jorge Echeverría, Francisca Pérez, José Ignacio Panach, and Carlos Cetina. 2021. An empirical study of performance using Clone & Own and Software Product Lines in an industrial context. Information and Software Technology 130 (2021), 106444.
[3]
Wolfram Fenske and Sandro Schulze. 2015. Code Smells Revisited: A Variability Perspective. In Proceedings of the Ninth International Workshop on Variability Modelling of Software-Intensive Systems (Hildesheim, Germany) (VaMoS '15). Association for Computing Machinery, New York, NY, USA, 3--10.
[4]
Martin Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.
[5]
Mouna Hadj-Kacem and Nadia Bouassida. 2018. A Hybrid Approach To Detect Code Smells using Deep Learning. In ENASE. 137--146.
[6]
Jacob Krüger and Thorsten Berger. 2020. An Empirical Analysis of the Costs of Clone- and Platform-Oriented Software Reuse. In 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Virtual Event, USA) (ESEC/FSE 2020). Association for Computing Machinery, New York, NY, USA, 432--444.
[7]
Jacob Krüger, Wolfram Fenske, Thomas Thüm, Dirk Aporius, Gunter Saake, and Thomas Leich. 2018. Apo-Games: A Case Study for Reverse Engineering Variability from Cloned Java Variants. In Proceedings of the 22nd International Systems and Software Product Line Conference - Volume 1 (Gothenburg, Sweden) (SPLC '18). Association for Computing Machinery, New York, NY, USA, 251--256.
[8]
Luciano Marchezan, Wesley K. G. Assuncao, Roland Kretschmer, and Alexander Egyed. 2022. Change-Oriented Repair Propagation. In Proceedings of the International Conference on Software and System Processes and International Conference on Global Software Engineering (Pittsburgh, PA, USA) (ICSSP'22). Association for Computing Machinery, New York, NY, USA, 82--92.
[9]
Luciano Marchezan, Wesley K. G. Assunção, Gabriela Michelon, Edvin Herac, and Alexander Egyed. 2022. Applying an Inconsistency Repair Mechanism for clone-and-own Code Smell Analysis: the Apo-games Case Study (Evaluation Data).
[10]
Luciano Marchezan, Roland Kretschmer, Wesley KG Assunção, Alexander Reder, and Alexander Egyed. 2022. Generating repairs for inconsistent models. Software and Systems Modeling (2022), 1--33.
[11]
Luciano Marchezan, Elder Rodrigues, Wesley Klewerton Guez Assunção, Maicon Bernardino, Fábio Paulo Basso, and João Carbonell. 2022. Software product line scoping: A systematic literature review. Journal of Systems and Software 186 (apr 2022), 111189.
[12]
Davood Mazinanian, Nikolaos Tsantalis, Raphael Stein, and Zackary Valenta. 2016. JDeodorant: Clone Refactoring. In Proceedings of the 38th International Conference on Software Engineering Companion (Austin, Texas) (ICSE '16). Association for Computing Machinery, New York, NY, USA, 613--616.
[13]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Denys Poshyvanyk, and Andrea De Lucia. 2014. Mining version histories for detecting code smells. IEEE Transactions on Software Engineering 41, 5 (2014), 462--489.
[14]
Iuri Santos Souza, Ivan Machado, Carolyn Seaman, Gecynalda Gomes, Christina Chavez, Eduardo Santana de Almeida, and Paulo Masiero. 2019. Investigating Variability-Aware Smells in SPLs: An Exploratory Study. In 33rd Brazilian Symposium on Software Engineering (Salvador, Brazil) (SBES 2019). Association for Computing Machinery, New York, NY, USA, 367--376.
[15]
Amjed Tahir, Aiko Yamashita, Sherlock Licorish, Jens Dietrich, and Steve Counsell. 2018. Can You Tell Me If It Smells? A Study on How Developers Discuss Code Smells and Anti-Patterns in Stack Overflow. In Proceedings of the 22nd International Conference on Evaluation and Assessment in Software Engineering 2018 (Christchurch, New Zealand) (EASE'18). Association for Computing Machinery, New York, NY, USA, 68--78.
[16]
Michael Alexander Tröls, Luciano Marchezan, Atif Mashkoor, and Alexander Egyed. 2022. Instant and global consistency checking during collaborative engineering. Software and Systems Modeling (2022), 1--27.
[17]
Frank J Van der Linden, Klaus Schmid, and Eelco Rommes. 2007. Software product lines in action: the best industrial practice in product line engineering. Springer Science & Business Media.
[18]
Daniele Wolfart, Wesley K. G. Assunção, and Jabier Martinez. 2021. Variability Debt: Characterization, Causes and Consequences. In 20th Brazilian Software Quality Symposium (SBQS).

Cited By

View all
  • (2024)Exploring Dependencies Among Inconsistencies to Enhance the Consistency Maintenance of Models2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00023(147-158)Online publication date: 12-Mar-2024

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
SPLC '22: Proceedings of the 26th ACM International Systems and Software Product Line Conference - Volume A
September 2022
266 pages
ISBN:9781450394437
DOI:10.1145/3546932
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 the author(s) 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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 September 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. code smells
  2. consistency checking
  3. inconsistency repair
  4. software product line

Qualifiers

  • Research-article

Funding Sources

  • Austrian Science Fund (FWF)

Conference

SPLC '22
Sponsor:

Acceptance Rates

SPLC '22 Paper Acceptance Rate 14 of 41 submissions, 34%;
Overall Acceptance Rate 167 of 463 submissions, 36%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)0
Reflects downloads up to 28 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Exploring Dependencies Among Inconsistencies to Enhance the Consistency Maintenance of Models2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00023(147-158)Online publication date: 12-Mar-2024

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media