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

被引:24
|
作者
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
相关论文
共 11 条
  • [1] Evolution of technical debt remediation in Python']Python: A case study on the Apache Software Ecosystem
    Tan, Jie
    Feitosa, Daniel
    Avgeriou, Paris
    Lungu, Mircea
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2021, 33 (04)
  • [2] Injecting software faults in Python']Python applications The OpenStack case study
    Marques, Henrique
    Laranjeiro, Nuno
    Bernardino, Jorge
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (01)
  • [3] When Code Smells Twice as Much: Metric-Based Detection of Variability-Aware Code Smells
    Fenske, Wolfram
    Schulze, Sandro
    Meyer, Daniel
    Saake, Gunter
    2015 IEEE 15TH INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM), 2015, : 171 - 180
  • [4] Software Metric Based Impact Analysis of Code Smells - A Large Scale Empirical Study
    Rahman, Md. Masudur
    Satter, Abdus
    Joarder, Md. Mahbubul Alam
    Sakib, Kazi
    SOFTWARE-PRACTICE & EXPERIENCE, 2025,
  • [5] On the practitioners' understanding of coupling smells - A grey literature based Grounded-Theory study
    Singjai, Apitchaka
    Simhandl, Georg
    Zdun, Uwe
    INFORMATION AND SOFTWARE TECHNOLOGY, 2021, 134
  • [6] Understanding the Impact of Refactoring on Smells: A Longitudinal Study of 23 Software Projects
    Cedrim, Diego
    Garcia, Alessandro
    Mongiovi, Melina
    Gheyi, Rohit
    Sousa, Leonardo
    de Mello, Rafael
    Fonseca, Baldoino
    Ribeiro, Marcio
    Chavez, Alexander
    ESEC/FSE 2017: PROCEEDINGS OF THE 2017 11TH JOINT MEETING ON FOUNDATIONS OF SOFTWARE ENGINEERING, 2017, : 465 - 475
  • [7] How Good are Code Smells for Evaluating Software Maintainability? - Results from a Comparative Case Study
    Yamashita, Aiko
    2013 29TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE (ICSM), 2013, : 566 - 571
  • [8] PyMS: a Python']Python toolkit for processing of gas chromatography-mass spectrometry (GC-MS) data. Application and comparative study of selected tools
    O'Callaghan, Sean
    De Souza, David P.
    Isaac, Andrew
    Wang, Qiao
    Hodkinson, Luke
    Olshansky, Moshe
    Erwin, Tim
    Appelbe, Bill
    Tull, Dedreia L.
    Roessner, Ute
    Bacic, Antony
    McConville, Malcolm J.
    Likic, Vladimir A.
    BMC BIOINFORMATICS, 2012, 13
  • [9] Severity classification of software code smells using machine learning techniques: A comparative study
    Abdou, Ashraf
    Darwish, Nagy
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2024, 36 (01)
  • [10] Investigating the impacts of heavy metal (loid) on ecology and human health in the lower basin of hungary's danube river: a python']python and monte carlo simulation-based study
    Saeed, Omar
    Szekacs, Andras
    Jordan, Gyozo
    Mortl, Maria
    Abukhadra, Mostafa R.
    Eid, Mohamed Hamdy
    ENVIRONMENTAL GEOCHEMISTRY AND HEALTH, 2023, 45 (12) : 9757 - 9784