Application of the Accessibility Analysis Technique for Detection of Dead Methods in Object-Oriented Software
Abstract
Modifications performed during the software life cycle contribute for increasing code complexity and pollution. The presence of dead code favors such pollution making it difficult to trace requirements, to run tests, and to read and to understand source code. To detect and to remove dead code are arduous processes and depend on analyzing and understanding of source code. Thus, the reachability analysis technique has been applied to verify the method calls triggered from software initialization methods to identify unreachable methods (dead code). A limitation of this verification is the reliance on prior knowledge of software to determine your initialization methods. This work proposes an application of reachability analysis technique, which eliminates the need for prior knowledge and detects unreachable methods in object-oriented software. Experimental results indicate that this proposal can detect larger amount of unreachable methods in relation to a consolidated tool.
Keywords:
Accessibility, Software, Dead Methods
References
Bacon, D. F.; Laffra, J. C.; Sweeney, P. F.; Tip, F. Removal of Unreachable Methods in Object-Oriented Applications Based on Program Interface Analysis. Patente Número US6654951 B1. 2003.
Bakota, T.; Hegedus, P.; Siket, I.; Ladányi, G.; Ferenc, R. Qualitygate SourceAudit: A Tool for Assessing the Technical Quality of Software. In: Software Evolution Week IEEE Conference on Software Maintenance, Reengineering and Reverse Engineering. pp. 440-445.2014.
Bastos, C; Júnior, P. A. P; Costa, H. Técnicas para Detecção de Código Morto: Uma Revisão Sistemática de Literatura. In: Simpósio Brasileiro de Sistemas de Informação. pp. 255-262. 2016.
Boomsma, H.; Gross, H.G. Dead Code Elimination for Web Systems Written in PHP: Lessons Learned from an Industry Case. In: International Conference of Software Maintenance. pp. 511-515. 2012.
Chen, Y.; Emden, R. G.; Eleftherios, K. A C++ Data Model Supporting Reachability Analysis and Dead Code Detection. In: IEEE Transactions on Software Engineering. v. 24, n. 9, p. 682-694. 1998.
Eder, S.; Junker, M.; Jürgens, E.; Hauptmann, B.; Vaas, R.; Prommer, K. How Much Does Unused Code Matter for Maintenance? In: International Conference on Software Engineering. pp. 1102-1111. 2012.
Fehnker, A.; Huuck, R. Model Checking Driven Static Analysis for the Real World: Designing and Tuning Large Scale Bug Detection. In: Innovations in Systems and Software Engineering. v. 9. pp. 45-56. 2013.
Gold, N.; Mohan, A. A Framework for Understanding Conceptual Changes in Evolving Source Code. In: International Conference on Software Maintenance. pp. 431-439.2003.
Guerrouat, A.; Richter, H. A Combined Approach for Reachability Analysis. In: International Conference on Software Engineering Advances. pp. 23-23. 2006.
Lehman, M. M.; Belady, L. Program Evolution: Processes of Software Change. Academic Press. 538p. 1985.
Martin, R. C. Clean Code: A Handbook of Agile Software Craftsmanship. Prentice Hall. Ed 1. 431p. 2008.
Martins, R. C.; Pellegrino, S. R. M.; Santellano, J. Tratamento de “Dead Codes” em Software de uso Aeronáutico. In: Brazilian Conference on Dynamics, Control and their Applications. 2010.
Pérez, R. C.; Guzman, I. G. R.; Piattini, M. Diagonosis of Software Erosion Through Fuzzy Logic. In: Symposium on Computacional Intelligence in Dynamic Dynamic and Uncertain Environments. pp. 49-56. 2011.
Romano, S.; Scanniello, G.; Sartiani, C.; Risi, M. A Graph-Based Approach to Detect Unreachable Methods in Java Software. In: ACM Symposium on Applied Computing. pp. 1538-1541. 2016.
Scanniello, G. An Investigation of Object-Oriented and Code-Size Metrics as Dead Code Predictors. In: Conference on Software Engineering and Advanced Applications. pp. 392-397. 2014.
Srivastava, A. Unreachable Procedures in Object-Oriented Programming. In: ACM Letters on Programming Languages and Systems. pp. 355-364. 1992.
Sunitha, K. V. N.; Kumar, V. V. A New Technique for Copy Propagation and Dead Code Elimination Using Hash Based Value Numbering. In: International Conference on Advanced Computing and Communications. pp. 601-604. 2006.
Tjortjis, C.; Layzell, P. Expert Maintainers' Strategies and Needs When Understanding Software: A Case Study Approach. In: Asia-Pacific Software Engineering Conference. pp. 281-287. 2001.
Bakota, T.; Hegedus, P.; Siket, I.; Ladányi, G.; Ferenc, R. Qualitygate SourceAudit: A Tool for Assessing the Technical Quality of Software. In: Software Evolution Week IEEE Conference on Software Maintenance, Reengineering and Reverse Engineering. pp. 440-445.2014.
Bastos, C; Júnior, P. A. P; Costa, H. Técnicas para Detecção de Código Morto: Uma Revisão Sistemática de Literatura. In: Simpósio Brasileiro de Sistemas de Informação. pp. 255-262. 2016.
Boomsma, H.; Gross, H.G. Dead Code Elimination for Web Systems Written in PHP: Lessons Learned from an Industry Case. In: International Conference of Software Maintenance. pp. 511-515. 2012.
Chen, Y.; Emden, R. G.; Eleftherios, K. A C++ Data Model Supporting Reachability Analysis and Dead Code Detection. In: IEEE Transactions on Software Engineering. v. 24, n. 9, p. 682-694. 1998.
Eder, S.; Junker, M.; Jürgens, E.; Hauptmann, B.; Vaas, R.; Prommer, K. How Much Does Unused Code Matter for Maintenance? In: International Conference on Software Engineering. pp. 1102-1111. 2012.
Fehnker, A.; Huuck, R. Model Checking Driven Static Analysis for the Real World: Designing and Tuning Large Scale Bug Detection. In: Innovations in Systems and Software Engineering. v. 9. pp. 45-56. 2013.
Gold, N.; Mohan, A. A Framework for Understanding Conceptual Changes in Evolving Source Code. In: International Conference on Software Maintenance. pp. 431-439.2003.
Guerrouat, A.; Richter, H. A Combined Approach for Reachability Analysis. In: International Conference on Software Engineering Advances. pp. 23-23. 2006.
Lehman, M. M.; Belady, L. Program Evolution: Processes of Software Change. Academic Press. 538p. 1985.
Martin, R. C. Clean Code: A Handbook of Agile Software Craftsmanship. Prentice Hall. Ed 1. 431p. 2008.
Martins, R. C.; Pellegrino, S. R. M.; Santellano, J. Tratamento de “Dead Codes” em Software de uso Aeronáutico. In: Brazilian Conference on Dynamics, Control and their Applications. 2010.
Pérez, R. C.; Guzman, I. G. R.; Piattini, M. Diagonosis of Software Erosion Through Fuzzy Logic. In: Symposium on Computacional Intelligence in Dynamic Dynamic and Uncertain Environments. pp. 49-56. 2011.
Romano, S.; Scanniello, G.; Sartiani, C.; Risi, M. A Graph-Based Approach to Detect Unreachable Methods in Java Software. In: ACM Symposium on Applied Computing. pp. 1538-1541. 2016.
Scanniello, G. An Investigation of Object-Oriented and Code-Size Metrics as Dead Code Predictors. In: Conference on Software Engineering and Advanced Applications. pp. 392-397. 2014.
Srivastava, A. Unreachable Procedures in Object-Oriented Programming. In: ACM Letters on Programming Languages and Systems. pp. 355-364. 1992.
Sunitha, K. V. N.; Kumar, V. V. A New Technique for Copy Propagation and Dead Code Elimination Using Hash Based Value Numbering. In: International Conference on Advanced Computing and Communications. pp. 601-604. 2006.
Tjortjis, C.; Layzell, P. Expert Maintainers' Strategies and Needs When Understanding Software: A Case Study Approach. In: Asia-Pacific Software Engineering Conference. pp. 281-287. 2001.
Published
2016-10-24
How to Cite
BASTOS, Camila; AFONSO JÚNIOR, Paulo; COSTA, Heitor.
Application of the Accessibility Analysis Technique for Detection of Dead Methods in Object-Oriented Software. In: BRAZILIAN SOFTWARE QUALITY SYMPOSIUM (SBQS), 15. , 2016, Maceió.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2016
.
p. 79-93.
DOI: https://doi.org/10.5753/sbqs.2016.15127.
