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 条
  • [31] Using software metrics for predicting vulnerable classes in java']java and python']python based systems
    Sultana, Kazi Zakia
    Anu, Vaibhav
    Chong, Tai-Yin
    INFORMATION SECURITY JOURNAL, 2024, 33 (03): : 251 - 267
  • [32] PyMUS: Python']Python-Based Simulation Software for Virtual Experiments on Motor Unit System
    Kim, Hojeong
    Kim, Minjung
    FRONTIERS IN NEUROINFORMATICS, 2018, 12
  • [33] PyMoDAQ: An open-source Python']Python-based software for modular data acquisition
    Weber, S. J.
    REVIEW OF SCIENTIFIC INSTRUMENTS, 2021, 92 (04):
  • [34] Development of a Power Flow Software for Distribution System Analysis Based on Rectangular Voltage Using Python']Python Software Package
    Hakim, Lukmanul
    Wahidi, Muhamad
    Handoko, Trisno
    Gusmedi, Hem
    Soedjarwanto, Noer
    Milano, Federico
    2014 6TH INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY AND ELECTRICAL ENGINEERING (ICITEE), 2014, : 255 - 259
  • [35] PyWindAM: A Python']Python software for wind field analysis and cloud-based data management
    Chen, Nanxi
    Ma, Rujin
    Ge, Baixue
    Chang, Haocheng
    SOFTWAREX, 2024, 28
  • [36] Extracting Rationale for Open Source Software Development Decisions - A Study of Python']Python Email Archives
    Sharma, Pankajeshwara Nand
    Savarimuthu, Bastin Tony Roy
    Stanger, Nigel
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2021), 2021, : 1008 - 1019
  • [37] Metric-based method of software requirements correctness improvement
    Yaremchuk, Svitlana
    Bardis, Nikolaos
    Vyacheslav, Kharchenko
    2016 INTERNATIONAL CONFERENCE APPLIED MATHEMATICS, COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING, 2017, 9
  • [38] Open-source, Python']Python-based, hardware and software for controlling behavioural neuroscience experiments
    Akam, Thomas
    Lustig, Andy
    Rowland, James M.
    Kapanaiah, Sampath K. T.
    Esteve-Agraz, Joan
    Panniello, Mariangela
    Marquez, Cristina
    Kohl, Michael M.
    Kaetzel, Dennis
    Costa, Rui M.
    Walton, Mark E.
    ELIFE, 2022, 11
  • [39] Software/Hardware Framework for Generating Parallel Gaussian Random Numbers Based on the Monty Python']Python Method
    Li, Yuan
    Chow, Paul
    Jiang, Jiang
    Zhang, Minxuan
    Wei, Shaojun
    2012 INTERNATIONAL CONFERENCE ON FIELD-PROGRAMMABLE TECHNOLOGY (FPT'12), 2012, : 190 - 197
  • [40] Formal Verification of Python']Python Software Transactional Memory Serializability Based on the Push/Pull Semantic Model
    Popovic, Miroslav
    Popovic, Marko
    Ghilezan, Silvia
    Kordic, Branislav
    PROCEEDINGS OF THE 6TH CONFERENCE ON THE ENGINEERING OF COMPUTER BASED SYSTEMS (ECBS 2019), 2020,