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)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
感动的煜城完成签到,获得积分10
1秒前
务实的以松完成签到,获得积分10
2秒前
4秒前
4秒前
tlotw41完成签到,获得积分10
5秒前
dingz完成签到,获得积分0
5秒前
6秒前
Irissun完成签到,获得积分10
6秒前
大大完成签到,获得积分10
7秒前
今后应助蛋黄酥酥采纳,获得20
7秒前
tan126391完成签到,获得积分10
8秒前
Cyuan完成签到,获得积分20
8秒前
浮游应助科研通管家采纳,获得10
9秒前
科研通AI2S应助科研通管家采纳,获得20
9秒前
Ava应助科研通管家采纳,获得10
9秒前
9秒前
李爱国应助科研通管家采纳,获得10
9秒前
搜集达人应助科研通管家采纳,获得10
9秒前
Jiangtao应助科研通管家采纳,获得10
9秒前
Ava应助科研通管家采纳,获得10
9秒前
Rez完成签到,获得积分10
9秒前
万能图书馆应助科研通管家采纳,获得100
9秒前
Jiangtao应助科研通管家采纳,获得10
9秒前
浮游应助科研通管家采纳,获得10
9秒前
6666应助科研通管家采纳,获得10
9秒前
LX应助科研通管家采纳,获得10
9秒前
脑洞疼应助科研通管家采纳,获得10
9秒前
9秒前
JamesPei应助科研通管家采纳,获得10
10秒前
浮游应助科研通管家采纳,获得50
10秒前
ldh应助科研通管家采纳,获得10
10秒前
彭于晏应助科研通管家采纳,获得10
10秒前
大个应助科研通管家采纳,获得10
10秒前
科研通AI2S应助科研通管家采纳,获得10
10秒前
10秒前
10秒前
hhhh完成签到,获得积分10
10秒前
wanci应助Anaturez采纳,获得10
11秒前
梁jj发布了新的文献求助10
11秒前
Aria_chao发布了新的文献求助10
11秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
List of 1,091 Public Pension Profiles by Region 1561
Specialist Periodical Reports - Organometallic Chemistry Organometallic Chemistry: Volume 46 1000
Current Trends in Drug Discovery, Development and Delivery (CTD4-2022) 800
Foregrounding Marking Shift in Sundanese Written Narrative Segments 600
Holistic Discourse Analysis 600
Beyond the sentence: discourse and sentential form / edited by Jessica R. Wirth 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 纳米技术 计算机科学 内科学 化学工程 复合材料 物理化学 基因 遗传学 催化作用 冶金 量子力学 光电子学
热门帖子
关注 科研通微信公众号,转发送积分 5525150
求助须知:如何正确求助?哪些是违规求助? 4615463
关于积分的说明 14548366
捐赠科研通 4553496
什么是DOI,文献DOI怎么找? 2495334
邀请新用户注册赠送积分活动 1475898
关于科研通互助平台的介绍 1447659