Predicting Change Propagation between Code Clone Instances by Graph-based Deep Learning

被引:1
|
作者
Hu, Bin [1 ,2 ]
Wu, Yijian [1 ,2 ]
Peng, Xin [1 ,2 ]
Sha, Chaofeng [1 ]
Wang, Xiaochen [1 ]
Fu, Baiqiang [1 ]
Zhao, Wenyun [1 ,2 ]
机构
[1] Fudan Univ, Sch Comp Sci, Shanghai, Peoples R China
[2] Shanghai Key Lab Data Sci, Shanghai, Peoples R China
基金
中国国家自然科学基金;
关键词
CONSISTENCY; PRONENESS; TRACKING;
D O I
10.1145/3524610.3527766
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code clones widely exist in open-source and industrial software projects and are still recognized as a threat to software maintenance due to the additional effort required for the simultaneous maintenance of multiple clone instances and potential defects caused by inconsistent changes in clone instances. To alleviate the threat, it is essential to accurately and efficiently make the decisions of change propagation between clone instances. Based on an exploratory study on clone change propagation with five famous open-source projects, we find that a clone class can have both propagation-required changes and propagation-free changes and thus fine-grained change propagation decision is required. Based on the findings, we propose a graph-based deep learning approach to predict the change propagation requirements of clone instances. We develop a graph representation, named Fused Clone Program Dependency Graph (FC-PDG), to capture the textual and structural code contexts of a pair of clone instances along with the changes on one of them. Based on the representation, we design a deep learning model that uses a Relational Graph Convolutional Network (R-GCN) to predict the change propagation requirement. We evaluate the approach with a dataset constructed based on 51 open-source Java projects, which includes 24,672 pairs of matched changes and 38,041 non-matched changes. The results show that the approach achieves high precision (83.1%), recall (81.2%), and F1-score (82.1%). Our further evaluation with three other open-source projects confirms the generality of the trained clone change propagation prediction model.
引用
收藏
页码:425 / 436
页数:12
相关论文
共 50 条
  • [1] Graph-based code semantics learning for efficient semantic code clone detection
    Yu, Dongjin
    Yang, Quanxin
    Chen, Xin
    Chen, Jie
    Xu, Yihang
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2023, 156
  • [2] Assessing Graph-based Deep Learning Models for Predicting Flash Point
    Sun, Xiaoyu
    Krakauer, Nathaniel J.
    Politowicz, Alexander
    Chen, Wei-Ting
    Li, Qiying
    Li, Zuoyi
    Shao, Xianjia
    Sunaryo, Alfred
    Shen, Mingren
    Wang, James
    Morgan, Dane
    [J]. MOLECULAR INFORMATICS, 2020, 39 (06)
  • [3] Graph-Based Active Learning Based on Label Propagation
    Long, Jun
    Yin, Jianping
    Zhao, Wentao
    Zhu, En
    [J]. MODELING DECISIONS FOR ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2008, 5285 : 179 - 190
  • [4] Graph-based deep learning for graphics classification
    Riba, Pau
    Dutta, Anjan
    Llados, Josep
    Fornes, Alicia
    [J]. 2017 14TH IAPR INTERNATIONAL CONFERENCE ON DOCUMENT ANALYSIS AND RECOGNITION (ICDAR 2017), VOL 2, 2017, : 29 - 30
  • [5] CogCol: Code Graph-Based Contrastive Learning Model for Code Summarization
    Shi, Yucen
    Yin, Ying
    Yu, Mingqian
    Chu, Liangyu
    [J]. ELECTRONICS, 2024, 13 (10)
  • [6] Low-Complexity Code Clone Detection using Graph-based Neural Networks
    Liu, Hu
    Zhao, Hui
    Han, Changhao
    Hou, Lu
    [J]. 2022 18TH INTERNATIONAL CONFERENCE ON MOBILITY, SENSING AND NETWORKING, MSN, 2022, : 797 - 802
  • [7] Graph-based deep learning for communication networks: A survey
    Jiang, Weiwei
    [J]. COMPUTER COMMUNICATIONS, 2022, 185 : 40 - 54
  • [8] Graph-based Deep Learning Analysis and Instance Selection
    Nonaka, Keisuke
    Shekkizhar, Sarath
    Ortega, Antonio
    [J]. 2020 IEEE 22ND INTERNATIONAL WORKSHOP ON MULTIMEDIA SIGNAL PROCESSING (MMSP), 2020,
  • [9] A survey on graph-based deep learning for computational histopathology
    Ahmedt-Aristizabal, David
    Armin, Mohammad Ali
    Denman, Simon
    Fookes, Clinton
    Petersson, Lars
    [J]. COMPUTERIZED MEDICAL IMAGING AND GRAPHICS, 2022, 95
  • [10] Graph-based Deep Learning in Natural Language Processing
    Vashishth, Shikhar
    Yadati, Naganand
    Talukdar, Partha
    [J]. PROCEEDINGS OF THE 7TH ACM IKDD CODS AND 25TH COMAD (CODS-COMAD 2020), 2020, : 371 - 372