SEJul 22, 2020

DeepClone: Modeling Clones to Generate Code Predictions

arXiv:2007.11671v215 citations
AI Analysis

This addresses code reuse for programmers in exploratory or rapid development, but it is incremental as it applies existing NLP techniques to a new domain.

The paper tackles the problem of code reuse by proposing DeepClone, a deep learning approach that models code clones to predict the next set of tokens or complete method bodies based on existing code, achieving quantitative evaluation of model quality and accuracy.

Programmers often reuse code from source code repositories to reduce the development effort. Code clones are candidates for reuse in exploratory or rapid development, as they represent often repeated functionality in software systems. To facilitate code clone reuse, we propose DeepClone, a novel approach utilizing a deep learning algorithm for modeling code clones to predict the next set of tokens (possibly a complete clone method body) based on the code written so far. The predicted tokens require minimal customization to fit the context. DeepClone applies natural language processing techniques to learn from a large code corpus, and generates code tokens using the model learned. We have quantitatively evaluated our solution to assess (1) our model's quality and its accuracy in token prediction, and (2) its performance and effectiveness in clone method prediction. We also discuss various application scenarios for our approach.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes