- Main
A BROADER STUDY OF THE EFFECTIVENESS OF RESOURCE LEAK CHECKING AND REPAIR FOR JAVA
Abstract
Resource leaks occur when a program utilizes resources (e.g., files, database connections, network sockets), but fails to release them after use. This can result in performance slowdowns, system crashes, and denial-of-service attacks leaving applications vulnerable to security risks. The Checker Framework Resource Leak Checker (RLC) is a static analysis tool that soundly detects potential resource leaks in Java programs but does not automatically repair them. Recent work, Arodnap, combines RLC, RLCís annotation inference component, and RLFixerís repair framework to improve automation of resource leak repair. Arodnap uses NJR-1 Dataset, a normalized benchmark consisting of 293 Java programs, to run its full pipeline but does not test on real-world projects. In this work, we evaluate the effectiveness of resource leak detection and repair using Arodnap on 9 open-source Java applications spanning diverse domains, including game engines, bioinformatics, networking, and embedded database systems. Our evaluation highlights cases where automated repair succeeds through the use of try-with-resources statements, automatically closing the resource after its use, as well as limitations in patch generation and applicability to applying the full pipeline in a real-world setting.