BackportBench: 一种多语言的自动化补丁回退基准测试
BackportBench: A Multilingual Benchmark for Automated Backporting of Patches
AI总结:
BackportBench是一个多语言基准测试,用于评估自动化补丁回退技术,展示了代理方法在处理复杂补丁回退任务中的优越性。
摘要:
许多现代软件项目发展迅速,以纳入新功能和安全补丁。用户需要更新依赖项以使用更安全的版本,但许多人仍使用较旧的、有漏洞的包版本,因为升级可能困难且可能破坏现有代码库。软件开发者可以通过将安全补丁回退到旧版本来缓解这一问题。然而,手动回退补丁是耗时且容易出错的。现有自动化回退补丁技术在通用软件上的有效性仍不清楚,因为它们通常只针对代码块或函数级补丁回退场景,并且使用不完美的评估指标。为了促进自动化回退补丁技术的开发和评估,我们介绍了BackportBench,这是首个全面的补丁回退问题基准测试套件。BackportBench是一个多语言基准测试,包含来自PyPI、Maven和npm的202个补丁回退问题,每个都有可执行的Docker环境和相关测试用例。我们使用BackportBench评估了现有的补丁回退方法和具有适应此任务潜力的LLM技术。结果表明,代理方法在传统补丁回退方法上表现更优,特别是在需要逻辑和结构变化的案例中。然而,性能在不同编程语言中有所差异。基于这些发现,我们为未来自动化回退补丁的研究和软件实践者提出了几项启示。
英文摘要:
Many modern software projects evolve rapidly to incorporate new features and security patches. It is important for users to update their dependencies to safer versions, but many still use older, vulnerable package versions because upgrading can be difficult and may break their existing codebase. Software developers can mitigate this problem by backporting security patches to older releases. However, manually backporting is time-consuming and error-prone. The effectiveness of existing automated backporting techniques on general software remains unclear since they typically target only code-hunk or function-level patch porting scenarios and are evaluated with imperfect metrics. To facilitate the development and evaluation of automated backporting techniques, we introduce BackportBench, the first comprehensive benchmark suite for patch backporting problem. BackportBench is a multilingual benchmark that contains 202 patch backporting problems from PyPI, Maven, and npm, each with executable Docker environments and relevant test cases. We evaluated existing patch porting methods and LLM-based techniques that have the potential to adapt to this task using BackportBench. The results show that the agentic method has outperformed traditional patch porting methods, especially on cases that require logical and structural changes. However, the performance varies across different programming languages. Based on the findings, we draw several implications for researchers and software practitioners in future work on automated backporting.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。