Automated repair of resource leaks in Android applications

Bhargav Nagaraja Bhatt,Carlo A. Furia
DOI: https://doi.org/10.1016/j.jss.2022.111417
IF: 3.5
2022-07-16
Journal of Systems and Software
Abstract:Resource leaks – a program does not release resources it previously acquired – are a common kind of bug in Android applications. Even with the help of existing techniques to automatically detect leaks, writing a leak-free program remains tricky. One of the reasons is Android's event-driven programming model, which complicates the understanding of an application's overall control flow. In this paper, we present : a technique to automatically detect and fix resource leaks in Android applications. builds a succinct abstraction of an app's control flow, and uses it to find execution traces that may leak a resource. The information built during detection also enables automatically building a fix – consisting of release operations performed at appropriate locations – that removes the leak and does not otherwise affect the application's usage of the resource. An empirical evaluation on resource leaks from the curated collection demonstrates that 's approach is scalable, precise, and produces correct fixes for a variety of resource leak bugs: automatically found and repaired 50 leaks that affect 9 widely used resources of the Android system, including all those collected by for those resources; on average, it took just 2 min to detect and repair a leak. also compares favorably to Relda2/RelFix – the only other fully automated approach to repair Android resource leaks – since it can often detect more leaks with higher precision and producing smaller fixes. These results indicate that can provide valuable support to enhance the quality of Android applications in practice.
computer science, theory & methods, software engineering
What problem does this paper attempt to address?