DeleSmell: Code smell detection based on deep learning and latent semantic analysis

计算机科学 重构代码 人工智能 代码气味 编码(集合论) 深度学习 支持向量机 机器学习 卷积神经网络 源代码 软件 程序设计语言 软件质量 软件开发 集合(抽象数据类型)
作者
Yang Zhang,Chuyan Ge,Shuai Hong,Ruili Tian,Chunhao Dong,Jun Liu
出处
期刊:Knowledge Based Systems [Elsevier BV]
卷期号:255: 109737-109737 被引量:26
标识
DOI:10.1016/j.knosys.2022.109737
摘要

The presence of code smells will increase the risk of failure, make software difficult to maintain, and introduce potential technique debt in the future. Although many deep-learning-based approaches have been proposed to detect code smells, most existing works suffer from the problem of incomplete feature extraction and unbalanced distribution between positive samples and negative samples. Furthermore, the accuracy of existing works can be further improved. This paper proposes a novel approach named DeleSmell to detect code smells based on a deep learning model. The dataset is built by extracting samples from 24 real-world projects. To improve the imbalance in the dataset, a refactoring tool is developed to automatically transform good source code into smelly code and to generate positive samples based on real cases. DeleSmell collects both structural features through iPlasma and semantic features via latent semantic analysis and word2vec. DeleSmell’s model includes a convolutional neural network(CNN) branch and gate recurrent unit(GRU)-attention branch. The final classification is conducted by an support vector machine(SVM). In the experimentation, the effectiveness of DeleSmell is evaluated by answering seven research questions. The experimental results show that DeleSmell improves the accuracy of brain class (BC) and brain method (BM) code smells detection by up to 4.41% compared with existing approaches, demonstrating the effectiveness of our approach.
最长约 10秒,即可获得该文献文件

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

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
整齐荟完成签到,获得积分10
刚刚
领导范儿应助威武的元冬采纳,获得30
4秒前
4秒前
junjun2011完成签到,获得积分10
6秒前
Dasha完成签到,获得积分10
6秒前
充电宝应助puzi采纳,获得10
8秒前
LiuLiu发布了新的文献求助10
9秒前
深情安青应助昏睡的绿海采纳,获得10
9秒前
10秒前
大大的西瓜完成签到 ,获得积分10
14秒前
华仔应助XYN1采纳,获得10
15秒前
15秒前
A阿澍发布了新的文献求助30
15秒前
丘比特应助TMX采纳,获得10
17秒前
19秒前
量子星尘发布了新的文献求助10
20秒前
22秒前
无奈满天发布了新的文献求助10
25秒前
25秒前
25秒前
26秒前
27秒前
28秒前
zhou269完成签到,获得积分10
30秒前
在逃公主许翠花完成签到,获得积分10
30秒前
littleblack发布了新的文献求助10
31秒前
TMX发布了新的文献求助10
31秒前
31秒前
DaiTing发布了新的文献求助10
31秒前
32秒前
简单点发布了新的文献求助10
32秒前
华仔应助无奈满天采纳,获得10
32秒前
fjejj发布了新的文献求助10
33秒前
sisi发布了新的文献求助10
34秒前
华仔完成签到,获得积分10
36秒前
华仔应助特梅头采纳,获得10
38秒前
39秒前
无奈满天完成签到,获得积分10
40秒前
yyuu完成签到,获得积分10
43秒前
高分求助中
A new approach to the extrapolation of accelerated life test data 1000
ACSM’s Guidelines for Exercise Testing and Prescription, 12th edition 500
‘Unruly’ Children: Historical Fieldnotes and Learning Morality in a Taiwan Village (New Departures in Anthropology) 400
Indomethacinのヒトにおける経皮吸収 400
Phylogenetic study of the order Polydesmida (Myriapoda: Diplopoda) 370
基于可调谐半导体激光吸收光谱技术泄漏气体检测系统的研究 350
Robot-supported joining of reinforcement textiles with one-sided sewing heads 320
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3988920
求助须知:如何正确求助?哪些是违规求助? 3531290
关于积分的说明 11253247
捐赠科研通 3269903
什么是DOI,文献DOI怎么找? 1804830
邀请新用户注册赠送积分活动 882027
科研通“疑难数据库(出版商)”最低求助积分说明 809052