Skip to main content
QUICK REVIEW

[Paper Review] Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programming

Hussein Mozannar, Gagan Bansal|arXiv (Cornell University)|Oct 25, 2022
Software Engineering ResearchComputer Science21 citations
TL;DR

The paper introduces CodeRec User Programming States (CUPS), a taxonomy of programmer activities with Copilot, and provides a labeled data study and metrics to analyze interaction costs and interface design implications.

ABSTRACT

Code-recommendation systems, such as Copilot and CodeWhisperer, have the potential to improve programmer productivity by suggesting and auto-completing code. However, to fully realize their potential, we must understand how programmers interact with these systems and identify ways to improve that interaction. To seek insights about human-AI collaboration with code recommendations systems, we studied GitHub Copilot, a code-recommendation system used by millions of programmers daily. We developed CUPS, a taxonomy of common programmer activities when interacting with Copilot. Our study of 21 programmers, who completed coding tasks and retrospectively labeled their sessions with CUPS, showed that CUPS can help us understand how programmers interact with code-recommendation systems, revealing inefficiencies and time costs. Our insights reveal how programmers interact with Copilot and motivate new interface designs and metrics.

Motivation & Objective

  • Develop a taxonomy (CUPS) of programmer activities when interacting with code-recommendation systems like Copilot.
  • Collect and publicize a labeled dataset of coding sessions annotated with CUPS and video data.
  • Propose an instrument to measure and analyze patterns in user behavior and time costs during AI-assisted programming.

Proposed method

  • Developed CUPS taxonomy of 12 states based on pilot interactions and segment types (User Typing or Paused, User Before Action).
  • Collected telemetry from Copilot during 21 developers' sessions (3137 labeled segments, 1024 suggestions) and had participants retrospectively label segments via a dedicated tool.
  • Designed and used a labeling instrument to annotate telemetry segments with CUPS states and analyzed state dwell times and transitions to quantify interaction costs.
  • Conducted task-varied analysis to examine acceptance rates, state-time distribution, and differences by task and coder experience.
  • Provided public code and data repository for reproducing the labeling and analyses.

Experimental results

Research questions

  • RQ1What activities do programmers perform when interacting with AI-driven code recommendations (Copilot)?
  • RQ2How much time do programmers spend in Copilot-related states, and which states dominate interaction costs?
  • RQ3How do acceptance rates and CUPS state distributions vary by programming task and programmer expertise?
  • RQ4What interface insights or design changes can reduce interaction costs and improve productivity with CodeRec?

Key findings

  • Verifying suggestions is the most time-consuming activity, averaging 22.4% of session time across participants.
  • Writing new functionality is the second most time-consuming Copilot-related state, averaging 14.05% of session time.
  • Copilot-related states (Verifying, Deferring Thought, Waiting, Prompt Crafting, Editing Suggestion) account for 51.4% of average session time.
  • Acceptance rates vary by task, with data manipulation showing lower acceptance (24.8%) and boilerplate/code-writing tasks showing higher acceptance (41.9%).
  • Experience with programming and prior Copilot use correlate with higher acceptance rates (more experienced: ~30% vs less experienced: ~38%; prior Copilot users: ~38% vs non-users: ~29%).
  • Deferring thought is common, indicating users often accept suggestions to inspect later or with highlighting, rather than immediate verification.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.