Programmer Visual Attention During Context-Aware Code Summarization
Robert Wallace, Aakash Bansal, Zachary Karas, Ningzhi Tang, Yu Huang,, Toby Jia-Jun Li, Collin McMillan

TL;DR
This study investigates how programmers visually focus on source code when creating summaries, revealing patterns in attention that could inform better automatic summarization tools.
Contribution
The paper provides empirical insights into programmer attention patterns during context-aware code summarization using eye-tracking data from Java programmers.
Findings
Programmers read fewer words and revisit less as they progress, maintaining summary quality.
More source code viewed correlates with higher quality summaries up to a threshold.
Programmers focus mainly on same-class methods, less on call graph methods.
Abstract
Abridged: Programmer attention represents the visual focus of programmers on parts of the source code in pursuit of programming tasks. We conducted an in-depth human study with 10 Java programmers, where each programmer generated summaries for 40 methods from five large Java projects over five one-hour sessions. We used eye-tracking equipment to map the visual attention of programmers while they wrote the summaries. We also rate the quality of each summary. We found eye-gaze patterns and metrics that define common behaviors between programmer attention during context-aware code summarization. Specifically, we found that programmers need to read significantly (p<0.01) fewer words and make significantly (p<0.03) fewer revisits to words as they summarize more methods during a session, while maintaining the quality of summaries. We also found that the amount of source code a participant…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Advanced Software Engineering Methodologies
