skip to main content
10.1145/3530019.3530032acmotherconferencesArticle/Chapter ViewAbstractPublication PageseaseConference Proceedingsconference-collections
research-article
Open access

Do Developers Modify Dead Methods during the Maintenance of Java Desktop Applications?

Published: 13 June 2022 Publication History

Abstract

Background: Dead code is a code smell. It can refer to code blocks, variables, parameters, fields, methods, classes, etc. that are unused and/or unreachable. Aim: Results from past empirical studies indicate that dead code is widespread in both desktop and web-based software applications. Also, researchers have shown that both comprehensibility and maintainability of source code are negatively affected when dead code is present. Nevertheless, we still know little about maintenance operations involving dead code. Method: We conducted an exploratory empirical study on 13 open-source Java desktop applications, whose software projects were hosted on GitHub, to provide preliminary evidence on whether, and to what extent, developers modify dead code—more specifically, dead methods—when they deal with the maintenance of open-source Java desktop applications. Results: The most important results of our study can be summarized as follows: (i) developers modify dead methods; (ii) dead methods are modified to a different extent as compared to alive methods; (iii) developers spend time modifying dead methods that are removed in subsequent commits; and (iv) developers modify dead methods that are later revived to a different extent as compared to dead methods that are later removed. Conclusions: One of the conclusions of our study is: developers should remove dead methods, whose presence and purpose are not properly documented, to avoid unnecessary modifications to dead methods during the maintenance of software applications.

References

