Score: 2

Do Comments and Expertise Still Matter? An Experiment on Programmers' Adoption of AI-Generated JavaScript Code

Published: March 14, 2025 | arXiv ID: 2503.11453v2

By: Changwen Li, Christoph Treude, Ofir Turel

Potential Business Impact:

Helps coders use AI suggestions by adding comments.

Business Areas:
Natural Language Processing Artificial Intelligence, Data and Analytics, Software

This paper investigates the factors influencing programmers' adoption of AI-generated JavaScript code recommendations within the context of lightweight, function-level programming tasks. It extends prior research by (1) utilizing objective (as opposed to the typically self-reported) measurements for programmers' adoption of AI-generated code and (2) examining whether AI-generated comments added to code recommendations and development expertise drive AI-generated code adoption. We tested these potential drivers in an online experiment with 173 programmers. Participants were asked to answer some questions to demonstrate their level of development expertise. Then, they were asked to solve a LeetCode problem without AI support. After attempting to solve the problem on their own, they received an AI-generated solution to assist them in refining their solutions. The solutions provided were manipulated to include or exclude AI-generated comments (a between-subjects factor). Programmers' adoption of AI-generated code was gauged by code similarity between AI-generated solutions and participants' submitted solutions, providing a behavioral measurement of code adoption behaviors. Our findings revealed that, within the context of function-level programming tasks, the presence of comments significantly influences programmers' adoption of AI-generated code regardless of the participants' development expertise.

Country of Origin
πŸ‡ΈπŸ‡¬ πŸ‡¦πŸ‡Ί Singapore, Australia

Repos / Data Links

Page Count
40 pages

Category
Computer Science:
Software Engineering