Abstract
A smelly code is generally an indication of the poor quality of the software and it increases the understandability and maintenance efforts at the software programmer’s end. One technique to improve the quality is refactoring. Therefore, in this paper, we have identified the Feature Envy code smell and applied the corresponding Move Method refactoring. The code smell is tackled using the Frequent Usage Patterns (FUP’s) present in the source-code of the software. The FUP’s are identified at the method level and theyrepresent the set of member variables that are used by it either directly or indirectly. The identified FUP data is further used to cluster different methods using a newly proposed Clustering algorithm. Moreover, the proposed approach is successfully tested and evaluated on three standard open-source object-oriented software. The obtained results after evaluation confirm the ability of our proposed approach in enhancing the quality of the underlying software system.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Fuggetta, A.: Software process: a roadmap. In: Proceedings Conference on the Future of Software Engineering, Limerick, Ireland, pp. 25–34 (2000)
Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (1999)
D’Ambros, M., Bacchelli, A., Lanza, M.: On the impact of design flaws on software defects. In: 10th International Conference on Quality Software (QSIC), pp. 23–31 (2010)
Sjoberg, D.I., Yamashita, A., Anda, B., Mockus, A., Dyba, T.: Quantifying the effect of code smells on maintenance effort. IEEE Trans. Softw. Eng. 39(8), 1144–1156 (2013)
Counsell, S., Hamza, H., Hierons, R.M.: An Empirical investigation of code smell ‘deception’ and research contextualization through Paul’s criteria. J. Comput. Inf. Technol.-CIT 18 4, 333–340 (2010)
Khomh, F., Penta, M.D., Guéhéneuc, Y.: An exploratory study of the impact of code smells on software change proneness. In: Proceedings of the 16th Working Conference on Reverse Engineering (WCRE), 13–16 October. IEEE Computer Society Press, Lille (2009)
Chatzigeorgiou, A., Manakos, A.: Investigating the evolution of bad smells in object-oriented code. In: 7th International Conference on Quality of Information and Communications Technology (QUATIC), pp. 106–115 (2010)
Bansiya, J., Davis, C.G.: A hierarchical model for object-oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1), 4–17 (2002)
Oliveto, R., Gethers, M., Bavota, G., Poshyvanyk, D., Lucia, A. De.: Identifying method friendships to remove the feature envy bad smell. In: 33rd International Conference on Software Engineering (ICSE), pp. 820–823 (2011)
Chang, J., Blei, D.: Hierarchical relational models for document networks. Ann. Appl. Stat. 4, 124–150 (2010)
Tsantalis, N., Chaikalis, T., Chatzigeorgiou, A.: JDeodorant: identification and removal of typechecking bad smells. In: Proceedings of CSMR, pp. 329–331 (2008)
Marinescu, C., Marinescu, R., Mihancea, P., Ratiu, D., Wettel, R.: iPlasma: an integrated platform for quality assessment of object-oriented design. In: Proceedings of 21st International Conference on Software Maintenance (ICSM) (2005)
InFusion. http://www.intooitus.com/inFusion.html
Mitchell, B.S., Traverso, M., Mancoridis, S.: An architecture for distributing the computation of software clustering algorithms. In: Proceedings of the IEEE/IFIP Conference on Software Architecture (2001)
Rathee, A., Chhabra, J.K.: Improving cohesion of a software system by performing usage pattern-based clustering. In: International Conference on Smart Computing and Communication (ICSCC), vol. 125, pp. 740–746. Elsevier (2018). Proc. Comput. Sci.
Palomba, F., Bavota, G., Penta, M.D., Fasano, F., Oliveto, R., Lucia, A.D.: A large-scale empirical study on the lifecycle of code smell co-occurrences. Inf. Softw. Technol. 99, 1–10 (2018)
Taibi, D., Janes, A., Lenarduzzi, V.: How developers perceive smells in source code: a replicated study. Inf. Softw. Technol. 92, 223–235 (2017)
Singh, S., Kaur, S.: A systematic literature review: refactoring for disclosing code smells in object oriented software. Ain Shams Eng. J. (2017, in press)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Singh, R., Kumar, A. (2019). To Improve Code Structure by Identifying Move Method Opportunities Using Frequent Usage Patterns in Source-Code. In: Luhach, A., Singh, D., Hsiung, PA., Hawari, K., Lingras, P., Singh, P. (eds) Advanced Informatics for Computing Research. ICAICR 2018. Communications in Computer and Information Science, vol 955. Springer, Singapore. https://doi.org/10.1007/978-981-13-3140-4_29
Download citation
DOI: https://doi.org/10.1007/978-981-13-3140-4_29
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-3139-8
Online ISBN: 978-981-13-3140-4
eBook Packages: Computer ScienceComputer Science (R0)