Better Together? An Evaluation of AI-Supported Code Translation

Justin D. Weisz, Michael Muller, Steven I. Ross, Fernando Martinez, Stephanie Houde +3 more
2/15/2022
cs.HCcs.SE

Official code: jweisz/iui22-code-translation (2 stars, Python, MIT, last commit 2022-01-25).

Abstract

Generative machine learning models have recently been applied to source code, for use cases including translating code between programming languages, creating documentation from code, and auto-completing methods. Yet, state-of-the-art models often produce code that is erroneous or incomplete.

Show full abstract

In a controlled study with 32 software engineers, we examined whether such imperfect outputs are helpful in the context of Java-to-Python code translation. When aided by the outputs of a code translation model, participants produced code with fewer errors than when working alone. We also examined how the quality and quantity of AI translations affected the work process and quality of outcomes, and observed that providing multiple translations had a larger impact on the translation process than varying the quality of provided translations. Our results tell a complex, nuanced story about the benefits of generative code models and the challenges software engineers face when working with their outputs. Our work motivates the need for intelligent user interfaces that help software engineers effectively work with generative code models in order to understand and evaluate their outputs and achieve superior outcomes to working alone.

View on arXivView PDF

Code Implementations(1)

MIT

Companion materials for IUI'22 paper "Better Together? An Evaluation of AI-Supported Code Translation"

20Python, JavaJan 18, 20224 years agoMIT

Similar Papers

Cite this paper

@article{weisz2022better,
  title  = {Better Together? An Evaluation of AI-Supported Code Translation},
  author = {Justin D. Weisz and Michael Muller and Steven I. Ross and Fernando Martinez and Stephanie Houde and Mayank Agarwal and Kartik Talamadupula and John T. Richards},
  year   = {2022},
  eprint = {2202.07682},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.07682}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.07682.svg)](https://codeofpaper.com/paper/2202.07682)

Discussion