DeepClone: Modeling Clones to Generate Code Predictions

07/22/2020
by   Muhammad Hammad, et al.
0

During software development, programmers often tend to reuse the code for common functionalities, available in other source code repositories. This activity helps them to reduce time and effort to develop code, instead of building it from scratch. Code clones are candidates for reuse in an exploratory or rapid development, as they represent often repeated functionality in software systems. To facilitate code clone reuse, we propose a novel approach, Deep-Clone, where we utilize a deep learning algorithm for modeling code clones and predicting the next possible set of tokens (up to the cloned method body) based on the user input so far. The generated predictions aim to potentially help developers to write code rapidly with minimum tuning of values later on. DeepClone applies natural language processing techniques to learn from a large code corpus (the BigCloneBench dataset), and generates code tokens (full clone methods where applicable) 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. With a high quality and accurate model as the foundation, we further discuss scenarios for exploiting our approach.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/02/2020

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

Software developers frequently reuse source code from repositories as it...
research
06/06/2021

Clone-Seeker: Effective Code Clone Search Using Annotations

Source code search plays an important role in software development, e.g....
research
04/16/2020

Optimising the Fit of Stack Overflow Code Snippets into Existing Code

Software developers often reuse code from online sources such as Stack O...
research
04/10/2020

Sequence Model Design for Code Completion in the Modern IDE

Code completion plays a prominent role in modern integrated development ...
research
07/31/2018

Sourcerer's Apprentice and the study of code snippet migration

On the worldwide web, not only are webpages connected but source code is...
research
08/03/2021

An Empirical Study on the Usage of Transformer Models for Code Completion

Code completion aims at speeding up code writing by predicting the next ...
research
08/04/2022

On-the-Fly Syntax Highlighting using Neural Networks

With the presence of online collaborative tools for software developers,...

Please sign up or login with your details

Forgot password? Click here to reset