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)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
lrq完成签到,获得积分10
2秒前
古月发布了新的文献求助10
2秒前
3秒前
五六七发布了新的文献求助10
5秒前
5秒前
css1997完成签到 ,获得积分10
7秒前
无限飞丹完成签到,获得积分10
7秒前
小饭完成签到,获得积分10
7秒前
Cl1audia发布了新的文献求助10
8秒前
所所应助木可采纳,获得10
8秒前
Gyro完成签到,获得积分10
10秒前
隐形曼青应助lzx采纳,获得10
10秒前
11秒前
体贴紫完成签到,获得积分10
12秒前
12秒前
12秒前
13秒前
五六七完成签到,获得积分10
13秒前
13秒前
liz_发布了新的文献求助10
14秒前
新xin发布了新的文献求助10
15秒前
CodeCraft应助111111111采纳,获得10
16秒前
汉堡包应助秋天里的水采纳,获得10
17秒前
量子星尘发布了新的文献求助10
17秒前
Gyro发布了新的文献求助50
17秒前
慕青应助keyun采纳,获得10
17秒前
体贴紫发布了新的文献求助10
17秒前
18秒前
Dr.Who发布了新的文献求助10
19秒前
20秒前
深情安青应助科研通管家采纳,获得10
20秒前
彭于晏应助科研通管家采纳,获得10
20秒前
搜集达人应助科研通管家采纳,获得10
20秒前
顾矜应助科研通管家采纳,获得10
20秒前
华仔应助科研通管家采纳,获得10
20秒前
Owen应助科研通管家采纳,获得10
20秒前
科研通AI2S应助科研通管家采纳,获得10
21秒前
赘婿应助科研通管家采纳,获得10
21秒前
Ava应助科研通管家采纳,获得10
21秒前
21秒前
高分求助中
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小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3989444
求助须知:如何正确求助?哪些是违规求助? 3531531
关于积分的说明 11254250
捐赠科研通 3270191
什么是DOI,文献DOI怎么找? 1804901
邀请新用户注册赠送积分活动 882105
科研通“疑难数据库(出版商)”最低求助积分说明 809174