Code smell is a great challenge in software refactoring, which indicates latent design or implementation flaws that may degrade the software maintainability and evolution. Over the past decades, a variety of refactoring approaches have been proposed, which can be broadly classified into metrics-based, rule-based, and machine learning-based approaches. Recent years, deep learning-based approaches have also attracted widespread attention. However, existing techniques exhibit various limitations. Metrics- and rule-based approaches rely heavily on manually defined heuristics and thresholds, whereas deep learning-based approaches are often constrained by dataset availability and model design. In this study, we proposed a graph-based deep learning approach for code smell refactoring. Specifically, we designed two types of input graphs (class-level and method-level) and employed both graph classification and node classification tasks to address the refactoring of three representative code smells: long method, large class, and feature envy. In our experiment, we propose a semi-automated dataset generation approach that could generate a large-scale dataset with minimal manual effort. We implemented the proposed approach with three classical GNN (graph neural network) architectures: GCN, GraphSAGE, and GAT, and evaluated its performance against both traditional and state-of-the-art deep learning approaches. The results demonstrate that proposed approach achieves superior refactoring performance.


翻译:暂无翻译

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
编码计算研究综述
专知会员服务
22+阅读 · 2021年10月26日
专知会员服务
37+阅读 · 2021年10月16日
【2020新书】如何认真写好的代码和软件,318页pdf
专知会员服务
66+阅读 · 2020年3月26日
《代码整洁之道》:5大基本要点
专知会员服务
50+阅读 · 2020年3月3日
【Manning新书】高级算法与数据结构,769页pdf
【Code】GraphSAGE 源码解析
AINLP
31+阅读 · 2020年6月22日
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
实战 | 源码入门之Faster RCNN
计算机视觉life
19+阅读 · 2019年4月16日
React Native 分包哪家强?看这文就够了!
程序人生
13+阅读 · 2019年1月16日
【干货】深入理解自编码器(附代码实现)
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
7+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
13+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
6+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
11+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关VIP内容
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
编码计算研究综述
专知会员服务
22+阅读 · 2021年10月26日
专知会员服务
37+阅读 · 2021年10月16日
【2020新书】如何认真写好的代码和软件,318页pdf
专知会员服务
66+阅读 · 2020年3月26日
《代码整洁之道》:5大基本要点
专知会员服务
50+阅读 · 2020年3月3日
相关资讯
【Manning新书】高级算法与数据结构,769页pdf
【Code】GraphSAGE 源码解析
AINLP
31+阅读 · 2020年6月22日
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
实战 | 源码入门之Faster RCNN
计算机视觉life
19+阅读 · 2019年4月16日
React Native 分包哪家强?看这文就够了!
程序人生
13+阅读 · 2019年1月16日
【干货】深入理解自编码器(附代码实现)
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员