Please use this identifier to cite or link to this item:
doi:10.22028/D291-47833 | Title: | The effect of comments on program comprehension: an eye tracking study |
| Author(s): | Abdelsalam, Youssef Peitek, Norman Bergum, Annabelle Apel, Sven |
| Language: | English |
| Title: | Empirical Software Engineering |
| Volume: | 31 |
| Issue: | 4 |
| Publisher/Platform: | Springer Nature |
| Year of Publication: | 2026 |
| Free key words: | Program comprehension Code comments Eye tracking Software engineering |
| DDC notations: | 004 Computer science, internet |
| Publikation type: | Journal Article |
| Abstract: | Programmers rely on code documentation and comments to understand source code, with program comprehension tasks consuming a significant portion of development time. De spite their importance, the impact of comments on program comprehension remains debat ed. Our study addresses this gap by investigating the influence of comments on program comprehension. Employing a mixed-methods approach, we conducted an eye-tracking study involving 20 computer science students to explore the influence of code comments on program comprehension. By analyzing both quantitative and qualitative data, we aim at comprehensively assessing the influence of comments on various aspects of program comprehension. The quantitative data collected consists of behavioral metrics assessing program comprehension in terms of correctness and response time, along with gaze data providing insights into visual attention, linearity of reading order, and gaze strategies. This was complemented by the participants’ ratings on the perceived difficulty and contribution of comments. Additionally, we gathered participants’ experiences through a post-question naire, enriching the analysis with qualitative insights into the effectiveness of comments, navigation strategies, and overall experiences with comments. Our findings reveal that the effect of comments on supporting program comprehension varies significantly across code snippets, ranging from a 30% decrease to a 34% increase in performance. Comments significantly guide visual attention, accounting for up to 23% of fixations, and promoted a more linear reading approach. Participants predominantly adhered to a “code-first” strat egy. Moreover, comments were rated positively for clarifying complex segments of code and contributing to program comprehension. However, this favorable perception did not consistently translate into improved performance or reduced perceived difficulty across snippets. Based on our findings, we propose avenues for future research, including com parative studies on automated versus human-generated comments and the development of predictive models for assessing comment usefulness. |
| DOI of the first publication: | 10.1007/s10664-025-10721-2 |
| URL of the first publication: | https://doi.org/10.1007/s10664-025-10721-2 |
| Link to this record: | urn:nbn:de:bsz:291--ds-478332 hdl:20.500.11880/41829 http://dx.doi.org/10.22028/D291-47833 |
| ISSN: | 1573-7616 1382-3256 |
| Date of registration: | 13-May-2026 |
| Faculty: | MI - Fakultät für Mathematik und Informatik |
| Department: | MI - Informatik |
| Professorship: | MI - Prof. Dr. Sven Apel |
| Collections: | SciDok - Der Wissenschaftsserver der Universität des Saarlandes |
Files for this record:
| File | Description | Size | Format | |
|---|---|---|---|---|
| s10664-025-10721-2.pdf | 6,24 MB | Adobe PDF | View/Open |
This item is licensed under a Creative Commons License

