TLDR: This research investigates how software developers interact with Amazon’s CodeWhisperer, an AI code-generation tool. Through two user studies and a custom telemetry plugin, the researchers identified four key behavioral patterns: incremental code refinement, explicit instruction via natural language comments, using model suggestions for baseline structuring, and integrating external sources. The study also found that the retention rate of CodeWhisperer’s suggestions increased with task difficulty and user familiarity, highlighting developers’ evolving trust and reliance on AI assistance.
The rise of AI-powered code generation tools is transforming how software developers work. A recent study, titled Cracking CodeWhisperer: Analyzing Developers’ Interactions and Patterns During Programming Tasks, delves into how developers engage with Amazon’s CodeWhisperer, an advanced AI assistant designed to generate code within their Integrated Development Environments (IDEs). Conducted by researchers from the University of British Columbia and the Federal University of Pará, this study offers crucial insights into the evolving relationship between developers and AI.
The research team, including Jeena Javahar, Tanya Budhrani, Manaal Basha, Cleidson R. B. de Souza, Ivan Beschastnikh, and Gema Rodr´ıguez-P´erez, aimed to understand the detailed interaction patterns that emerge when developers use CodeWhisperer and to quantify how much of the AI’s suggestions are actually retained in the final code.
Unpacking Developer Behavior
To achieve their goals, the researchers conducted two user studies. The first involved observing 10 participants using CodeWhisperer, capturing initial insights into user behaviors. Building on this, a second study with 10 new participants utilized a custom-built tool called CodeWatcher. This VSCode plugin meticulously logged low-level interaction data, such as keystrokes, text insertions, and deletions, providing a granular view of developer actions.
Through a mixed-methods analysis of this rich data, four distinct behavioral patterns emerged:
-
Incremental Code Refinement: Developers frequently accepted partial code suggestions, like completing a comment or a function definition, and then refined these portions to fit their specific needs. This shows a collaborative, iterative approach rather than blind acceptance.
-
Explicit Instruction Using Natural Language Comments: Participants often used natural language comments with clear command words such as “Create,” “Write,” or “Make” to guide CodeWhisperer. This highlights a deliberate strategy to prompt the AI, distinct from comments made for self-documentation.
-
Baseline Structuring with Model Suggestions: Users sometimes accepted suggestions that were syntactically correct but not precisely what they intended to write, using them as a starting point or a structural baseline before making their own modifications.
-
Integrative Use with External Sources: When CodeWhisperer’s suggestions fell short, developers were observed shifting their focus away from the IDE to consult external resources like Stack Overflow or other AI tools, demonstrating a pragmatic approach to problem-solving.
The Evolving Trust in AI Suggestions
A significant finding of the study relates to the retention of CodeWhisperer’s suggestions. The research revealed a clear trend: as tasks became more challenging and participants gained more familiarity with the tool, the proportion of AI-generated content they retained in their final submissions increased.
For natural language comments, the retention rate jumped from 38% in basic tasks to a remarkable 88% in more complex ones. Similarly, code line retention rose from 39% to 66%. This suggests that developers developed a growing confidence in CodeWhisperer’s capabilities, increasingly relying on its output to reduce cognitive load and streamline their work.
Also Read:
- CodeWatcher: A New Tool for Unpacking Developer Interactions with AI Code Generation
- AI’s Role in Software Teams: Boosting Collaboration and Productivity
Implications for Future AI Tools
The insights from this study offer valuable guidance for developers of AI code generation tools. Understanding these behavioral patterns can lead to tools that better support incremental refinement, allow for easier customization of suggestions, and even integrate with trusted external sources to provide more accurate and context-aware assistance. The study also emphasizes the importance of capturing developers’ guiding comments to preserve the design rationale behind AI-generated code.
While the study provides a detailed look into developer interactions, the researchers acknowledge limitations such as a small sample size and the inference of AI-generated code. Future work will explore the long-term impact of AI tools on skill development and how usage patterns and trust vary across diverse developer demographics.


