An Open Source Interactive Visual Analytics Tool for Comparative Programming Comprehension

Ayush Kumar, Ashish Kumar, Aakanksha Prasad, Michael Burch, Shenghui Cheng, Klaus MuellerarXiv 2022 · DOI

Abstract

Understanding the cognitive processes involved in program comprehension remains a significant challenge in software engineering. This paper presents an open-source visual analytics tool designed to facilitate the comparative analysis of eye-tracking data. By overlaying scanpaths directly onto source code and providing benchmarking capabilities, the tool allows researchers to distinguish between the visual strategies of experts and novices. Validation using the EMIP dataset demonstrates the tool's effectiveness in identifying critical gaze patterns associated with successful comprehension.

Introduction

Deciphering how a programmer's mind processes code is often described as a "black box" problem. While traditional assessments can measure the outcome of comprehension through tests, they fail to capture the procedural "how." Eye-tracking technology offers a non-invasive window into these cognitive processes, yet the resulting spatio-temporal data is often massive and difficult to interpret. Existing analysis tools frequently lack the interactivity required to link gaze points back to specific code stimuli effectively. To address this, we developed a web-based visual analytics platform that enables researchers to filter, aggregate, and compare gaze patterns across varying expertise levels.

System Design and Methodology

The tool is built on a modern web stack using React and Recharts.org, leveraging D3.js for robust data visualization. A primary technical hurdle was managing the scale of eye-tracking data; raw datasets can exceed 2GB. We implemented a pre-processing pipeline that reduces this volume to a manageable 2.3MB JSON format through normalization and strategic data sampling.

The integrated visual analytics dashboard displaying scanpath overlays, code stimulus, and participant metadata.

Users can visualize "scanpaths"—the chronological path of eye movements—using various line functions such as monotone or orthogonal "step" lines to minimize visual clutter. The interface supports interactive filtering, allowing researchers to switch between different code snippets (e.g., Java or Python) and adjust sampling rates (from 1Hz to 5Hz) to balance between high-level overviews and granular detail.

Comparative Benchmarking and Metadata

A core feature of the platform is the "Benchmark Toggle." This allows for the simultaneous display of a "current" participant's gaze against a high-performing "benchmark" expert. By comparing these paths, researchers can pinpoint exactly where a novice's attention diverges from successful strategies. The tool integrates rich metadata, including age, gender, and programming experience, to contextualize these differences.

Comparison of participant metadata, allowing researchers to contrast novice and expert profiles side-by-side.

Results and Discussion

Validation using the Eye Movements In Programming (EMIP) dataset, which includes data from 216 programmers, revealed distinct "expert" gaze behaviors. Experts tend to focus on logic-dense areas such as constructors and member function bodies, whereas underperforming participants often miss critical sections entirely. For instance, in a "Rectangle" class task, the tool highlighted that successful participants thoroughly investigated object instantiation, while novices often glanced at peripheral functions before failing the comprehension check.

While the tool demonstrates high scalability and utility for strategic analysis, it remains in a developmental phase. Future work will focus on improving the user interface for non-experts and adding automated clustering for gaze patterns.

Conclusion

This open-source tool provides a scalable, interactive solution for the complex task of eye-tracking analysis in programming. By bridging the gap between raw gaze data and source code stimuli, it offers a powerful means for researchers to decode the visual strategies that underpin successful software comprehension.

Summary updated

BibTeX
@misc{kumar2022open,
  author = {Ayush Kumar and Ashish Kumar and Aakanksha Prasad and Michael Burch and Shenghui Cheng and Klaus Mueller},
  title = {{An Open Source Interactive Visual Analytics Tool for Comparative Programming Comprehension}},
  year = {2022},
  eprint = {2208.00102},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.00102},
}
Figure