一句话:通过眼动追踪分析代码摘要时程序员对函数调用图的视觉注意,发现调用图覆盖越高,摘要质量与信心反而越低。
该论文研究代码摘要任务中程序员的视觉注意与函数调用图上下文之间的关系。以往工作多关注单个功能单元,难以理解项目级代码理解,而真实方法常嵌入复杂项目上下文。作者提出基于图的度量(如遍历深度与覆盖率)来分析调用图的视觉注意覆盖,并重新分析既有眼动数据集(n=10),同时按相同流程新建数据集(n=12),共记录88小时源代码上的视觉行为。他们用这些度量考察参与者的视觉策略与摘要质量及摘要信心的相关性。令人意外的是,调用图覆盖率越高,摘要质量与参与者信心反而越低。
This paper studies programmer visual attention on code as it relates to underlying function call graphs during code summarization. Programmer visual attention refers to where people look when performing a software engineering task, and code summarization is the task of writing a natural language description about a section of source code. Prior work has studied programmers’ visual attention during code summarization, with the vast majority of research effort placed on details in single functional units of code. There have not been any techniques developed to understand code comprehension at the project level due to the difficulty of this task, despite the nature of most real-world methods as embedded within complex project context. This paper focuses on the visual attention paid to the call graph context in which a method sits. We analyze visual attention coverage of call graphs with graph-based metrics, such as the depth that programmers traverse or the amount of coverage they attain. We use these metrics, among other means, to reevaluate an existing dataset from a previous eye-tracking study of programmers (n = 10) that considered basic properties of programmer visual attention in a project context. We then created a new dataset (n = 12) using the same procedures specifically for this paper, resulting in a total of 88 hours of recorded visual behavior on source code. We used our proposed metrics to analyze how participants’ visual strategies correlated with their code summary quality, and confidence in their summaries. Interestingly, we found that higher coverage of the call graph was associated with decreases in both summary quality and participants’ confidence.
DOI 原文 ·
@inproceedings{paperbot9418,
title = {Programmers’ Visual Attention on Function Call Graphs During Code Summarization},
author = {Samantha McLoughlin and Zachary Karas and Robert Wallace and Aakash Bansal and Collin McMillan and Yu Huang},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00089}
}