Clone-advisor: recommending code tokens and clone methods with deep learning and information retrieval
- Muhammad Hammad(Corresponding author),
- ,
- Hamid Abdul Basit,
- ,
- Prince Sultan University
Output:
Contribution to journal
Article
Academic
Peer-reviewOpen access
Information
Output type
Output:
Contribution to journal
Article
Academic
Peer-reviewOriginal language
EnglishArticle number
e737Journal (Volume, Issue Number)
PeerJ Computer Science (Volume 7)Publication milestones
- Published - 09/11/2021
Publication status
Published - 09/11/2021
ISSN
2376-5992Abstract
Software developers frequently reuse source code from repositories as it saves development time and effort. Code clones (similar code fragments) accumulated in these repositories represent often repeated functionalities and are candidates for reuse in an exploratory or rapid development. To facilitate code clone reuse, we previously presented DeepClone, a novel deep learning approach for modeling code clones along with non-cloned code to predict the next set of tokens (possibly a complete clone method body) based on the code written so far. The probabilistic nature of language modeling, however, can lead to code output with minor syntax or logic errors. To resolve this, we propose a novel approach called Clone-Advisor. We apply an information retrieval technique on top of DeepClone output to recommend real clone methods closely matching the predicted clone method, thus improving the original output by DeepClone. In this paper we have discussed and refined our previous work on DeepClone in much more detail. Moreover, we have quantitatively evaluated the performance and effectiveness of Clone-Advisor in clone method recommendation.
Documents and Links
Final published version, 3.29 MB
Metrics
Metrics
SciVal
FWCI
0.31
SciVal
Author count
4
SciVal
Paper percentile
41
SciVal
citations
8
Scopus
citations
8
Download statistics
Download count
252
PlumX, opens in new tab
Captures
21
Citation count
8
