论文标题
DeepClone:建模克隆以生成代码预测
DeepClone: Modeling Clones to Generate Code Predictions
论文作者
论文摘要
程序员通常会从源代码存储库中重新使用代码,以减少开发工作。代码克隆是在探索性或快速开发中重用的候选者,因为它们代表软件系统中经常重复的功能。为了促进代码克隆的重复使用,我们提出了DeepClone,这是一种新颖的方法,它利用深度学习算法来建模代码克隆来根据迄今为止编写的代码来预测下一组令牌(可能是完整的克隆方法主体)。预测的令牌需要最少的自定义以适合上下文。 DeepClone应用自然语言处理技术来从大型代码语料库中学习,并使用所学的模型生成代码令牌。我们已经定量评估了我们的解决方案,以评估(1)模型的质量及其在令牌预测中的准确性,以及(2)其在克隆方法预测中的性能和有效性。我们还讨论了我们方法的各种应用程序方案。
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.