arrow
返回

Graph neural network-based long method and blob code smell detection

delete2025-07-01
delete0
delete
OA
AI
M
Minnan Zhang
J
Jingdong Jia
L
Luiz Fernando Capretz
H
Huobin Tan
DOI:10.1016/j.scico.2025.103284delete
delete原文链接
delete分享
delete收藏
查看原文
摘要

摘要

En 中文
代码异味(code smell)的概念最早于二十世纪九十年代末被提出,用于指代代码可能需要重构的信号。尽管代码异味不一定影响功能,但会阻碍程序的可理解性和未来可扩展性。因此,代码异味的精确检测已成为编码研究中的一个重要课题。然而,当前检测方法受限于数据集不平衡且与工业应用无关、代码中缺乏足够的结构和逻辑信息以及模型架构简单等问题。鉴于此,本文利用了与工业应用相关且数据充足的数据集,并开发了一种图神经网络(graph neural network)以更好地检测代码异味。首先,我们选择长方法(Long Method)和Blob作为研究对象,因为它们频繁出现且对软件可维护性产生影响。接着,我们设计了改进的模糊采样(fuzzy sampling)与focalloss相结合的方法,以解决数据不平衡问题。其次,为应对海量数据,我们提出了全局与局部注意力评分机制(global and local attention scoring mechanism),用于提取代码中的关键信息。再次,为设计专门针对代码抽象语法树(abstract syntax tree)的图神经网络,我们结合了欧几里得空间(Euclidean space)和非欧几里得空间。最后,我们将我们的方法与其他机器学习方法及深度学习方法进行了比较。结果表明,我们的方法在长方法(Long Method)和Blob检测上优于其他方法,这证明了我们提出的方法的有效性。
Keyword:
Code smell
Graph neural network
Class imbalance
Graph pooling
Hyperbolic space
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Advances in Colloid and Interface Science 封面图
Advances in Colloid and Interface Science
IF:
19.3
论文数:
2.9K
被引数:
3.0W

机构

U
Univ Autonoma Madrid
学者数:
1.3K
论文数: 673
被引数: 147
W
Western Univ
学者数:
1.0K
论文数: 838
被引数: 162
引用论文

引用论文

Automatic detection of Long Method and God Class code smells through neural source code embeddings
err2022-10-01
err25
errOAAI
errKovacevic, Aleksandar; Slivka, Jelena; Vidakovic, Dragan; Grujic, Katarina-Glorija; Luburic, Nikola; Prokic, Simona; Sladic, Goran
err分享
err收藏
Hyperbolic Pre-Trained Language Model双曲预训练语言模型
err2024-01-01
err0
PREAI
errChen, Weize; Han, Xu; Lin, Yankai; He, Kaichen; Xie, Ruobing; Zhou, Jie; Liu, Zhiyuan; Sun, Maosong
err分享
err收藏
Presumptive identification of Vibrio species with H antiserum
err1983-08-01
err0
errOAAI
errM G Tassin; R J Siebeling; N C Roberts; A D Larson
err分享
err收藏
err分享
err收藏
An exploratory study of the impact of antipatterns on class change- and fault-proneness
err2011-08-06
err291
PREAI
errKhomh, Foutse; Di Penta, Massimiliano; Gueheneuc, Yann-Gael; Antoniol, Giuliano
err分享
err收藏
DeleSmell: Code smell detection based on deep learning and latent semantic analysis
err2022-11-01
err14
PREAI
errZhang, Yang; Ge, Chuyan; Hong, Shuai; Tian, Ruili; Dong, Chunhao; Liu, Jingjing
err分享
err收藏
学者 查看更多内容