Noname manuscript No. (will be inserted by the editor) DroidLeaks: A Comprehensive Database of Resource Leaks in Android Apps Yepang Liu · Jue Wang · Lili Wei · Chang Xu · Shing-Chi Cheung · Tianyong Wu · Jun Yan · Jian Zhang Received: date / Accepted: date Abstract Resource leaks in Android apps are pervasive. They can cause se- rious performance degradation and system crashes. In recent years, many re- source leak detection techniques have been proposed to help Android develop- ers correctly manage system resources. Yet, there exist no common databases of real-world bugs for effectively comparing such techniques to understand their strengths and limitations. This paper describes our effort towards con- structing such a bug database named DroidLeaks. To extract real resource leak bugs, we mined 124,215 code revisions of 34 popular open-source Android apps. After automated filtering and manual validation, we successfully found 292 fixed resource leak bugs, which cover a diverse set of resource classes, from 32 analyzed apps. To understand these bugs, we conducted an empirical study, which revealed the characteristics of resource leaks in Android apps and common patterns of resource management mistakes made by developers. To further demonstrate the usefulness of our work, we evaluated eight resource leak detectors from both academia and industry on DroidLeaks and per- Yepang Liu Shenzhen Key Laboratory of Computational Intelligence, Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China. E-mail:
[email protected] Jue Wang, Chang Xu State Key Laboratory for Novel Software Technology and Department of Computer Science and Technology, Nanjing University, Nanjing, China E-mail:
[email protected],
[email protected] Lili Wei, Shing-Chi Cheung Department of Computer Science and Engineering, Hong Kong University of Science and Technology, Hong Kong, China.