REMS: Recommending Extract Method Refactoring Opportunities via Multi-view Representation of Code Property Graph

重构代码 计算机科学 人工智能 机器学习 启发式 编码(集合论) 图形 软件 数据挖掘 程序设计语言 理论计算机科学 集合(抽象数据类型) 操作系统
作者
Di Cui,Qiangqiang Wang,Siqi Wang,Jianlei Chi,Jianan Li,Lu Wang,Qingshan Li
标识
DOI:10.1109/icpc58990.2023.00034
摘要

Extract Method is one of the most frequently performed refactoring operations for the decomposition of large and complex methods, which can also be combined with other refactoring operations to remove a variety of design flaws. Several Extract Method refactoring tools have been proposed based on the quantification of extraction criteria. To the best of our knowledge, state-of-the-art related techniques can be broadly divided into two categories: the first line is non-machine-learning-based approaches built on heuristics, and the second line is machine learning-based approaches built on historical data. Most of these approaches characterize the extraction criteria by deriving software metrics from fine-grained code properties. However, in most cases, these metrics can be challenging to concretize, and their selections and thresholds also largely rely on expert knowledge. Thus, in this paper, we propose an approach to automatically recommend Extract Method refactoring opportunities named REMS via mining multi-view representations from code property graph. We fuse various representations together using compact bilinear pooling and further train machine learning classifiers to guide the extraction of suitable lines of code as new method. We evaluate our approach on two publicly available datasets. The results show that our approach outperforms five state-of-the-art refactoring tools including GEMS, JExtract, SEMI, JDeodorant, and Segmentation in effectiveness and usefulness. Our approach demonstrates an increase of 29% in precision, 15% in recall, and 23% in f1-measure. The results also unveil practical suggestions and provide new insights that benefit additional extract-related refactoring techniques.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
大幅提高文件上传限制,最高150M (2024-4-1)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
思源应助可可杨采纳,获得10
刚刚
刚刚
1秒前
candy7c发布了新的文献求助10
1秒前
巴拉巴拉完成签到,获得积分10
2秒前
斯文败类应助Yuu采纳,获得10
2秒前
111发布了新的文献求助20
2秒前
打打应助123采纳,获得10
2秒前
小狄完成签到,获得积分10
2秒前
3秒前
3秒前
WW发布了新的文献求助10
4秒前
GuMingyang完成签到,获得积分10
4秒前
Jony完成签到,获得积分10
4秒前
搜集达人应助陈皮糖不酸采纳,获得10
5秒前
树池发布了新的文献求助30
6秒前
酷波er应助云铱梦令采纳,获得10
6秒前
6秒前
充电宝应助啊脏zz采纳,获得10
7秒前
7秒前
宁少爷应助centlay采纳,获得50
9秒前
9秒前
10秒前
candy7c完成签到 ,获得积分10
10秒前
10秒前
jessicazhong发布了新的文献求助10
11秒前
dy发布了新的文献求助20
11秒前
11秒前
NexusExplorer应助mw采纳,获得10
11秒前
w王w完成签到,获得积分10
12秒前
可可杨发布了新的文献求助10
12秒前
13秒前
搞怪绿柳发布了新的文献求助10
13秒前
ruanyh给ruanyh的求助进行了留言
14秒前
15秒前
16秒前
林夕发布了新的文献求助10
16秒前
铮铮完成签到,获得积分10
17秒前
sunyuice发布了新的文献求助10
18秒前
ZX完成签到,获得积分10
18秒前
高分求助中
Shape Determination of Large Sedimental Rock Fragments 2000
Sustainability in Tides Chemistry 2000
Wirkstoffdesign 1000
Rechtsphilosophie 1000
Bayesian Models of Cognition:Reverse Engineering the Mind 888
A Dissection Guide & Atlas to the Rabbit 600
Very-high-order BVD Schemes Using β-variable THINC Method 568
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 基因 遗传学 催化作用 物理化学 免疫学 量子力学 细胞生物学
热门帖子
关注 科研通微信公众号,转发送积分 3129103
求助须知:如何正确求助?哪些是违规求助? 2779953
关于积分的说明 7745314
捐赠科研通 2435069
什么是DOI,文献DOI怎么找? 1293897
科研通“疑难数据库(出版商)”最低求助积分说明 623472
版权声明 600542