Programmers spend a substantial fraction of their debugging time by navigating
through source code, yet little is known about how programmers navigate. With the
continuing growth in size and complexity of software, this fraction of time is likely to
increase, which presents challenges to those seeking both to understand and address
the needs of programmers during debugging.
Therefore, we investigated the applicability a theory from another domain, namely
information foraging theory, to the problem of programmers' navigation during
software maintenance. The goal was to determine the theory's ability to provide a
foundational understanding that could inform future tool builders aiming to support
programmer navigation.
To perform this investigation, we first defined constructs and propositions for a new
variant of information foraging theory for software maintenance. We then
operationalized the constructs in different ways and built three executable models to
allow for empirical investigation. We developed a simple information-scent-only
model of navigation, a more advanced model of programmer navigation, named
Programmer Flow by Information Scent (PFIS), which accounts for the topological
structure of source code, and PFIS 2, a refinement of PFIS that maintains an up-to-
date model of source code on the fly and models information scent even in the absence
of explicit information about stated goals.
We then used the models in three empirical studies to evaluate the applicability of
information foraging theory to this domain. First, we conducted a lab study of 12 IBM
programmers working on a bug report and feature request. Second, we conducted an
analysis of issues and revisions collected from Sourceforge.net. Finally, we collected
programmer navigation behavior, revisions and issues from a field study of
programmers working in various groups at IBM.
All three models predicted programmers' navigation behavior, including where
programmers allocated their time among patches, where programmers went, or where
programmers made changes to fix defects. These results indicate that information
foraging theory can predict and explain programmer navigation behavior, and imply
that tools based on the principles of information foraging theory will be able to predict
subsequent navigation behavior and potentially assist where programmers should go to
make changes to fix bugs.