English

NaturalEdit: Code Modification through Direct Interaction with Adaptive Natural Language Representation

Human-Computer Interaction 2026-04-03 v2 Software Engineering

Abstract

Code modification requires developers to comprehend code, plan changes, articulate intent, and validate outcomes, making it cognitively demanding. While natural language (NL) code summaries offer a promising external representation of this process, existing approaches remain limited. Systems grounded in exploratory data analysis are restricted to narrow domains, while general-purpose systems enforce fixed NL representations and assume that developers can directly translate vague intent into precise textual edits. We present NaturalEdit, which treats NL code summaries as interactive representations tightly linked to source code. Grounded in the Cognitive Dimensions of Notations, NaturalEdit introduces three key features: (1) adaptive, multi-faceted code summaries with a flexible Abstraction Gradient; (2) interactive mapping mechanisms between summaries and code that ensure tight, structurally stable Closeness of Mapping; and (3) intent-driven bidirectional synchronization that reduces Viscosity during editing while preserving Visibility and Consistency through incremental diffs. A technical evaluation confirms the viability of NaturalEdit, and a user study with 20 developers shows that it improves comprehension, intent articulation, and validation while increasing developers' confidence and sense of control.

Keywords

Cite

@article{arxiv.2510.04494,
  title  = {NaturalEdit: Code Modification through Direct Interaction with Adaptive Natural Language Representation},
  author = {Ningzhi Tang and David Meininger and Gelei Xu and Yiyu Shi and Yu Huang and Collin McMillan and Toby Jia-Jun Li},
  journal= {arXiv preprint arXiv:2510.04494},
  year   = {2026}
}
R2 v1 2026-07-01T06:18:31.316Z