[1]
2021. 4HWC Autonomous Car. https://github.com/4hwc/4HWCAutonomousCar.
[2]
2021. 8_TheWeather. https://github.com/workofart/WeatherDesktop.
[3]
2021. BankApplication. https://github.com/derickfelix/BankApplication.
[4]
2021. bitbox. https://github.com/fusiled/bitbox.
[5]
2021. Density Converter. https://github.com/patrickfav/density-converter.
[6]
2021. Deobfuscator-GUI. https://github.com/java-deobfuscator/deobfuscator-gui.
[7]
2021. graphics-tablet. https://github.com/alexdoublesmile/5-app-graphics-tablet.
[8]
2021. JavaANPR. https://github.com/oskopek/javaanpr.
[9]
2021. javaman. https://github.com/malluce/javaman.
[10]
2021. JDM. https://github.com/iamabs2001/JDM.
[11]
2021. JPass. https://github.com/gaborbata/jpass.
[12]
2021. MBot. https://github.com/znyi/MBot.
[13]
2021. SMV APP. https://github.com/bfriscic/ZavrsniRad.
[14]
Gabriele Bavota, Andrea De Lucia, Andrian Marcus, and Rocco Oliveto. 2010. A Two-Step Technique for Extract Class Refactoring. In Proceedings of International Conference on Automated Software Engineering. ACM, 151–154.
[15]
Hidde Boomsma, B. V. Hostnet, and Hans-Gerhard Gross. 2012. Dead code elimination for web systems written in PHP: Lessons learned from an industry case. In Proceedings of International Conference on Software Maintenance. IEEE, 511–515.
[16]
William H. Brown, Raphael C. Malveau, Hays W. ”Skip” McCormick, and Thomas J. Mowbray. 1998. AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis (1st ed.). John Wiley & Sons, Inc.
[17]
Danilo Caivano, Pietro Cassieri, Simone Romano, and Giuseppe Scanniello. 2021. An Exploratory Study on Dead Methods in Open-source Java Desktop Applications. In Proceedings of International Symposium on Empirical Software Engineering and Measurement. ACM.
[18]
Alexander Chatzigeorgiou and Anastasios Manakos. 2014. Investigating the Evolution of Code Smells in Object-oriented Systems. Innovations in Systems and Software Engineering 10, 1(2014), 3–18.
[19]
Norman Cliff. 1996. Ordinal methods for behavioral data analysis. Psychology Press.
[20]
Harald Cramer. 1946. Mathematical Methods of Statistics. Princeton University Press. 282 pages.
[21]
Sebastian Eder, Maximilian Junker, Elmar Jürgens, Benedikt Hauptmann, Rudolf Vaas, and Karl-Heinz Prommer. 2012. How much does unused code matter for maintenance?. In Proceedings of International Conference on Software Engineering. IEEE, 1102–1111.
[22]
Amin Milani Fard and Ali Mesbah. 2013. JSNOSE: Detecting JavaScript Code Smells. In Proceedings of International Working Conference on Source Code Analysis and Manipulation. IEEE, 116–125.
[23]
Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code (1st ed.). Addison-Wesley.
[24]
Roman Haas, Rainer Niedermayr, Tobias Roehm, and Sven Apel. 2020. Is Static Analysis Able to Identify Unnecessary Source Code?ACM Trans. Softw. Eng. Methodol. 29, 1 (2020), 6:1–6:23.
[25]
Rupert G. Miller Jr.2011. Survival Analysis (2nded.). John Wiley and Sons.
[26]
Foutse Khomh, Massimiliano Di Penta, and Yann-Gael Gueheneuc. 2009. An Exploratory Study of the Impact of Code Smells on Software Change-proneness. In Proceedings of Working Conference on Reverse Engineering. IEEE, 75–84.
[27]
S.S. Mangiafico. 2016. Summary and Analysis of Extension Program Evaluation in R. 282 pages.
[28]
H. B. Mann and D. R. Whitney. 1947. On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other. The Annals of Mathematical Statistics 18, 1 (1947), 50 – 60.
[29]
Mika Mäntylä, Jari Vanhanen, and Casper Lassenius. 2003. A taxonomy and an initial empirical study of bad smells in code. In Proceedings of International Conference on Software Maintenance. IEEE, 381–384.
[30]
Robert C. Martin. 2008. Clean Code: A Handbook of Agile Software Craftsmanship (1st ed.). Prentice Hall.
[31]
Naouel Moha, Yann-Gael Gueheneuc, Laurence Duchien, and Anne-Francoise Le Meur. 2010. DECOR: A Method for the Specification and Detection of Code and Design Smells. IEEE Transactions on Software Engineering 36, 1 (2010), 20–36.
[32]
Niels Groot Obbink, Ivano Malavolta, Gian Luca Scoccia, and Patricia Lago. 2018. An extensible approach for taming the challenges of JavaScript dead code elimination. In Proceedings of International Conference on Software Analysis, Evolution and Reengineering. 291–401.
[33]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Fausto Fasano, Rocco Oliveto, and Andrea De Lucia. 2018. On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigation. Empirical Software Engineering 23, 3 (2018), 1188–1221.
[34]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, and Andrea De Lucia. 2014. Do They Really Smell Bad? A Study on Developers’ Perception of Bad Code Smells. In Proceedings of International Conference on Software Maintenance and Evolution. IEEE, 101–110.
[35]
Karl Pearson. 1900. X. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 50, 302 (1900), 157–175.
[36]
J. Romano, J. D. Kromrey, J. Coraggio, and J. Skowronek. 2006. Appropriate statistics for ordinal level data: Should we really be using t-test and Cohen’sd for evaluating group differences on the NSSE and other surveys?. In Annual Meeting of the Florida Association of Institutional Research, February. 1–3.
[37]
Simone Romano. 2018. Dead Code. In Proceedings of International Conference on Software Maintenance and Evolution. IEEE, 737–742.
[38]
Simone Romano and Giuseppe Scanniello. 2015. DUM-Tool. In Proceedings of International Conference on Software Maintenance and Evolution. IEEE, 339–341.
[39]
Simone Romano and Giuseppe Scanniello. 2018. Exploring the Use of Rapid Type Analysis for Detecting the Dead Method Smell in Java Code. In Proceedings of EUROMICRO Conference on Software Engineering and Advanced Applications. IEEE, 167–174.
[40]
Simone Romano, Giuseppe Scanniello, Carlo Sartiani, and Michele Risi. 2016. A Graph-based Approach to Detect Unreachable Methods in Java Software. In Proceedings of Symposium on Applied Computing. ACM, 1538–1541.
[41]
Simone Romano, Christopher Vendome, Giuseppe Scanniello, and Denys Poshyvanyk. 2016. Are unreachable methods harmful? Results from a controlled experiment. In Proceedings of International Conference on Program Comprehension. IEEE, 1–10.
[42]
Simone Romano, Christopher Vendome, Giuseppe Scanniello, and Denys Poshyvanyk. 2020. A Multi-Study Investigation into Dead Code. IEEE Transactions on Software Engineering 46, 1 (2020), 71–99.
[43]
Giuseppe Scanniello. 2011. Source code survival with the Kaplan Meier. In Proceedings of International Conference on Software Maintenance. 524–527.
[44]
Giuseppe Scanniello. 2014. An Investigation of Object-Oriented and Code-Size Metrics as Dead Code Predictors. In Proceedings of EUROMICRO Conference on Software Engineering and Advanced Applications. 392–397.
[45]
S. Shapiro and M. Wilk. 1965. An analysis of variance test for normality. Biometrika 52, 3-4 (1965), 591–611.
[46]
Davide Spadini, Maurício Aniche, and Alberto Bacchelli. 2018. PyDriller: Python framework for mining software repositories. In Proceedings of Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ACM, 908–911.
[47]
Frank Tip and Jens Palsberg. 2000. Scalable Propagation-based Call Graph Construction Algorithms. In Proceedings of Conference on Object-oriented Programming, Systems, Languages, and Applications. ACM, 281–293.
[48]
Michele Tufano, Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Andrea De Lucia, and Denys Poshyvanyk. 2016. An Empirical Investigation into the Nature of Test Smells. In Proceedings of International Conference on Automated Software Engineering. ACM, 4–15.
[49]
Michele Tufano, Fabio Palomba, Gabriele Bavota, Rocco Oliveto, Massimiliano Di Penta, Andrea De Lucia, and Denys Poshyvanyk. 2017. When and Why Your Code Starts to Smell Bad (and Whether the Smells Go Away). IEEE Transactions on Software Engineering 43, 11 (2017), 1063–1088.
[50]
Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 2010. Soot: A Java Bytecode Optimization Framework. In CASCON First Decade High Impact Papers. IBM, 214–224.
[51]
William C. Wake. 2003. Refactoring Workbook(1st ed.). Addison-Wesley.
[52]
Aiko Yamashita and Leon Moonen. 2013. Do developers care about code smells? An exploratory survey. In Proceedings of Working Conference on Reverse Engineering. IEEE, 242–251.

