How Different Are Different diff Algorithms in Git?

Yusuf Sulistyo Nugroho, Hideaki Hata, Kenichi Matsumoto
2/7/2019
cs.SE

Official code: yusufsn/DifferentDiffAlgorithms (10 stars, Jupyter Notebook, MIT, last commit 2019-11-13).

Abstract

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 algorithm Myers to the advanced Histogram algorithm.

Show full abstract

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 the Histogram is more suitable than Myers for providing the changes of code, from our manual analysis. Thus, we strongly recommend using the Histogram algorithm when mining Git repositories to consider differences in source code.

View on arXivView PDF

Code Implementations(1)

MIT

Research Artifact: How Different Are Different diff Algorithms in Git?

102Jupyter NotebookNov 14, 20187 years agoMIT

Similar Papers

Cite this paper

@article{nugroho2019different,
  title  = {How Different Are Different diff Algorithms in Git?},
  author = {Yusuf Sulistyo Nugroho and Hideaki Hata and Kenichi Matsumoto},
  year   = {2019},
  eprint = {1902.02467},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1902.02467}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1902.02467.svg)](https://codeofpaper.com/paper/1902.02467)

Discussion