当前位置: X-MOL 学术arXiv.cs.SE › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Towards Full-line Code Completion with Neural Language Models
arXiv - CS - Software Engineering Pub Date : 2020-09-18 , DOI: arxiv-2009.08603
Wenhan Wang, Sijie Shen, Ge Li, Zhi Jin

A code completion system suggests future code elements to developers given a partially-complete code snippet. Code completion is one of the most useful features in Integrated Development Environments (IDEs). Currently, most code completion techniques predict a single token at a time. In this paper, we take a further step and discuss the probability of directly completing a whole line of code instead of a single token. We believe suggesting longer code sequences can further improve the efficiency of developers. Recently neural language models have been adopted as a preferred approach for code completion, and we believe these models can still be applied to full-line code completion with a few improvements. We conduct our experiments on two real-world python corpora and evaluate existing neural models based on source code tokens or syntactical actions. The results show that neural language models can achieve acceptable results on our tasks, with significant room for improvements.

中文翻译:

使用神经语言模型实现全线代码完成

代码完成系统给定部分完整的代码片段,向开发人员建议未来的代码元素。代码完成是集成开发环境 (IDE) 中最有用的功能之一。目前,大多数代码完成技术一次预测一个标记。在本文中,我们进一步讨论直接完成整行代码而不是单个令牌的概率。我们相信建议更长的代码序列可以进一步提高开发人员的效率。最近神经语言模型已被用作代码补全的首选方法,我们相信这些模型仍然可以应用于全行代码补全,但有一些改进。我们在两个真实世界的 Python 语料库上进行实验,并根据源代码标记或句法动作评估现有的神经模型。结果表明,神经语言模型可以在我们的任务上取得可接受的结果,还有很大的改进空间。
更新日期:2020-09-21
down
wechat
bug