Automatic detection of Long Method and God Class code smells through neural source code embeddings

代码气味 计算机科学 源代码 启发式 编码(集合论) 人工智能 机器学习 公制(单位) 代码评审 静态程序分析 软件质量 软件 程序设计语言 软件开发 运营管理 经济 集合(抽象数据类型) 操作系统
作者
Aleksandar Kovačević,Јелена Сливка,Dragan Vidaković,Katarina-Glorija Grujić,Nikola Luburić,Simona Prokić,Goran Sladić
出处
期刊:Expert Systems With Applications [Elsevier]
卷期号:204: 117607-117607 被引量:45
标识
DOI:10.1016/j.eswa.2022.117607
摘要

Code smells are structures in code that often harm its quality. Manually detecting code smells is challenging, so researchers proposed many automatic detectors. Traditional code smell detectors employ metric-based heuristics, but researchers have recently adopted a Machine-Learning (ML) based approach. This paper compares the performance of multiple ML-based code smell detection models against multiple metric-based heuristics for detection of God Class and Long Method code smells. We assess the effectiveness of different source code representations for ML: we evaluate the effectiveness of traditionally used code metrics against code embeddings (code2vec, code2seq, and CuBERT). This study is the first to evaluate the effectiveness of pre-trained neural source code embeddings for code smell detection to the best of our knowledge. This approach helped us leverage the power of transfer learning – our study is the first to explore whether the knowledge mined from code understanding models can be transferred to code smell detection. A secondary contribution of our research is the systematic evaluation of the effectiveness of code smell detection approaches on the same large-scale, manually labeled MLCQ dataset. Almost every study that proposes a detection approach tests this approach on the dataset unique for the study. Consequently, we cannot directly compare the reported performances to derive the best-performing approach.

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
量子星尘发布了新的文献求助10
1秒前
大模型应助才疏学浅采纳,获得10
1秒前
helitrope发布了新的文献求助20
2秒前
yinhao发布了新的文献求助10
2秒前
科研通AI6应助制药小兵采纳,获得10
2秒前
2秒前
lawang发布了新的文献求助10
3秒前
3秒前
ChemistryZyh完成签到,获得积分10
4秒前
4秒前
4秒前
April发布了新的文献求助10
4秒前
李健的小迷弟应助燕子采纳,获得10
5秒前
weila发布了新的文献求助30
5秒前
5秒前
6秒前
Jasper应助财源滚滚采纳,获得10
6秒前
6秒前
123应助积极的傲儿采纳,获得10
7秒前
星辰大海应助实验一定顺采纳,获得10
7秒前
wu关注了科研通微信公众号
8秒前
8秒前
耀阳完成签到 ,获得积分10
8秒前
是小孙呀发布了新的文献求助10
8秒前
8秒前
YANA完成签到,获得积分10
9秒前
zpc发布了新的文献求助30
9秒前
浮游应助真实的一鸣采纳,获得10
9秒前
四糸乃发布了新的文献求助10
10秒前
10秒前
10秒前
11秒前
11秒前
调皮的天真完成签到,获得积分10
11秒前
Blue完成签到 ,获得积分10
12秒前
hhdong发布了新的文献求助10
12秒前
酷波er应助lawang采纳,获得10
13秒前
13秒前
lvbowen发布了新的文献求助10
13秒前
14秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
List of 1,091 Public Pension Profiles by Region 1621
Les Mantodea de Guyane: Insecta, Polyneoptera [The Mantids of French Guiana] | NHBS Field Guides & Natural History 1500
Lloyd's Register of Shipping's Approach to the Control of Incidents of Brittle Fracture in Ship Structures 1000
Brittle fracture in welded ships 1000
King Tyrant 680
Linear and Nonlinear Functional Analysis with Applications, Second Edition 388
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5577678
求助须知:如何正确求助?哪些是违规求助? 4662703
关于积分的说明 14743115
捐赠科研通 4603383
什么是DOI,文献DOI怎么找? 2526334
邀请新用户注册赠送积分活动 1496100
关于科研通互助平台的介绍 1465546