Python Code Smell Detection Using Machine Learning

Python(编程语言) 计算机科学 机器学习 人工智能 可维护性 可测试性 特征选择 单元测试 回归检验 软件 工具箱 软件质量 程序设计语言 软件系统 软件开发 软件工程 软件建设 哲学 认识论
作者
Natthida Vatanapakorn,Chitsutha Soomlek,Pusadee Seresangtakul
标识
DOI:10.1109/icsec56337.2022.10049330
摘要

Python is an increasingly popular programming language used in various software projects and domains. Code smells in Python significantly influences the maintainability, understandability, testability issues. This paper proposes a machine learning-based code smell detection for Python programs. We trained eight machine learning models with a dataset based on 115 open-source Python projects, 39 class-level software metrics, and 22 function-level software metrics. We intended to identify five code smell types in both class and function levels, i.e., long method, long parameter list, large class long scope chaining, and long based class list. Correlation-based feature selection (CFS) and logistic regression-forward stepwise (conditional) selection were employed to improve the performance of the model. This research concluded with an empirical evaluation of the performance of the machine learning approaches against the tuning machine method. The results show that the machine learning method achieved 99.72% accuracy when identifying long method and long base class list. The machine learning-based code smell detection also outperformed the tuning machine method. Moreover, we also found a set of high-impact features that contributed most when identifying each type of code smell.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Yolo完成签到,获得积分10
刚刚
刚刚
3秒前
Till发布了新的文献求助10
4秒前
Ammon完成签到,获得积分10
4秒前
4秒前
完美世界应助777采纳,获得10
4秒前
5秒前
星辰大海应助时聿采纳,获得10
7秒前
段落落完成签到,获得积分10
7秒前
一个妮发布了新的文献求助10
7秒前
旷野发布了新的文献求助10
9秒前
10秒前
11秒前
12秒前
量子星尘发布了新的文献求助10
12秒前
13秒前
羊青丝发布了新的文献求助10
13秒前
16秒前
行一封发布了新的文献求助10
17秒前
结实抽屉完成签到,获得积分10
21秒前
树池发布了新的文献求助10
22秒前
23秒前
小矿工完成签到,获得积分20
24秒前
24秒前
3dyf发布了新的文献求助20
25秒前
26秒前
27秒前
linney0325发布了新的文献求助10
28秒前
29秒前
gua发布了新的文献求助10
30秒前
31秒前
青树柠檬完成签到 ,获得积分10
32秒前
Tik完成签到,获得积分10
34秒前
37秒前
41秒前
43秒前
量子星尘发布了新的文献求助10
43秒前
haohao完成签到 ,获得积分10
43秒前
洛苏完成签到,获得积分10
45秒前
高分求助中
【提示信息,请勿应助】请使用合适的网盘上传文件 10000
The Oxford Encyclopedia of the History of Modern Psychology 1500
Green Star Japan: Esperanto and the International Language Question, 1880–1945 800
Sentimental Republic: Chinese Intellectuals and the Maoist Past 800
The Martian climate revisited: atmosphere and environment of a desert planet 800
Parametric Random Vibration 800
Building Quantum Computers 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3864457
求助须知:如何正确求助?哪些是违规求助? 3406886
关于积分的说明 10651543
捐赠科研通 3130758
什么是DOI,文献DOI怎么找? 1726577
邀请新用户注册赠送积分活动 831814
科研通“疑难数据库(出版商)”最低求助积分说明 780039