首页> 外文期刊>Automated software engineering >Code completion of multiple keywords from abbreviated input
【24h】

Code completion of multiple keywords from abbreviated input

机译:缩写输入中多个关键字的代码完成

获取原文
获取原文并翻译 | 示例

摘要

Abbreviation Completion is a novel technique to improve the efficiency of code-writing by supporting code completion of multiple keywords based on non-predefined abbreviated input—a different approach from conventional code completion that finds one keyword at a time based on an exact character match. Abbreviated input consisting of abbreviated keywords and non-alphanumeric characters between each abbreviated keyword (e.g. pb st nm) is expanded into a full expression (e.g. public String name) by a Hidden Markov Model learned from a corpus of existing code and abbreviation examples. The technique does not require the user to memorize abbreviations and provides incremental feedback of the most likely completions. In addition to code completion by disabbreviation of multiple keywords, abbreviation completion supports prediction of the next keywords and non-alphanumeric characters of a code completion candidate, a technique called code completion by extrapolation. The system finds the most likely next keywords and non-alphanumeric characters using an n-gram model of programming language. This enables a code completion scenario in which a user first types a short abbreviated expression to complete the beginning part of a desired full expression and then uses the extrapolation feature to complete the remaining part without further typing. This paper presents the algorithm for abbreviation completion, integrated with a new user interface for multiple-keyword code completion. We tested the system by sampling 4919 code lines from open source projects and found that more than 99% of the code lines could be resolved from acronym-like abbreviations. The system could also extrapolate code completion candidates to complete the next one or two keywords with the accuracy of 96% and 82%, respectively. A user study of code completion by disabbreviation found 30% reduction in time usage and 41% reduction of keystrokes over conventional code completion.
机译:缩写完成是一种新颖的技术,可通过基于未预定义的缩写输入支持多个关键字的代码完成来提高代码编写的效率,这与传统的代码完成方法不同,传统的代码完成方法是基于精确的字符匹配一次查找一个关键字。由隐式马尔可夫模型从现有代码和缩写示例的语料库中学习,将由缩写关键字和每个缩写关键字之间的非字母数字字符(例如pb st nm)组成的缩写输入扩展为完整表达式(例如public String name)。该技术不需要用户记住缩写,并提供最可能完成的增量反馈。除了通过缩写多个关键字完成代码之外,缩写完成还支持预测下一个关键字和代码完成候选的非字母数字字符,该技术称为通过外推进行代码完成。系统使用n-gram编程语言模型查找最可能的下一个关键字和非字母数字字符。这使代码完成方案能够使用户首先键入一个简短的缩写表达式来完成所需完整表达式的开始部分,然后使用外推功能来完成其余部分而无需进一步键入。本文介绍了缩写词完成算法,并与新的用户界面集成以实现多关键字代码完成。我们通过对来自开放源代码项目的4919条代码行进行采样对系统进行了测试,发现可以通过类似首字母缩写的缩写来解析超过99%的代码行。系统还可以推断出代码完成候选者,以分别以96%和82%的准确性完成下一个或两个关键字。一项通过缩写进行代码完成的用户研究发现,与传统代码完成相比,时间使用减少了30%,击键次数减少了41%。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号