arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.03480cs.SE
收藏

基于大语言模型的自动化依赖升级代理

LLM Agents for Automated Dependency Upgrades

Vali Tawosi, Salwa Alamir, Xiaomo Liu, Manuela Veloso

AI总结:

本文提出基于LLM代理的自动化依赖升级方法,通过合成数据验证,实现了高效准确的代码更新与兼容性保障。

摘要:

随着代码库的不断扩展,其库依赖可能会变得过时,需要更新以维持创新和安全。然而,更新库可能会在代码中引入破坏性变化,需要大量开发时间进行维护。为此,我们引入了一个结合迁移文档的LLM代理框架,用于自动推荐和应用代码更新并确保与新版本的兼容性。我们的解决方案能够自动在实时Java代码库中定位更新的库使用,并以用户友好的方式实现推荐的修复。系统架构由多个关键组件组成:摘要代理、控制代理和代码代理。为了验证我们的方法,我们通过创建三个具有重大升级变化的合成代码仓库,在工业用例中应用该框架,并将我们的方法与最先进的方法进行对比。结果表明,我们的方法不仅在所有情况下使用更少的token进行升级,而且达到了71.4%的精度,显示出其效率和有效性。

英文摘要:

As a codebase expands over time, its library dependencies can become outdated and require updates to maintain innovation and security. However, updating a library can introduce breaking changes in the code, necessitating significant developer time for maintenance. To address this, we introduce a framework of LLM agents to be used in combination with migration documentation to automatically recommend and apply code updates and ensure compatibility with new versions. Our solution can automatically localize updated library usages in live Java codebases and implement recommended fixes in a user-friendly manner. The system architecture consists of multiple key components: a Summary Agent, Control Agent, and Code Agent. To validate our approach, we apply the framework on an industrial use case by which we create three synthetic code repositories with major Upgrade changes and benchmark our approach against state-of-the-art methods. Results show that our approach not only performs upgrades using fewer tokens across all cases but also achieves a precision of 71.4%, highlighting its efficiency and effectiveness compared to state-of-the-art methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