一句话:提出 Overwatch,从 IDE 编辑轨迹中学习编辑序列模式,结合时间上下文预测开发者下一步编辑。
IDE 通常仅利用空间上下文(开发者当前编辑位置)生成候选编辑建议,但仅凭位置往往无法可靠预测下一步编辑,导致一个位置产生大量建议,开发者容易错过或忘记使用工具支持。本文提出 Overwatch,一种从开发者在 IDE 中的编辑轨迹里学习编辑序列模式的新技术,通过额外利用时间上下文(开发者最近执行的编辑)来生成更准确的编辑推荐。实验表明 Overwatch 达到 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.
@article{paperbot1473,
title = {Overwatch: learning patterns in code edit sequences},
author = {Yuhao Zhang and Yasharth Bajpai and Priyanshu Gupta and Ameya Ketkar and Miltiadis Allamanis and Titus Barik and Sumit Gulwani and Arjun Radhakrishna and Mohammad Raza and Gustavo Soares and Ashish Tiwari},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA2},
year = {2022},
doi = {10.1145/3563302}
}