Memory and Resource Leak Defects and their Repairs in Java Projects
Mohammadreza Ghanavati, Diego Costa, Janos Seboek, David Lo, Artur, Andrzejak

TL;DR
This paper presents an empirical study of memory and resource leak defects in Java projects, analyzing their types, causes, repairs, and detection methods to inform better bug prevention and fixing strategies.
Contribution
It offers a comprehensive taxonomy of leak types, causes, and repairs, based on analysis of 491 issues across 15 Java projects, highlighting common detection and repair practices.
Findings
Manual detection remains dominant for leaks.
Leaks often manifest on error-free paths.
Developers repair leaks faster than other bugs.
Abstract
Despite huge software engineering efforts and programming language support, resource and memory leaks are still a troublesome issue, even in memory-managed languages such as Java. Understanding the properties of leak-inducing defects, how the leaks manifest, and how they are repaired is an essential prerequisite for designing better approaches for avoidance, diagnosis, and repair of leak-related bugs. We conduct a detailed empirical study on 491 issues from 15 large open-source Java projects. The study proposes taxonomies for the leak types, for the defects causing them, and for the repair actions. We investigate, under several aspects, the distributions within each taxonomy and the relationships between them. We find that manual code inspection and manual runtime detection are still the main methods for leak detection. We find that most of the errors manifest on error-free execution…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