Cited By

View all
  • (2024)A Confirmation Study on the Removal of Dead Code from Java Desktop Applications2024 50th Euromicro Conference on Software Engineering and Advanced Applications (SEAA)10.1109/SEAA64295.2024.00041(222-225)Online publication date: 28-Aug-2024
  • (2023)JavaScript Dead Code Identification, Elimination, and Empirical AssessmentIEEE Transactions on Software Engineering10.1109/TSE.2023.326784849:7(3692-3714)Online publication date: 1-Jul-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
EASE '22: Proceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering
June 2022
466 pages
ISBN:9781450396134
DOI:10.1145/3530019
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: 13 June 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code smell
  2. dead code
  3. lava flow
  4. unreachable code
  5. unused code

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

EASE 2022

Acceptance Rates

Overall Acceptance Rate 71 of 232 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)92
  • Downloads (Last 6 weeks)9
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)A Confirmation Study on the Removal of Dead Code from Java Desktop Applications2024 50th Euromicro Conference on Software Engineering and Advanced Applications (SEAA)10.1109/SEAA64295.2024.00041(222-225)Online publication date: 28-Aug-2024
  • (2023)JavaScript Dead Code Identification, Elimination, and Empirical AssessmentIEEE Transactions on Software Engineering10.1109/TSE.2023.326784849:7(3692-3714)Online publication date: 1-Jul-2023

View 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

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media