paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fixing dependency errors for Python build reproducibility

修复依赖错误以实现 Python 构建可复现性
ISSTA Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis2021匹配度 1/10 · 该论文研究 Python 构建可复现性中的依赖错误自动修复,属于软件工程/自动化修复方向,与用户的 PL→AI 静态分析、AI→PL 形式化验证、浮点程序分析及贝叶斯程序分析等核心方向均无直接关联,也未涉及 LLM/Agent 作为工具或对象。引用 57 inbox
Suchita Mukherjee, Abigail Almanza, Cindy Rubio-González
crossref: 2026-09-12

AI 速览

一句话:提出 PyDFix,从构建日志中检测并自动修复导致 Python 构建不可复现的依赖错误。

开源依赖包被广泛复用,但其频繁更新常常破坏下游应用的构建;加之 Python 项目在依赖版本声明上缺乏统一规范,大型项目的历史构建会随时间变得不可复现。人工修复依赖错误代价高昂,自动化方法则需应对非结构化构建日志解析、传递依赖查找以及依赖版本组合的指数级搜索空间。本文首先实证考察开源 Python 项目如何声明依赖版本,以及依赖包对可复现性的影响,进而提出工具 PyDFix,用于检测并修复由依赖错误引起的构建不可复现问题。作者在来自真实开源项目的 BugSwarm 与 BugsInPy 两个缺陷数据集上进行评估,共分析 2,702 次构建,识别出 1,921 次(71.1%)因依赖错误而不可复现,其中 859 次(44.7%)被完整修复,另有 632 次(32.9%)获得部分修复。

问题
开源依赖包频繁更新且依赖版本声明实践不统一,使 Python 项目的历史构建随时间不可复现;人工修复依赖错误成本高,自动化则受限于日志解析、传递依赖查找与版本空间搜索等挑战。
方法
先实证研究开源 Python 项目的依赖版本声明方式及其对构建可复现性的影响,再实现工具 PyDFix,从构建日志中检测因依赖错误导致的不可复现构建,并搜索、修复依赖版本。
评估
在构建自真实开源项目的 BugSwarm 与 BugsInPy 两个缺陷数据集上评估,共分析 2,702 次构建,其中 1,921 次(71.1%)被判定因依赖错误而不可复现,859 次(44.7%)被完整修复,632 次(32.9%)获得部分修复。
原文摘要(Abstract)

Software reproducibility is important for re-usability and the cumulative progress of research. An important manifestation of unreproducible software is the changed outcome of software builds over time. While enhancing code reuse, the use of open-source dependency packages hosted on centralized repositories such as PyPI can have adverse effects on build reproducibility. Frequent updates to these packages often cause their latest versions to have breaking changes for applications using them. Large Python applications risk their historical builds becoming unreproducible due to the widespread usage of Python dependencies, and the lack of uniform practices for dependency version specification. Manually fixing dependency errors requires expensive developer time and effort, while automated approaches face challenges of parsing unstructured build logs, finding transitive dependencies, and exploring an exponential search space of dependency versions. In this paper, we investigate how open-source Python projects specify dependency versions, and how their reproducibility is impacted by dependency packages. We propose a tool PyDFix to detect and fix unreproducibility in Python builds caused by dependency errors. PyDFix is evaluated on two bug datasets BugSwarm and BugsInPy, both of which are built from real-world open-source projects. PyDFix analyzes a total of 2,702 builds, identifying 1,921 (71.1%) of them to be unreproducible due to dependency errors. From these, PyDFix provides a complete fix for 859 (44.7%) builds, and partial fixes for an additional 632 (32.9%) builds.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6701,
  title = {Fixing dependency errors for Python build reproducibility},
  author = {Suchita Mukherjee and Abigail Almanza and Cindy Rubio-González},
  booktitle = {ISSTA},
  year = {2021},
  doi = {10.1145/3460319.3464797}
}