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
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
刚刚
114555完成签到,获得积分10
刚刚
松溪乾完成签到,获得积分10
刚刚
xzx发布了新的文献求助10
刚刚
刚刚
机灵猕猴桃完成签到,获得积分10
1秒前
1秒前
1秒前
1秒前
情怀应助垃圾采纳,获得10
2秒前
Vizz发布了新的文献求助10
2秒前
赘婿应助田一采纳,获得10
2秒前
调皮从筠完成签到 ,获得积分10
3秒前
3秒前
4秒前
吴圳发布了新的文献求助10
4秒前
apeng发布了新的文献求助10
5秒前
qingqingcai发布了新的文献求助10
5秒前
鲁西西发布了新的文献求助10
5秒前
张珂发布了新的文献求助10
5秒前
Xin完成签到,获得积分10
6秒前
6秒前
7秒前
所所应助honghong采纳,获得10
7秒前
Frank发布了新的文献求助10
7秒前
mingxuan发布了新的文献求助10
9秒前
忧心的硬币应助陈三三采纳,获得30
9秒前
9秒前
荔枝吖发布了新的文献求助10
10秒前
老迟到的向日葵应助金荣采纳,获得50
10秒前
JIAO完成签到,获得积分10
10秒前
如果完成签到 ,获得积分20
10秒前
10秒前
10秒前
11秒前
11秒前
mirayq发布了新的文献求助10
11秒前
SYLH应助失眠青柏采纳,获得10
11秒前
量子星尘发布了新的文献求助30
11秒前
高分求助中
The Mother of All Tableaux Order, Equivalence, and Geometry in the Large-scale Structure of Optimality Theory 2400
Ophthalmic Equipment Market by Devices(surgical: vitreorentinal,IOLs,OVDs,contact lens,RGP lens,backflush,diagnostic&monitoring:OCT,actorefractor,keratometer,tonometer,ophthalmoscpe,OVD), End User,Buying Criteria-Global Forecast to2029 2000
A new approach to the extrapolation of accelerated life test data 1000
Cognitive Neuroscience: The Biology of the Mind 1000
Cognitive Neuroscience: The Biology of the Mind (Sixth Edition) 1000
Optimal Transport: A Comprehensive Introduction to Modeling, Analysis, Simulation, Applications 800
Official Methods of Analysis of AOAC INTERNATIONAL 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3958843
求助须知:如何正确求助?哪些是违规求助? 3505092
关于积分的说明 11122284
捐赠科研通 3236543
什么是DOI,文献DOI怎么找? 1788854
邀请新用户注册赠送积分活动 871424
科研通“疑难数据库(出版商)”最低求助积分说明 802788