Structural Quality Metrics as Indicators of the Long Method Bad Smell: An Empirical Study

被引:4
|
作者
Charalampidou, Sofia [1 ]
Arvanitou, Elvira-Maria
Ampatzoglou, Apostolos
Avgeriou, Paris
Chatzigeorgiou, Alexander
Stamelos, Ioannis
机构
[1] Univ Groningen, Dept Comp Sci, Groningen, Netherlands
基金
欧盟地平线“2020”;
关键词
long method; coupling; cohesion; size; case study; CODE;
D O I
10.1109/SEAA.2018.00046
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Empirical evidence has pointed out that Extract Method refactorings are among the most commonly applied refactorings by software developers. The identification of Long Method code smells and the ranking of the associated refactoring opportunities is largely based on the use of metrics, primarily with measures of cohesion, size and coupling. Despite the relevance of these properties to the presence of large, complex and noncohesive pieces of code, the empirical validation of these metrics has exhibited relatively low accuracy (max precision: 66%) regarding their predictive power for long methods or extract method opportunities. In this work we perform an empirical validation of the ability of cohesion, coupling and size metrics to predict the existence and the intensity of long method occurrences. According to the statistical analysis, the existence and the intensity of the Long Method smell can be effectively predicted by two size (LoC and NoLV), two coupling (MPC and RFC), and four cohesion (LCOM1, LCOM2, Coh, and CC) metrics. Furthermore, the integration of these metrics into a multiple logistic regression model can predict whether a method should be refactored with a precision of 89% and a recall of 91%. The model yields suggestions whose ranking is strongly correlated to the ranking based on the effect of the corresponding refactorings on source code (correl. coef. 0.520). The results are discussed by providing interpretations and implications for research and practice.
引用
收藏
页码:234 / 238
页数:5
相关论文
共 50 条
  • [1] Bad smell detection using quality metrics and refactoring opportunities
    Mayvan, Bahareh Bafandeh
    Rasoolzadegan, Abbas
    Jafari, Abbas Javan
    [J]. JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2020, 32 (08)
  • [2] Quality Improvement for UML and OCL Models through Bad Smell and Metrics Definition
    Khanh-Hoang Doan
    Gogolla, Martin
    [J]. 2019 ACM/IEEE 22ND INTERNATIONAL CONFERENCE ON MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS COMPANION (MODELS-C 2019), 2019, : 774 - 778
  • [3] Review of data quality indicators and metrics, and suggestions for indicators and metrics for structural health monitoring
    Makhoul, Nisrine
    [J]. ADVANCES IN BRIDGE ENGINEERING, 2022, 3 (01):
  • [4] Are Smell-Based Metrics Actually Useful in Effort-Aware Structural Change-Proneness Prediction? An Empirical Study
    Liu, Huihui
    Yu, Yijun
    Li, Bixin
    Yang, Yibiao
    Jia, Ru
    [J]. 2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 315 - 324
  • [5] An Empirical Study on Assessing the Quality of Use Case Metrics
    Usdadiya, Chirag
    Tiwari, Saurabh
    Banerjee, Asim
    [J]. PROCEEDINGS OF THE 12TH INNOVATIONS ON SOFTWARE ENGINEERING CONFERENCE (ISEC), 2019,
  • [6] An Empirical Study on the Impact of Refactoring on Quality Metrics in Android Applications
    Hamdi, Oumayma
    Ouni, Ali
    AlOmar, Eman Abdullah
    Cinneide, Mel O.
    Mkaouer, Mohamed Wiem
    [J]. 2021 IEEE/ACM 8TH INTERNATIONAL CONFERENCE ON MOBILE SOFTWARE ENGINEERING AND SYSTEMS (MOBILESOFT 2021), 2021, : 28 - 39
  • [7] An empirical study for determining the quality indicators for the primary and secondary school of Bangladesh: A structural equation modeling approach
    Ahmmed, Suman
    Saha, Jashodhan
    Tamal, Maruf Ahmed
    [J]. HELIYON, 2022, 8 (10)
  • [8] Mechanical Thrombectomy Quality Indicators Study in Czech Stroke Centers: Results of the METRICS Study
    Kocher, Martin
    Sanak, Daniel
    Zapletolova, Jana
    Cihlar, Filip
    Czerny, Daniel
    Cernik, David
    Duras, Petr
    Fiksa, Jan
    Husty, Jakub
    Jurak, Lubomir
    Kovar, Martin
    Lacman, Jiri
    Padr, Radek
    Prochazka, Pavel
    Raupach, Jan
    Reiser, Martin
    Rohan, Vladimir
    Roubec, Martin
    Sova, Jindrich
    Sercl, Miroslav
    Skorna, Miroslav
    Simunek, Libor
    Snajdrova, Alena
    Sramek, Martin
    Tomek, Ales
    [J]. JOURNAL OF STROKE & CEREBROVASCULAR DISEASES, 2022, 31 (04):
  • [9] An Empirical Study of Long Method and God Method in Industrial Projects
    Zhao, Xiaoqiong
    Xuan, Xiao
    Li, Shanping
    [J]. 2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING WORKSHOP (ASEW), 2015, : 109 - 114
  • [10] Is Structural Quality as Assessed by the "Profil Cultural" Method Related to Quantitative Indicators of Soil Physical Quality?
    Watanabe, Rafaela
    Tormena, Cassio Antonio
    Guimaraes, Maria de Fatima
    Tavares Filho, Joao
    Ralisch, Ricardo
    Franchini, Julio
    Debiasi, Henrique
    [J]. REVISTA BRASILEIRA DE CIENCIA DO SOLO, 2018, 42