Review Sharing via Deep Semi-Supervised Code Clone Detection

被引:10
作者
Guo, Chenkai [1 ]
Yang, Hui [1 ]
Huang, Dengrong [1 ]
Zhang, Jianwen [3 ]
Dong, Naipeng [2 ]
Xu, Jing [3 ]
Zhu, Jingwen [4 ]
机构
[1] Nankai Univ, Coll Comp Sci, Tianjin 300350, Peoples R China
[2] Natl Univ Singapore, Sch Comp, Singapore, Singapore
[3] Nankai Univ, Coll Artificial Intelligence, Tianjin 300350, Peoples R China
[4] Nankai Univ, Coll Software, Tianjin 300350, Peoples R China
关键词
Code clone; software review; deep learning; semi-supervised CNN; review sharing; NETWORK; GRAPH;
D O I
10.1109/ACCESS.2020.2966532
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Code review as a typical type of user feedback has recently drawn increasing attentions for improving code quality. To carry out research on code review, sufficient review data is normally required. As a result, recent efforts commonly focus on analysis for projects with sufficient reviews (called "sprojects''), rather than projects with extremely few ones (called "f-projects''). Actually, through statistics on public platforms, the latter ones dominate open source software, in which novel approaches should be explored to improve their review-based code improvement. In this paper, we try to address the problem via building a review sharing channel where the informative review can be reasonably delivered from s-projects to the f-projects. To ensure the accuracy of shared reviews, we introduce a novel code clone detection model based on Convolutional Neural Network (CNN), and build suitable "s-projects, f-projects'' pairs through the clone detection. Especially, to alleviate the dataset heterogeneity between the training and testing, an autoencoder-based semi-supervised learning strategy is employed. Furthermore, to improve the sharing experience, heuristic filtering tactics are applied to reduce the time cost. Meanwhile, the LDA (Latent Dirichlet Allocation)-based ranking algorithm is used for presenting diverse review themes.We have implemented the sharing channel as a prototype system RSharer+, which contains three representative modules: data preprocessing, code clone detection and review presentation. The collected datasets are first transformed into context-sensitive numerical vectors in the data proprecessing. Then in the clone detection, data vectors are trained and tested on the BigCloneBench and real code-review pairs. At last, the presentation module provides review classification and theme extraction for better sharing experience. Extensive comparative experiments on hundreds of real labelled code fragments demonstrate the precision of clone detection and the effectiveness of review sharing.
引用
收藏
页码:24948 / 24965
页数:18
相关论文
共 73 条
  • [1] Allamanis M, 2016, PR MACH LEARN RES, V48
  • [2] Allen F. E., 1970, ACM SIGPLAN NOTICES, V5, P1, DOI DOI 10.1145/390013.808479
  • [3] Combining Deep Learning with Information Retrieval to Localize Buggy Files for Bug Reports
    An Ngoc Lam
    Anh Tuan Nguyen
    Hoan Anh Nguyen
    Nguyen, Tien N.
    [J]. 2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, : 476 - 481
  • [4] [Anonymous], ARXIV170907642
  • [5] [Anonymous], ARXIV190300894
  • [6] [Anonymous], EMPIRICAL SOFTW ENG
  • [7] [Anonymous], 2017, ARXIV170407734
  • [8] [Anonymous], 1999, MODERN INFORM RETRIE
  • [9] [Anonymous], 2010, P 32 ACM IEEE INT C
  • [10] [Anonymous], P 13 AAAI C ART INT