Journal article

Automated repair of resource leaks in Android applications

  • Bhatt, Bhargav Nagaraja ORCID Istituto del software (SI), Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
  • Furia, Carlo A. ORCID Istituto del software (SI), Facoltà di scienze informatiche, Università della Svizzera italiana, Svizzera
  • 2022
Published in:
  • The Journal of Systems and Software. - 2022, vol. 192, p. 111417
English 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 PlumbDroid: a technique to automatically detect and fix resource leaks in Android applications. PlumbDroid 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 DroidLeaks curated collection demonstrates that PlumbDroid’s approach is scalable, precise, and produces correct fixes for a variety of resource leak bugs: PlumbDroid automatically found and repaired 50 leaks that affect 9 widely used resources of the Android system, including all those collected by DroidLeaks for those resources; on average, it took just 2 min to detect and repair a leak. PlumbDroid 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 PlumbDroid can provide valuable support to enhance the quality of Android applications in practice.
Collections
Language
  • English
Classification
Computer science
License
CC BY
Open access status
hybrid
Identifiers
Persistent URL
https://susi.usi.ch/usi/documents/322810
Statistics

Document views: 1 File downloads:
  • Bhatt_2022_Else_joss.pdf: 4