How different are different diff algorithms in Git?

How different are different diff algorithms in Git?
复制标题

DOI:
10.1007/s10664-019-09772-z
复制
发表时间:
2019-02
影响因子:
4.1
通讯作者:
Yusuf Sulistyo Nugroho;Hideaki Hata;Ken-ichi Matsumoto
Yusuf Sulistyo Nugroho;Hideaki Hata;Ken-ichi Matsumoto
中科院分区:
计算机科学2区
文献类型:
--
作者:
Yusuf Sulistyo Nugroho;Hideaki Hata;Ken-ichi Matsumoto

文献摘要

相似文献

自动识别文件的两个版本之间的差异是挖掘代码库的几个应用程序中的常见和基本任务。Git是一个版本控制系统,它有一个diff实用程序,用户可以从默认的Myers算法到高级的Histogramalgorithm算法中选择diff算法。根据我们的系统映射,我们确定了最近研究中diff的三种流行应用。在14个Java项目中,我们根据不同的diff算法在1.7%到8.2%的提交中获得了不同的值。关于引入错误的更改识别,我们发现在10个Java项目中,6.0%和13.3%的已识别错误修复提交具有不同的引入错误的更改结果。对于补丁应用,我们发现直方图比Myers更适合提供代码的变化,从我们的手工分析。因此,我们强烈建议在挖掘Git存储库时使用直方图算法,以考虑源代码中的差异。
Automatic identification of the differences between two versions of a file is a common and basic task in several applications of mining code repositories. Git, a version control system, has a diff utility and users can select algorithms of diff from the default algorithmMyersto the advancedHistogramalgorithm. From our systematic mapping, we identified three popular applications of diff in recent studies. On the impact on code churn metrics in 14 Java projects, we obtained different values in 1.7% to 8.2% commits based on the different diff algorithms. Regarding bug-introducing change identification, we found 6.0% and 13.3% in the identified bug-fix commits had different results of bug-introducing changes from 10 Java projects. For patch application, we found that theHistogramis more suitable thanMyersfor providing the changes of code, from our manual analysis. Thus, we strongly recommend using theHistogramalgorithm when mining Git repositories to consider differences in source code.