# Developer Reading Behavior While Summarizing Java Methods: Size and   Context Matters

**Authors:** Nahla J. Abid, Bonita Sharif, Natalia Dragan, Hend Alrasheed, Jonathan, I. Maletic

arXiv: 1903.03358 · 2019-03-11

## TL;DR

This study investigates how developers read and summarize Java methods within an IDE, revealing that method size and context influence their focus and summarization behavior, with experts revisiting code more frequently as size increases.

## Contribution

It introduces an eye-tracking study in an IDE environment for Java methods, highlighting how size and context affect reading patterns and summarization, which differs from prior isolated, short-method studies.

## Key findings

- Developers focus more on method body than signature.
- Revisiting control flow terms is common among developers.
- Expert revisits increase with method size.

## Abstract

An eye-tracking study of 18 developers reading and summarizing Java methods is presented. The developers provide a written summary for methods assigned to them. In total, 63 methods are used from five different systems. Previous studies on this topic use only short methods presented in isolation usually as images. In contrast, this work presents the study in the Eclipse IDE allowing access to all the source code in the system. The developer can navigate via scrolling and switching files while writing the summary. New eye-tracking infrastructure allows for this improvement in the study environment. Data collected includes eye gazes on source code, written summaries, and time to complete each summary. Unlike prior work that concluded developers focus on the signature the most, these results indicate that they tend to focus on the method body more than the signature. Moreover, both experts and novices tend to revisit control flow terms rather than reading them for a long period. They also spend a significant amount of gaze time and have higher gaze visits when they read call terms. Experts tend to revisit the body of the method significantly more frequently than its signature as the size of the method increases. Moreover, experts tend to write their summaries from source code lines that they read the most.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1903.03358/full.md

## Figures

2 figures with captions in the complete paper: https://tomesphere.com/paper/1903.03358/full.md

## References

48 references — full list in the complete paper: https://tomesphere.com/paper/1903.03358/full.md

---
Source: https://tomesphere.com/paper/1903.03358