On the fly synthesis of edit suggestions

Author:

Miltner Anders1,Gulwani Sumit2,Le Vu2,Leung Alan2,Radhakrishna Arjun2,Soares Gustavo2,Tiwari Ashish2,Udupa Abhishek2

Affiliation:

1. Princeton University, USA

2. Microsoft, USA

Abstract

When working with a document, users often perform context-specific repetitive edits – changes to the document that are similar but specific to the contexts at their locations. Programming by demonstration/examples (PBD/PBE) systems automate these tasks by learning programs to perform the repetitive edits from demonstration or examples. However, PBD/PBE systems are not widely adopted, mainly because they require modal UIs – users must enter a special mode to give the demonstration/examples. This paper presents Blue-Pencil, a modeless system for synthesizing edit suggestions on the fly. Blue-Pencil observes users as they make changes to the document, silently identifies repetitive changes, and automatically suggests transformations that can apply at other locations. Blue-Pencil is parameterized – it allows the ”plug-and-play” of different PBE engines to support different document types and different kinds of transformations. We demonstrate this parameterization by instantiating Blue-Pencil to several domains – C# and SQL code, markdown documents, and spreadsheets – using various existing PBE engines. Our evaluation on 37 code editing sessions shows that Blue-Pencil synthesized edit suggestions with a precision of 0.89 and a recall of 1.0, and took 199 ms to return suggestions on average. Finally, we report on several improvements based on feedback gleaned from a field study with professional programmers to investigate the use of Blue-Pencil during long code editing sessions. Blue-Pencil has been integrated with Visual Studio IntelliCode to power the IntelliCode refactorings feature.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference49 articles.

1. Generic Patch Inference

2. Semantic patch inference

3. CommonMark. 2019. CommonMark MarkDown Specification. (2019). At https://commonmark.org/ . CommonMark. 2019. CommonMark MarkDown Specification. (2019). At https://commonmark.org/ .

4. Allen Cypher (Ed.). 1993. Watch What I Do: Programming by Demonstration. MIT Press. Allen Cypher (Ed.). 1993. Watch What I Do: Programming by Demonstration. MIT Press.

Cited by 35 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. CodePlan: Repository-Level Coding using LLMs and Planning;Proceedings of the ACM on Software Engineering;2024-07-12

2. Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Example;Proceedings of the ACM on Software Engineering;2024-07-12

3. Syntactic Code Search with Sequence-to-Tree Matching: Supporting Syntactic Search with Incomplete Code Fragments;Proceedings of the ACM on Programming Languages;2024-06-20

4. A Lightweight Polyglot Code Transformation Language;Proceedings of the ACM on Programming Languages;2024-06-20

5. Multiverse Notebook: Shifting Data Scientists to Time Travelers;Proceedings of the ACM on Programming Languages;2024-04-29

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3