paperbot · PL 论文追踪

全部论文 待读 收藏

P2 JLeaks: A Featured Resource Leak Repository Collected From Hundreds of Open-Source Java Projects

JLeaks:从数百个开源 Java 项目中收集的特征化资源泄漏仓库
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 该论文构建的是Java资源泄漏缺陷仓库,属于缺陷检测与修复领域的数据资源,与程序分析/静态分析仅有间接关联;但未涉及用户核心关注的LLM/Agent、Agentic程序分析、浮点程序分析或贝叶斯程序分析。引用 1 inbox
Tianyang Liu, Weixing Ji, Xiaohui Dong, Wuhuang Yao, Yizhuo Wang, Hui Liu, Haiyang Peng, Yuxuan Wang
crossref: 2026-09-12

AI 速览

一句话:构建了目前最大、标注完整且可复现的 Java 资源泄漏缺陷仓库 JLeaks,并分析其分布、根因与修复方式。

高质量缺陷仓库对缺陷检测、定位与修复至关重要,但现有开源项目缺陷仓库往往规模小或标注、打包不足。本文系统总结了 Java 中文件、套接字和线程等系统资源的编程 API,并说明了链式与嵌套流操作中可能引发资源泄漏的异常。作者构建半自动工具链以提高缺陷抽取效率,包括对大型遗留 Java 项目的自动构建,并从 GitHub 321 个开源项目中收集了 1,094 个资源泄漏。通过逐轮过滤与交叉验证,涉及约 3,185 次提交审查,最终建成 JLeaks。其中 254 个缺陷带有原因、位置、补丁、源文件和编译字节码等完整标注。本文还分析了缺陷分布、根因与修复方式,并与两个知名资源泄漏仓库对比,表明 JLeaks 信息更丰富、更完整,具有高可用性、唯一性和一致性,并展示了两个应用场景。

问题
现有从开源项目收集的缺陷仓库规模较小,或标注与打包不充分,难以有效支撑资源泄漏的检测、定位与修复研究。
方法
系统总结 Java 系统资源 API 与链式/嵌套流操作中的泄漏异常,构建含大型遗留项目自动构建的半自动工具链,并通过逐轮过滤和交叉验证从 GitHub 项目抽取资源泄漏。
评估
对 JLeaks 进行缺陷分布、根因和修复方式分析,并与两个知名资源泄漏仓库对比,展示其在信息完整性、可用性、唯一性和一致性上的优势及两个应用场景。
原文摘要(Abstract)

High-quality defect repositories are vital in defect detection, localization, and repair. However, existing repositories collected from open-source projects are either small-scale or inadequately labeled and packed. This paper systematically summarizes the programming APIs of system resources (i.e., file, socket, and thread) in Java. Additionally, this paper demonstrates the exceptions that may cause resource leaks in the chained and nested streaming operations. A semi-automatic toolchain is built to improve the efficiency of defect extraction, including automatic building for large legacy Java projects. Accordingly, 1,094 resource leaks were collected from 321 open-source projects on GitHub. This repository, named JLeaks, was built by round-by-round filtering and cross-validation, involving the review of approximately 3,185 commits from hundreds of projects. JLeaks is currently the largest resource leak repository, and each defect in JLeaks is well-labeled and packed, including causes, locations, patches, source files, and compiled bytecode files for 254 defects. We have conducted a detailed analysis of JLeaks for defect distribution, root causes, and fix approaches. We compare JLeaks with two well-known resource leak repositories, and the results show that JLeaks is more informative and complete, with high availability, uniqueness, and consistency. Additionally, we show the usability of JLeaks in two application scenarios. Future studies can leverage our repository to encourage better design and implementation of defect-related algorithms and tools.

链接与引用

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

BibTeX
@inproceedings{paperbot11275,
  title = {JLeaks: A Featured Resource Leak Repository Collected From Hundreds of Open-Source Java Projects},
  author = {Tianyang Liu and Weixing Ji and Xiaohui Dong and Wuhuang Yao and Yizhuo Wang and Hui Liu and Haiyang Peng and Yuxuan Wang},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3639162}
}