Lune

ISSTA2026顶会

The Fix Is Right at Hand: Fixing Incompatibility Errors Guided by Library Knowledge for Automatic Library Upgrade

Zhuotong Zhou, Susheng Wu, Junpeng Zhao, Bihuan Chen, YenQin Hoo, Yiheng Huang, Yiheng Cao, Xin Peng

摘要

Third-party libraries (TPLs) play critical roles in modern software development. Upgrading them is crucial for enhanced security and functionality, but often introduces incompatibility errors, caused by breaking changes in library APIs, in client code. Existing approaches rely on predefined migration patterns or API recommendation heuristics, which suffer from limited pattern coverage and ignore the usage context of broken API, leading to incorrect or incomplete fixes. To address these limitations, we propose Librarian, a novel LLM-based approach to automatically fix incompatibility errors when upgrading a dependent library in a client project. The core idea of Librarian is to extract context-aware fix hints from the library codebase, serving as semantic few-shot examples, enabling LLM to generate fixes without relying on predefined patterns. Since LLM may generate an incorrect or incomplete fix, Librarian performs fix refinement based on compilation feedback from the client project. Our evaluation has demonstrated that Librarian achieves a fixing success rate of 84.2%, outperforming the state-of-the-arts by at least 45.3%. Our evaluation has also indicated the practical usefulness of Librarian in fixing incompatibility errors in 32 real-world projects.

问 Lune

几分钟看清这篇 Paper 的位置,不用再花一下午。

Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

摘要 · 相关的 Paper

获取答案

免费开始,无需绑卡

相关 Paper

  1. Pig: Leveraging Large Language Models for Python Library MigrationsMiryeong Kang, Wonseok Oh, Gabin An, Hakjoo OhFSE 2026
  2. APIfix: output-oriented program synthesis for combating breaking changes in librariesXiang Gao, Arjun Radhakrishna, Gustavo Soares, Ridwan Shariffdeen 等OOPSLA 2021 · 17 次引用
  3. LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-Based Code CompletionChong Wang, Kaifeng Huang, Jian Zhang, Yebo Feng 等ICSE 2025 · 3 次引用
  4. Compiler-directed Migrating API Callsite of Client CodeHao Zhong, Na MengICSE 2024 · 5 次引用
  5. M3: Semantic API MigrationsBruce Collie, Philip Ginsbach, Jackson Woodruff, Ajitha Rajan 等ASE 2020 · 14 次引用
黄昏的海面,两侧是细线勾勒的悬崖