DepRepair: LLM-Based Source-Code Repair for Dependency Breaking Changes

Shenghao Yang, Bo Lu, Yaochen Liu, Yu Kang, Qiongfang Zhang, Chetan Bansal, Saravan Rajmohan, Minghua MaarXiv 2026

TL;DR

When third-party libraries update, they often introduce breaking changes that fracture downstream code. While traditional automated program repair treats bugs as a "same-repository" problem, this paper introduces DepRepair, a single-call LLM approach that leverages structured cross-repository evidence (like distilled release notes and API diffs) to automatically fix broken dependencies, matching or outperforming complex multi-turn coding agents at a fraction of the cost.

What Problem Does This Paper Address?

Modern software relies heavily on third-party packages. When these upstream libraries undergo major updates, they frequently introduce breaking changes—such as API migrations, renames, or entirely new design paradigms. Downstream developers are left with the tedious, error-prone task of manually refactoring their codebases to match the new versions.

Existing Automated Program Repair (APR) tools and LLM coding agents (like those evaluated on SWE-bench) operate under a major assumption: that the bug, the failing tests, and the required fix context all live within the same repository.

Dependency breaking changes violate this assumption in two ways:

  1. The evidence is upstream: The information on how to fix the code resides externally in unstructured release notes, changelogs, and API documentation.
  2. Localization is blind: Failing tests or compilation errors in the downstream project rarely point directly to the root cause of the breaking API change, leaving the LLM under-informed.

Methods

To solve this cross-repository challenge, the authors propose DepRepair, a framework that processes raw upstream documentation into structured, actionable prompts for a single-turn LLM call.

Overview of the DepRepair approach, detailing the pipeline from raw evidence distillation to single-turn patch generation.

DepRepair consists of three main components:

  1. Evidence Filter (What changed): It takes noisy, unstructured upstream documentation (release notes, changelogs, source diffs) and prompts an LLM to distill it into a clean, compact list of structured migration rules (e.g., mapping old API symbols to new ones).
  2. Usage Locator (Where it matters): Instead of relying on test failures to find bugs, it performs an API-driven scan of the consumer repository to anchor exactly where the modified imports and call sites are located.
  3. Subcategory-Aware Guide (How to edit): It classifies the breaking change into one of four subcategories (Direct Rename, Compound API Migration, Import Migration, or Paradigm Shift) and appends tailored editing strategies to guide the LLM's refactoring logic.

Finally, these components are assembled into a single prompt, and the backbone LLM generates a unified patch diff in a single turn.

Datasets

Because no existing benchmark captured real-world cross-repository dependency breakages, the authors built DepBench.

The four-stage construction pipeline used to create the DepBench benchmark.

DepBench consists of 95 real-world dependency-update instances mined from GitHub across four major language ecosystems:

  • Maven (38 instances)
  • npm (33 instances)
  • Cargo (15 instances)
  • PyPI (9 instances)

Each instance includes the pre-update snapshot, upstream evidence, a developer-verified gold patch, and a Docker-based executable oracle to validate whether the consumer's test suite passes after the repair.

Key Insights and Ideas

  • Raw evidence is a double-edged sword: Counter-intuitively, dumping raw, unstructured upstream changelogs directly into LLMs or multi-turn agents harms performance, dropping pass rates by 7 to 23 percentage points due to text noise. Structuring and distilling that evidence reverses this trend entirely.
  • The "Empty Patch" bottleneck: The primary failure mode for LLMs tackling dependency updates isn't generating incorrect code; it's generating no code at all (an empty patch). LLMs frequently hallucinate that the consumer code is still compatible. DepRepair's explicit localization step cuts empty patch rates from over 33% down to just 10.5%.
  • Data structure beats multi-turn autonomy: A single, well-structured LLM call grounded in cross-repository evidence can match or beat autonomous, multi-turn coding agents (like Claude Code or Codex CLI). The bottleneck for this task is access to clean, external knowledge, not repository interaction loops.

Key Results

Evaluated on DepBench, DepRepair achieved the highest executable test pass rates among all baselines:

  • 89.5% pass rate using the GPT-5.5 backbone.
  • 82.1% pass rate using the Claude Opus 4.6 backbone.

It significantly outperformed direct LLM baselines without structured evidence (+7 instances for GPT-5.5 and +10 for Opus 4.6) and performed on par with or better than state-of-the-art autonomous coding agents operating in minimal context environments, while avoiding the agentic performance collapse caused by raw upstream text.

Limitations and Future Work

  • Benchmark Scale: DepBench currently contains 95 instances. While highly curated, expanding the dataset to 200+ instances will provide stronger statistical power and broader ecosystem coverage.
  • The Paradigm Shift Problem: While DepRepair handles renames and import migrations perfectly (100% success on import migrations), "Paradigm Shifts" (e.g., migrating from Vue 2 Options API to Vue 3 Composition API) remain highly challenging. These instances require deep structural refactoring rather than rule-based edits, leaving a clear gap for future architectural improvements.

Summary updated

BibTeX
@misc{yang2026deprepair,
  author = {Shenghao Yang and Bo Lu and Yaochen Liu and Yu Kang and Qiongfang Zhang and Chetan Bansal and Saravan Rajmohan and Minghua Ma},
  title = {{DepRepair: LLM-Based Source-Code Repair for Dependency Breaking Changes}},
  year = {2026},
  eprint = {2607.17957},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.17957},
}
Figure