Saved in:
Bibliographic Details
Main Authors: Glukhov, Evgeniy, Conti, Michele, Bogomolov, Egor, Golubev, Yaroslav, Bezzubov, Alexander
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.12487
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915619749756928
author Glukhov, Evgeniy
Conti, Michele
Bogomolov, Egor
Golubev, Yaroslav
Bezzubov, Alexander
author_facet Glukhov, Evgeniy
Conti, Michele
Bogomolov, Egor
Golubev, Yaroslav
Bezzubov, Alexander
contents Reliable handling of code diffs is central to agents that edit and refactor repositories at scale. We introduce Diff-XYZ, a compact benchmark for code-diff understanding with three supervised tasks: apply (old code $+$ diff $\rightarrow$ new code), anti-apply (new code $-$ diff $\rightarrow$ old code), and diff generation (new code $-$ old code $\rightarrow$ diff). Instances in the benchmark are triples $\langle \textit{old code}, \textit{new code}, \textit{diff} \rangle$ drawn from real commits in CommitPackFT, paired with automatic metrics and a clear evaluation protocol. We use the benchmark to do a focused empirical study of the unified diff format and run a cross-format comparison of different diff representations. Our findings reveal that different formats should be used depending on the use case and model size. For example, representing diffs in search-replace format performs best for larger models across most tasks, while structured udiff variants offer similar but slightly weaker performance. In contrast, smaller open models benefit little from any formatting choice. The Diff-XYZ benchmark is a reusable foundation for assessing and improving diff handling in LLMs that can aid future development of diff formats and models editing code. The dataset is published on HuggingFace Hub: https://huggingface.co/datasets/JetBrains-Research/diff-xyz.
format Preprint
id arxiv_https___arxiv_org_abs_2510_12487
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Diff-XYZ: A Benchmark for Evaluating Diff Understanding
Glukhov, Evgeniy
Conti, Michele
Bogomolov, Egor
Golubev, Yaroslav
Bezzubov, Alexander
Software Engineering
Machine Learning
Reliable handling of code diffs is central to agents that edit and refactor repositories at scale. We introduce Diff-XYZ, a compact benchmark for code-diff understanding with three supervised tasks: apply (old code $+$ diff $\rightarrow$ new code), anti-apply (new code $-$ diff $\rightarrow$ old code), and diff generation (new code $-$ old code $\rightarrow$ diff). Instances in the benchmark are triples $\langle \textit{old code}, \textit{new code}, \textit{diff} \rangle$ drawn from real commits in CommitPackFT, paired with automatic metrics and a clear evaluation protocol. We use the benchmark to do a focused empirical study of the unified diff format and run a cross-format comparison of different diff representations. Our findings reveal that different formats should be used depending on the use case and model size. For example, representing diffs in search-replace format performs best for larger models across most tasks, while structured udiff variants offer similar but slightly weaker performance. In contrast, smaller open models benefit little from any formatting choice. The Diff-XYZ benchmark is a reusable foundation for assessing and improving diff handling in LLMs that can aid future development of diff formats and models editing code. The dataset is published on HuggingFace Hub: https://huggingface.co/datasets/JetBrains-Research/diff-xyz.
title Diff-XYZ: A Benchmark for Evaluating Diff Understanding
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2510.12487