{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,27]],"date-time":"2026-06-27T01:56:58Z","timestamp":1782525418450,"version":"3.54.5"},"reference-count":49,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2019,10,10]],"date-time":"2019-10-10T00:00:00Z","timestamp":1570665600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2019,10,10]]},"abstract":"<jats:p>When working with a document, users often perform context-specific repetitive edits \u2013 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 \u2013 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 \u2013 it allows the \u201dplug-and-play\u201d 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 \u2013 C# and SQL code, markdown documents, and spreadsheets \u2013 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.<\/jats:p>","DOI":"10.1145\/3360569","type":"journal-article","created":{"date-parts":[[2019,10,11]],"date-time":"2019-10-11T14:53:33Z","timestamp":1570805613000},"page":"1-29","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":37,"title":["On the fly synthesis of edit suggestions"],"prefix":"10.1145","volume":"3","author":[{"given":"Anders","family":"Miltner","sequence":"first","affiliation":[{"name":"Princeton University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Sumit","family":"Gulwani","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Vu","family":"Le","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Alan","family":"Leung","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Arjun","family":"Radhakrishna","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Gustavo","family":"Soares","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ashish","family":"Tiwari","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Abhishek","family":"Udupa","sequence":"additional","affiliation":[{"name":"Microsoft, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2019,10,10]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2008.44"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/2351676.2351753"},{"key":"e_1_2_2_3_1","unstructured":"CommonMark. 2019. CommonMark MarkDown Specification. (2019). At https:\/\/commonmark.org\/ .  CommonMark. 2019. CommonMark MarkDown Specification. (2019). At https:\/\/commonmark.org\/ ."},{"key":"e_1_2_2_4_1","unstructured":"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."},{"key":"e_1_2_2_5_1","volume-title":"At https:\/\/www.eclipse.org\/","author":"Foundation Eclipse","year":"2019"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2702123.2702551"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737977"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1232420.1232424"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.5555\/2337223.2337250"},{"key":"e_1_2_2_10_1","unstructured":"GNU Emacs. 2019. Repeat Commands. https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/efaq\/Repeating-commands. html . Accessed: 04\/03\/2019.  GNU Emacs. 2019. Repeat Commands. https:\/\/www.gnu.org\/software\/emacs\/manual\/html_node\/efaq\/Repeating-commands. html . Accessed: 04\/03\/2019."},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926423"},{"key":"e_1_2_2_12_1","volume-title":"At https:\/\/www.jetbrains.com\/idea\/","author":"J.","year":"2019"},{"key":"e_1_2_2_13_1","volume-title":"At https:\/\/www.jetbrains.com\/resharper\/","year":"2019"},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2007.30"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2009.5070531"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2393596.2393655"},{"key":"e_1_2_2_17_1","unstructured":"Tessa Lau. 2001. Programming by Demonstration: a Machine Learning Approach.  Tessa Lau. 2001. Programming by Demonstration: a Machine Learning Approach."},{"key":"e_1_2_2_18_1","unstructured":"Tessa Lau. 2008. Why PBD systems fail: Lessons learned for usable AI.  Tessa Lau. 2008. Why PBD systems fail: Lessons learned for usable AI."},{"key":"e_1_2_2_19_1","volume-title":"Weld","author":"Lau Tessa","year":"2001"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/2666356.2594333"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2738002"},{"key":"e_1_2_2_22_1","unstructured":"H. Lieberman. 2001. Your Wish Is My Command: Programming by Example. Morgan Kaufmann.  H. Lieberman. 2001. Your Wish Is My Command: Programming by Example. Morgan Kaufmann."},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/1094811.1094840"},{"key":"e_1_2_2_24_1","volume-title":"Proceedings of the 32Nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI \u201911)","author":"Meng Na"},{"key":"e_1_2_2_25_1","volume-title":"Proceedings of the 35th International Conference on Software Engineering (ICSE \u201913)","author":"Meng Na"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2004.1265817"},{"key":"e_1_2_2_27_1","unstructured":"Microsoft. 2019a. Create or run a macro. https:\/\/support.office.com\/en-us\/article\/Create-or-run-a-macro-C6B99036-905C-49A6-818A-DFB98B7C3C9C . Accessed: 04\/03\/2019.  Microsoft. 2019a. Create or run a macro. https:\/\/support.office.com\/en-us\/article\/Create-or-run-a-macro-C6B99036-905C-49A6-818A-DFB98B7C3C9C . Accessed: 04\/03\/2019."},{"key":"e_1_2_2_28_1","volume-title":"At https:\/\/products.office.com\/en-us\/powerpoint","author":"PowerPoint Microsoft","year":"2019"},{"key":"e_1_2_2_29_1","volume-title":"At https:\/\/products.office.com\/en-us\/word","author":"Word Microsoft","year":"2019"},{"key":"e_1_2_2_30_1","unstructured":"Microsoft. 2019d. Refactoring source code in Visual Studio Code. (2019). At https:\/\/code.visualstudio.com\/docs\/editor\/ refactoring#_code-actions-quick-fixes-and-refactorings .  Microsoft. 2019d. Refactoring source code in Visual Studio Code. (2019). At https:\/\/code.visualstudio.com\/docs\/editor\/ refactoring#_code-actions-quick-fixes-and-refactorings ."},{"key":"e_1_2_2_31_1","volume-title":"At https:\/\/www.visualstudio.com","author":"Studio Visual","year":"2019"},{"key":"e_1_2_2_32_1","volume-title":"Myers","author":"Miller Robert C.","year":"2002"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328279.1328280"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2009.5070529"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568317"},{"key":"e_1_2_2_36_1","volume-title":"2013 28th IEEE\/ACM International Conference on Automated Software Engineering (ASE). 180\u2013190","author":"Nguyen H. A."},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1869459.1869486"},{"key":"e_1_2_2_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276520"},{"key":"e_1_2_2_40_1","volume-title":"2012 9th IEEE Working Conference on Mining Software Repositories (MSR). 40\u201349","author":"Park J."},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814310"},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/2594291.2594321"},{"key":"e_1_2_2_43_1","volume-title":"At https:\/\/www.w3schools.com\/xml\/xpath_intro.asp","author":"Data Refsnes","year":"2019"},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.44"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-31424-7_44"},{"key":"e_1_2_2_46_1","unstructured":"Stack Exchange. 2019. How to programmatically edit all hyperlinks in a Word document? https:\/\/stackoverflow.com\/q\/ 3355266 . Accessed: 04\/03\/2019.  Stack Exchange. 2019. How to programmatically edit all hyperlinks in a Word document? https:\/\/stackoverflow.com\/q\/ 3355266 . Accessed: 04\/03\/2019."},{"key":"e_1_2_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/2351676.2351726"},{"key":"e_1_2_2_48_1","unstructured":"Vim. 2019. Macros. https:\/\/vim.fandom.com\/wiki\/Macros . Accessed: 04\/03\/2019.  Vim. 2019. Macros. https:\/\/vim.fandom.com\/wiki\/Macros . Accessed: 04\/03\/2019."},{"key":"e_1_2_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/3187009.3177735"},{"key":"e_1_2_2_50_1","volume-title":"International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=BJl6AjC5F7","author":"Yin Pengcheng"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3360569","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3360569","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T23:22:59Z","timestamp":1750202579000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3360569"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,10,10]]},"references-count":49,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2019,10,10]]}},"alternative-id":["10.1145\/3360569"],"URL":"https:\/\/doi.org\/10.1145\/3360569","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,10,10]]},"assertion":[{"value":"2019-10-10","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}