HackerPapers

arXiv:1902.02467cs.SE

How Different Are Different diff Algorithms in Git?

Yusuf Sulistyo Nugroho, Hideaki Hata, Kenichi Matsumoto

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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. 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.

arXiv comments
38 pages, Empirical Software Engineering
Journal reference
DOI
doi:10.1007/s10664-019-09772-z
Subjects
cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Oct 2025 to Oct 2025.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. Diff Algorithms 1 comment
    • See also Nugroho (2019): How Different Are Different diff Algorithms in Git? https://arxiv.org/abs/1902.02467

      amaiView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.