reCode : A Lightweight Find-and-Replace Interaction in the IDE for Transforming Code by Example
Wode Ni, Joshua Sunshine, Vu Le, Sumit Gulwani, Titus Barik
Abstract
Software developers frequently confront a recurring challenge of making code transformations—similar but not entirely identical code changes in many places—in their integrated development environments. Through formative interviews (n = 7), we found that developers were aware of many tools intended to help with code transformations, but often made their changes manually because these tools required too much expertise or effort to be able to use effectively. To address these needs, we built an extension for Visual Studio Code, called reCode. reCode improves the familiar find-and-replace experience by allowing the developer to specify a straightforward search term to identify relevant locations, and then demonstrate their intended changes by simply typing a change directly in the editor. Using programming by example, reCode automatically learns a more general code transformation and displays these transformations as before-and-after differences inline, with clickable actions to interactively accept, reject, or refine the proposed changes. In our usability evaluation (n = 12), developers reported that this mixed-initiative, example-driven experience is intuitive, complements their existing workflow, and offers a unified approach to conveniently tackle a variety of common yet frustrating scenarios for code transformations.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 625e2822-aac7-47d2-a412-c1dc434263deCited by top-tier papers7
- Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 citations
- SemanticOn: Specifying Content-Based Semantic Conditions for Web Automation ProgramsKevin Pu, Rainey Fu, Rui Dong, Xinyu Wang et al.UIST 2022 · 16 citations
- MELT: Mining Effective Lightweight Transformations from Pull RequestsDaniel Ramos, Hailie Mitchell, Inês Lynce, Vasco Manquinho et al.ASE 2023 · 6 citations
- FFL: A Language and Live Runtime for Styling and Labeling Typeset Math FormulasZhiyuan Wu, Jiening Li, Kevin Ma, Hita Kambhamettu et al.UIST 2023 · 5 citations
- DiLogics: Creating Web Automation Programs with Diverse LogicsKevin Pu, Jim Yang, Angel Yuan, Minyi Ma et al.UIST 2023 · 5 citations
Builds on2
- Wrex: A Unified Programming-by-Example Interaction for Synthesizing Readable Code for Data ScientistsIan Drosos, Titus Barik, Philip J. Guo, Robert DeLine et al.CHI 2020 · 110 citations
- Feedback-driven semi-supervised synthesis of program transformationsXiang Gao, Shraddha Barke, Arjun Radhakrishna, Gustavo Soares et al.OOPSLA 2020 · 17 citations
Related papers
- Meta-Manager: A Tool for Collecting and Exploring Meta Information about CodeAmber Horvath, Andrew Macvean, Brad A. MyersCHI 2024 · 13 citations
- Coeditor: Leveraging Repo-level Diffs for Code Auto-editingJiayi Wei, Greg Durrett, Isil DilligICLR 2024 · 5 citations
- Sporq: An Interactive Environment for Exploring Code using Query-by-ExampleAaditya Naik, Jonathan Mendelson, Nathaniel Sands, Yuepeng Wang et al.UIST 2021 · 11 citations
- SPINFER: Inferring Semantic Patches for the Linux KernelLucas Serrano, Van-Anh Nguyen, Ferdian Thung, Lingxiao Jiang et al.USENIX ATC 2020 · 16 citations
- PYEVOLVE: Automating Frequent Code Changes in Python ML SystemsMalinda Dilhara, Danny Dig, Ameya KetkarICSE 2023 · 46 citations
