arrow
返回

Multilingual code refactoring detection based on deep learning

delete2024-12-01
delete0
PRE
AI
T
Tao Li
张杨 封面图
张杨 (Yang Zhang) *
DOI:10.1016/j.eswa.2024.125164delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Refactoring is a critical process of improving the internal structure of the source code without altering its external behavior. Existing deep learning-based refactoring detection relies on commit messages to extract features. However, these commit messages are not trustful enough since some developers do not consistently record refactoring activities. Furthermore, current approaches are designed for a single programming language and lack multilingual refactoring support. To this end, this paper proposes RefT5, , a multilingual code refactoring detection approach based on deep learning. Firstly, we select 110 real-world projects with Java and Python programming languages as a corpus to construct the dataset. Secondly, we extract features including commit messages, code changes, and refactoring types from these projects. RefT5 generates edit sequences from code changes and takes refactoring types as labels. Thirdly, we employ CodeT5 and BiLSTM-attention to extract semantic and structural features and generate feature vectors. Finally, the feature vectors are input into a classification layer to detect the refactoring type. The experimental results show that RefT5 obtains 98.05% precision and 97.77% recall. Furthermore, compared with existing approaches, it improves precision by 51.61% and recall by 52.9% on average, demonstrating its effectiveness.
Keyword:
Refactoring detection
Deep learning
Code change
Multilingual code
Edit sequence

期刊

Expert Systems with Applications 封面图
Expert Systems with Applications
IF:
7.5
论文数:
2.9W
被引数:
10.2W

机构

暂无机构信息
引用论文

引用论文

err分享
err收藏
Late Stalinist Russia
err
IF0
err2006-09-27
err0
PREAI
errJuliane Fürst
err分享
err收藏
Cooperative Path-Planning for Multi-Vehicle Systems
err2014-11-17
err0
errOAAI
errQichen Wang; Chris Phillips
err分享
err收藏
A novel selective naive Bayes algorithm一种新的选择性朴素贝叶斯算法
err2020-03-01
err183
PREAI
errChen, Shenglei; Webb, Geoffrey I.; Liu, Linyuan; Ma, Xin
err分享
err收藏
CoreGen: Contextualized Code Representation Learning for Commit Message Generation
err2021-10-01
err25
errOAAI
errNie, Lun Yiu; Gao, Cuiyun; Zhong, Zhicong; Lam, Wai; Liu, Yang; Xu, Zenglin
err分享
err收藏
err分享
err收藏
err分享
err收藏
学者 查看更多内容