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]
卷期号: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.

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

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
壮观青雪关注了科研通微信公众号
刚刚
1秒前
黄健丰发布了新的文献求助10
1秒前
罗肥肥完成签到,获得积分10
2秒前
压力是多的完成签到,获得积分10
2秒前
3秒前
5秒前
6秒前
Cellchang发布了新的文献求助10
6秒前
娷静完成签到 ,获得积分10
6秒前
感动冰海完成签到 ,获得积分10
6秒前
6秒前
温婉的涫完成签到,获得积分20
6秒前
无极微光应助无风采纳,获得20
7秒前
7秒前
7秒前
完美世界应助萌仔采纳,获得10
8秒前
鲤鱼平安完成签到,获得积分10
8秒前
明亮不弱完成签到 ,获得积分10
9秒前
小陈发布了新的文献求助10
10秒前
科研通AI2S应助威武的之桃采纳,获得10
10秒前
冲破天际完成签到,获得积分20
11秒前
11秒前
long完成签到,获得积分10
11秒前
董倍儿瘦发布了新的文献求助10
12秒前
梅溪湖的提词器完成签到,获得积分10
12秒前
qq完成签到,获得积分10
14秒前
初夏完成签到,获得积分10
14秒前
zxyhb完成签到,获得积分10
16秒前
16秒前
量子星尘发布了新的文献求助10
16秒前
Hey完成签到 ,获得积分10
17秒前
耍酷的冷雪完成签到,获得积分10
17秒前
18秒前
CipherSage应助水123采纳,获得10
18秒前
xrkxrk完成签到 ,获得积分0
19秒前
安云野完成签到,获得积分10
19秒前
20秒前
21秒前
玛琪玛小姐的狗完成签到,获得积分10
22秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Clinical Microbiology Procedures Handbook, Multi-Volume, 5th Edition 临床微生物学程序手册,多卷,第5版 2000
人脑智能与人工智能 1000
King Tyrant 720
Silicon in Organic, Organometallic, and Polymer Chemistry 500
Peptide Synthesis_Methods and Protocols 400
Principles of Plasma Discharges and Materials Processing, 3rd Edition 400
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5603597
求助须知:如何正确求助?哪些是违规求助? 4688619
关于积分的说明 14854949
捐赠科研通 4694087
什么是DOI,文献DOI怎么找? 2540895
邀请新用户注册赠送积分活动 1507124
关于科研通互助平台的介绍 1471806