Augmenting Machine Learning with Information Retrieval to Recommend Real Cloned Code Methods for Code Completion

Muhammad Hammad, Önder Babur, Hamid Abdul Basit

Research output: Contribution to journalArticleAcademic

6 Downloads (Pure)

Abstract

Software developers frequently reuse source code from repositories as it saves development time and effort. Code clones accumulated in these repositories hence represent often repeated functionalities and are candidates for reuse in an exploratory or rapid development. In previous work, we introduced DeepClone, a deep neural network model trained by fine tuning GPT-2 model over the BigCloneBench dataset to predict code clone methods. The probabilistic nature of DeepClone output generation can lead to syntax and logic errors that requires manual editing of the output for final reuse. In this paper, we propose a novel approach of applying an information retrieval (IR) technique on top of DeepClone output to recommend real clone methods closely matching the predicted output. We have quantitatively evaluated our strategy, showing that the proposed approach significantly improves the quality of recommendation.
Original languageEnglish
JournalarXiv
Publication statusPublished - 2 Oct 2020

Keywords

  • cs.SE

Fingerprint Dive into the research topics of 'Augmenting Machine Learning with Information Retrieval to Recommend Real Cloned Code Methods for Code Completion'. Together they form a unique fingerprint.

Cite this