Long Method and Long Parameter List Code Smells Detection using Functional and Semantic Characteristics
Randeep Singh1, Amit Bindal2, Ashok Kumar3

1Randeep Singh, Research Scholar, Department of Computer Science & Engineering, M. M. Engineering College, M. M. (Deemed to be University) Mullana, Ambala, Haryana, India.
2Amit Bindal, Associate Professor, Department of Computer Science & Engineering, M. M. Engineering College, M. M. (Deemed to be University) Mullana, Ambala, Haryana, India.
3Ashok Kumar, Ex-Professor, Department of Computer Science & Engineering, M. M. Engineering College, M. M. (Deemed to be University) Mullana, Ambala, Haryana, India.
Manuscript received on March 16, 2020. | Revised Manuscript received on March 24, 2020. | Manuscript published on March 30, 2020. | PP: 2223-2232 | Volume-8 Issue-6, March 2020. | Retrieval Number: E5888018520/2020©BEIESP | DOI: 10.35940/ijrte.E5888.038620

Open Access | Ethics and Policies | Cite | Mendeley
© The Authors. Blue Eyes Intelligence Engineering and Sciences Publication (BEIESP). This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)

Abstract: Long-term evolution and maintenance of the software system result in the introduction of different kinds of code smell in the underlying source code of the software system. These code smells are the direct indication of degraded quality and increased understandability and maintainability efforts at the developer’s end. Identification of these symptoms (code smells) that affects quality is an important aspect of software maintenance. Therefore, this paper targets identifying two key code smells, namely Long Method and Long Parameter List. The presence of these code smells directly affects the understandability and reusability of the underlying code. The proposed Long Method code smell detection technique depends on four main criteria, the size aspect of the method, Cyclomatic complexity of the method, functional relatedness of the method, and the semantic relatedness among different statements of the method. The proposed functional relatedness aspect at the method level is based on the idea of usage patterns present in the method. These usage patterns help in predicting functionality of the method and are a direct indicator of the fact whether the method is uni- functional (performs a single task) or multifunctional (performs more than one task). The proposed semantic relatedness is based on the tokens extracted at the method level and represents the importance of semantic (underlying concept) aspects at the method level. The proposed approach for Long Parameter List smell detection is also based on two important aspects, namely the size of the parameter list and the complexity of the data types used in the parameter list. The proposed approaches of this paper are experimentally validated and tested against state of the art existing approaches/ tools. The obtained experimental results point to the accuracy and relevance of the proposed approaches.
Keywords: Code Smell, Long Method, Long Parameter List, Semantic, Functional, Cyclomatic Complexity.
Scope of the Article: Semantic web.