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

Tianyang Liu, Weixing Ji*, Xiaohui Dong, Wuhuang Yao, Yizhuo Wang, Hui Liu, Haiyang Peng, Yuxuan Wang

*此作品的通讯作者

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

High-quality defect repositories are vital in defect detection, local-ization, and repair. However, existing repositories collected from open-source projects are either small-scale or inadequately labeled and packed. This paper systematically summarizes the program-ming 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 de-fect 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.

源语言英语
主期刊名Proceedings - 2024 ACM/IEEE 44th International Conference on Software Engineering, ICSE 2024
出版商IEEE Computer Society
1723-1735
页数13
ISBN(电子版)9798400702174
DOI
出版状态已出版 - 2024
活动44th ACM/IEEE International Conference on Software Engineering, ICSE 2024 - Lisbon, 葡萄牙
期限: 14 4月 202420 4月 2024

出版系列

姓名Proceedings - International Conference on Software Engineering
ISSN(印刷版)0270-5257

会议

会议44th ACM/IEEE International Conference on Software Engineering, ICSE 2024
国家/地区葡萄牙
Lisbon
时期14/04/2420/04/24

指纹

探究 'JLeaks: A Featured Resource Leak Repository Collected From Hundreds of Open-Source Java Projects' 的科研主题。它们共同构成独一无二的指纹。

引用此