ChangePrism:可视化代码变更的本质
软件工程
2025-08-20 v2
摘要
理解开发人员在提交拉取请求和/或执行提交时所做的变更对于软件维护和演化至关重要。常见的变更审查方式依赖于检查代码 diff,即以红色和绿色突出显示两个文件版本之间的文本差异,以指示行的添加和删除。这对于开发人员来说可能繁琐,使他们难以获得提交中所有变更的综合概览。此外,某些类型的代码变更可能尤其重要,可能需要与标准修改区分以增强代码理解。我们提出了一种新颖的可视化方法,由一个名为 ChangePrism 的工具支持,能够更好地理解代码变更。该工具包含两个组件:提取组件从 git 历史中检索代码变更及相关信息,以及可视化组件提供提交中代码变更的通用视图和详细视图。通用视图提供不同类型代码变更在提交中的概览,而详细视图则显示每个提交中源代码的确切变更。
引用
@article{arxiv.2508.12649,
title = {ChangePrism: Visualizing the Essence of Code Changes},
author = {Lei Chen and Michele Lanza and Shinpei Hayashi},
journal= {arXiv preprint arXiv:2508.12649},
year = {2025}
}
备注
(C) 2025 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works