论文标题

守望先锋:代码编辑序列中的学习模式

Overwatch: Learning Patterns in Code Edit Sequences

论文作者

Zhang, Yuhao, Bajpai, Yasharth, Gupta, Priyanshu, Ketkar, Ameya, Allamanis, Miltiadis, Barik, Titus, Gulwani, Sumit, Radhakrishna, Arjun, Raza, Mohammad, Soares, Gustavo, Tiwari, Ashish

论文摘要

集成开发环境(IDE)提供工具支持,以使许多源代码编辑任务自动化。传统上,IDE仅使用空间上下文,即开发人员编辑的位置来生成候选人编辑建议。但是,仅空间上下文通常不足以自信地预测开发人员的下一个编辑,因此IDE在某个位置会产生许多建议。因此,IDE通常不会主动提供建议,而是需要单击特定图标或菜单,然后从大量潜在建议列表中进行选择。结果,开发人员通常会错过使用工具支持的机会,因为他们不知道它存在或忘记使用它。 为了更好地理解开发人员行为中的常见模式并产生更好的编辑建议,我们还可以使用时间上下文,即开发人员最近执行的编辑。为了启用基于时间上下文的编辑建议,我们提出了《守望先锋》,这是一种从IDE中执行的开发人员编辑痕迹学习编辑序列模式的新颖技术。我们的实验表明,守望先锋的精度为78%,守望先锋不仅完成了开发人员错过使用IDE工具支持的机会,而且还预测了在IDE中没有工具支持的新编辑。

Integrated Development Environments (IDEs) provide tool support to automate many source code editing tasks. Traditionally, IDEs use only the spatial context, i.e., the location where the developer is editing, to generate candidate edit recommendations. However, spatial context alone is often not sufficient to confidently predict the developer's next edit, and thus IDEs generate many suggestions at a location. Therefore, IDEs generally do not actively offer suggestions and instead, the developer is usually required to click on a specific icon or menu and then select from a large list of potential suggestions. As a consequence, developers often miss the opportunity to use the tool support because they are not aware it exists or forget to use it. To better understand common patterns in developer behavior and produce better edit recommendations, we can additionally use the temporal context, i.e., the edits that a developer was recently performing. To enable edit recommendations based on temporal context, we present Overwatch, a novel technique for learning edit sequence patterns from traces of developers' edits performed in an IDE. Our experiments show that Overwatch has 78% precision and that Overwatch not only completed edits when developers missed the opportunity to use the IDE tool support but also predicted new edits that have no tool support in the IDE.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源