🤖 AI Summary
Traditional text-diff–based code review struggles to convey the intent behind Git commits, particularly failing to semantically distinguish critical changes. To address this, we propose ChangePrism, a multi-granularity visualization framework for Git commits that integrates historical dependency analysis with change pattern recognition to automatically classify code modifications—e.g., logic refactoring, API migration, and configuration updates. ChangePrism employs an “overview–focus” dual-view design: a global view reveals the distribution of change types and their cross-file impact scope, while a local view presents context-aware, semantically enriched diffs. The tool supports one-click generation of interactive visual reports from commit hashes or pull request URLs. In an empirical evaluation with professional developers, ChangePrism improved intent comprehension accuracy by 37% and reduced code review time by 42% on average.
📝 Abstract
Understanding the changes made by developers when they submit a pull request and/or perform a commit on a repository is a crucial activity in software maintenance and evolution. The common way to review changes relies on examining code diffs, where textual differences between two file versions are highlighted in red and green to indicate additions and deletions of lines. This can be cumbersome for developers, making it difficult to obtain a comprehensive overview of all changes in a commit. Moreover, certain types of code changes can be particularly significant and may warrant differentiation from standard modifications to enhance code comprehension. We present a novel visualization approach supported by a tool named ChangePrism, which provides a way to better understand code changes. The tool comprises two components: extraction, which retrieves code changes and relevant information from the git history, and visualization, which offers both general and detailed views of code changes in commits. The general view provides an overview of different types of code changes across commits, while the detailed view displays the exact changes in the source code for each commit.