reCode: A Lightweight Find-and-Replace Interaction in the IDE for Transforming Code by Example

Human-LLM CollaborationComputational Methods in HCISoftware Engineers & DevelopersUI/UX Designers

Software developers frequently confront a recurring challenge of making systematic 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 study (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.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/uist/61336/2021

AdRecommended

Learn AI Coding at CodeNow

open_in_newOpen DOI Link
DOI: https://doi.org/10.1145/3472749.3474748
At a Glance

Paper Snapshot

fact_check
dataset
Source
UIST
calendar_month
Year
2021
emoji_events
Award
No award tagged
group
Authors
5 authors
sell
Subtopics
Human-LLM Collaboration, Computational Methods in HCI
work
Professions
Software Engineers & Developers, UI/UX Designers
article
Content Status
Abstract only
hub
Related Papers
10 related papers