Loading…
CloneRipples: predicting change propagation between code clone instances by graph-based deep learning
Code clones are recognized as a code smell that may require additional effort for simultaneous changes of multiple clone instances during software maintenance. To alleviate quality threats caused by inconsistent changes in clone instances, it is essential to accurately and efficiently make the decis...
Saved in:
Published in: | Empirical software engineering : an international journal 2025-02, Vol.30 (1), p.14, Article 14 |
---|---|
Main Authors: | , , , , , , |
Format: | Article |
Language: | English |
Subjects: | |
Citations: | Items that this one cites |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | Code clones are recognized as a code smell that may require additional effort for simultaneous changes of multiple clone instances during software maintenance. To alleviate quality threats caused by inconsistent changes in clone instances, it is essential to accurately and efficiently make the decisions of change propagation between code clone instances. Our exploratory study has revealed that a clone class can have both propagation-required changes and propagation-free changes and thus fine-grained change propagation decisions are required. Based on the findings, we propose a graph-based deep learning approach to predict the change propagation requirements of clone instances. We design a deep learning model that employs a Relational Graph Convolutional Network (R-GCN) to predict the clone change propagation requirement. In order to evaluate our approach, we construct a dataset that includes 24,672 pairs of
matched
changes and 38,041
non-matched
changes based on 51 open-source Java projects. Experiment results show that the approach achieves high precision (83.1%), recall (81.2%), and F1-score (82.1%). We implemented an IntelliJ IDEA tool called CloneRipples to assist developers to decide the necessity of change propagation between code clone instances seamlessly in development environment. Manual inspection identified the chances for purifying the dataset by rectifying the data labels of
non-matched
changes. Extended experiments for various data purification strategies reveal feasible ways to improve the prediction effectiveness and generality. |
---|---|
ISSN: | 1382-3256 1573-7616 |
DOI: | 10.1007/s10664-024-10567-0 |