arrow
Return

Multilingual code refactoring detection based on deep learning

delete2024-12-01
delete0
PRE
AI
T
Tao Li
张杨 cover
张杨 (Yang Zhang) *
DOI:10.1016/j.eswa.2024.125164delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

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.
Keywords:
Refactoring detection
Deep learning
Code change
Multilingual code
Edit sequence
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
errShare
errSave
Detecting and refactoring code smells in spreadsheet formulas
err2014-02-07
err38
PREAI
errHermans, Felienne; Pinzger, Martin; van Deursen, Arie
errShare
errSave
Deep Learning Based Code Smell Detection
err2021-01-01
err79
PREAI
errLiu, Hui; Jin, Jiahao; Xu, Zhifeng; Zou, Yanzhen; Bu, Yifan; Zhang, Lu
errShare
errSave
Monitor-Based Instant Software Refactoring
err2013-08-01
err40
PREAI
errLiu, Hui; Guo, Xue; Shao, Weizhong
errShare
errSave
Enhancing code smell classification with code refactoring-based data augmentation
err2026-09-01
err0
PREAI
errAli Nizam; Musa Aydin; Ertugrul Islamoglu; Shaaban Sahmoud; Samil Bilal Ozaydin
errShare
errSave
Refactoring Inspection Support for Manual Refactoring Edits
err2018-04-01
err17
errOAAI
errAlves, Everton L. G.; Song, Myoungkyu; Massoni, Tiago; Machado, Patricia D. L.; Kim, Miryung
errShare
errSave

Journal

Expert Systems with Applications cover
Expert Systems with Applications
IF:
7.5
Papers:
3.1W
Citations:
13.6W

Organization

No organization information available
Cited Papers

Cited Papers

Late Stalinist Russia
err
IF0
err2006-09-27
err0
PREAI
errJuliane Fürst
errShare
errSave
Cooperative Path-Planning for Multi-Vehicle Systems
err2014-11-17
err0
errOAAI
errQichen Wang; Chris Phillips
errShare
errSave
The Effectiveness of Supervised Machine Learning Algorithms in Predicting Software Refactoring
err2022-04-01
err40
errOAAI
errAniche, Mauricio; Maziero, Erick; Durelli, Rafael; Durelli, Vinicius H. S.
errShare
errSave
A novel selective naive Bayes algorithm
err2020-03-01
err183
PREAI
errChen, Shenglei; Webb, Geoffrey I.; Liu, Linyuan; Ma, Xin
errShare
errSave
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
errShare
errSave
errShare
errSave
How We Refactor, and How We Know It
err2012-01-01
err327
PREAI
errMurphy-Hill, Emerson; Parnin, Chris; Black, Andrew P.
errShare
errSave
researcher View more