arXiv · 2609.32057
CG-Diff: Organizing Code Changes Around Call Graphs
Abstract
Tools for code review present code changes file-by-file. We argue that, oftentimes, changes can be better organized around a call graph of the changed code. From an empirical study of GitHub pull requests (PRs) in-the-wild, we find that (1) in around 40% of the PRs, more than half of the changed functions (and methods) are connected by call graphs, and (2) necessary callees are often located in different files from their callers. Based on these findings, we develop the notion of CG-Diffs, subgraphs derived by decomposing a call graph of the changed code into smaller and more navigable directed graphs. We then implement a web-based interface for viewing PRs that restructures the PR around these CG-Diffs. Through a within-subject study comparing our interface against GitHub's PR view, we find that CG-Diffs help orient participants and provide them with more meaningful structures to navigate the PR. We also found several limitations: function nodes repeated across multiple CG-Diffs can be disorienting, and changes not contained in a function (e.g. globals, imports) are not as immediately apparent. Our study shows promise in using call graphs to help contextualize and navigate unfamiliar codebases, which may benefit new contributors to open source, and reviewers of unfamiliar LLM-generated PRs.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Bimal Raj Gyawali, Devamardeep Hayatpur, Nadia Polikarpova. 2026-09-25. CG-Diff: Organizing Code Changes Around Call Graphs. https://arxiv.org/abs/2609.32057
Cite the original work for its findings. Save a collection to share your selection of sources.