Understanding metric-based detectable smells in Python']Python software: A comparative study

被引:22
|
作者
Chen Zhifei [1 ]
Chen Lin [1 ]
Ma Wanwangying [1 ]
Zhou Xiaoyu [2 ]
Zhou Yuming [1 ]
Xu Baowen [1 ]
机构
[1] Nanjing Univ, State Key Lab Novel Software Technol, Nanjing 210093, Jiangsu, Peoples R China
[2] Southeast Univ, Sch Comp Sci & Engn, Nanjing 210096, Jiangsu, Peoples R China
基金
中国国家自然科学基金;
关键词
!text type='Python']Python[!/text; Code smell; Detection strategy; Software maintainability; CODE-SMELLS; BAD SMELLS; IMPACT; IDENTIFICATION; PROBABILITY; AGREEMENT;
D O I
10.1016/j.infsof.2017.09.011
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context Code smells are supposed to cause potential comprehension and maintenance problems in software development. Although code smells are studied in many languages, e.g. Java and C#, there is a lack of technique or tool support addressing code smells in Python. Objective: Due to the great differences between Python and static languages, the goal of this study is to define and detect code smells in Python programs and to explore the effects of Python smells on software maintainability. Method: In this paper, we introduced ten code smells and established a metric-based detection method with three different filtering strategies to specify Metric thresholds (Experience-Based Strategy, Statistics-Based Strategy, and Tuning Machine Strategy). Then, we performed a Comparative study to investigate how three detection strategies perform in detecting Python smells and how these smells affect software maintainability with different detection strategies. This study utilized a corpus of 106 Python projects with most stars on GitHub. Results: The results showed that: (1) the metric-based detection approach performs well in detecting Python smells and Tuning Machine Strategy achieves the best accuracy; (2) the three detection strategies discover some different smell occurrences, and Long Parameter List and Long Method are more prevalent than other smells; (3) several kinds of code smells are more significantly related to changes or faults in Python modules. Conclusion: These findings reveal the key features of Python smells and also provide a guideline for the choice of detection strategy in detecting and analyzing Python smells.
引用
收藏
页码:14 / 29
页数:16
相关论文
共 50 条
  • [1] A Software Metric for Python']Python Language
    Misra, Sanjay
    Cafer, Ferid
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2010, PT 2, PROCEEDINGS, 2010, 6017 : 301 - +
  • [2] A Statistical Comparison of Java']Java and Python']Python Software Metric Properties
    Destefanis, Giuseppe
    Ortu, Marco
    Porru, Simone
    Swift, Stephen
    Marchesi, Michele
    PROCEEDINGS OF 2016 IEEE/ACM 7TH INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE METRICS (WETSOM), 2016, : 22 - 28
  • [3] Development of Word Cloud Generator Software Based on Python']Python
    Jin, Yuping
    13TH GLOBAL CONGRESS ON MANUFACTURING AND MANAGEMENT, 2017, 174 : 788 - 792
  • [4] An Empirical Study of Metric-based Comparisons of Software Libraries
    de la Mora, Fernando Lopez
    Nadi, Sarah
    PROMISE'18: PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON PREDICTIVE MODELS AND DATA ANALYTICS IN SOFTWARE ENGINEERING, 2018, : 22 - 31
  • [5] A Python']Python-based Software Tool for Power System Analysis
    Milano, Federico
    2013 IEEE POWER AND ENERGY SOCIETY GENERAL MEETING (PES), 2013,
  • [6] Injecting software faults in Python']Python applications The OpenStack case study
    Marques, Henrique
    Laranjeiro, Nuno
    Bernardino, Jorge
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (01)
  • [7] PytonDAQ - A Python']Python based measurement data acquisition and processing software
    Jaeger, D.
    Guemmer, V.
    XXVI BIENNIAL SYMPOSIUM ON MEASURING TECHNIQUES IN TURBOMACHINERY, MTT2622, 2023, 2511
  • [8] Towards an understanding of memory leak patterns: an empirical study in Python']Python
    Chen, Jie
    Yu, Dongjin
    Hu, Haiyang
    SOFTWARE QUALITY JOURNAL, 2023, 31 (04) : 1303 - 1330
  • [9] Formal Verification of Python']Python Software Transactional Memory Based on Timed Automata
    Kordic, Branislav
    Popovic, Miroslav
    Ghilezan, Silvia
    ACTA POLYTECHNICA HUNGARICA, 2019, 16 (07) : 197 - 216
  • [10] Integration of Python']Python-Based MDSPLUS Interface for ICRH DAC Software
    Joshi, Ramesh
    Kulkarni, Swanand S.
    Kulkarni, S. V.
    PROGRESS IN ADVANCED COMPUTING AND INTELLIGENT ENGINEERING, PROCEEDINGS OF ICACIE 2016, VOLUME 1, 2018, 563 : 447 - 456