Why My App Crashes? Understanding and Benchmarking Framework-Specific Exceptions of Android Apps
- 31 July 2020
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 48 (4) , 1115-1137
Abstract
Mobile apps have become ubiquitous. Ensuring their correctness and reliability is important. However, many apps still suffer from occasional to frequent crashes, weakening their competitive edge. Large-scale, deep analyses of the characteristics of real-world app crashes can provide useful insights to both developers and researchers. However, such studies are difficult and yet to be carried out --- this work fills this gap. We collected 16,245 and 8,760 unique exceptions from 2,486 open-source and 3,230 commercial Android apps, respectively, and observed that the exceptions thrown from Android framework (termed "framework-specific exceptions") account for the majority. With one-year effort, we (1) extensively investigated these framework-specific exceptions, and (2) further conducted an online survey of 135 professional app developers about how they analyze, test, reproduce and fix these exceptions. Specifically, we aim to understand the framework-specific exceptions from several perspectives: (i) their characteristics (e.g., manifestation locations, fault taxonomy), (ii) the developers' testing practices, (iii) existing bug detection techniques' effectiveness, (iv) their reproducibility and (v) bug fixes. To enable follow-up research (e.g., bug understanding, detection, localization and repairing), we further systematically constructed, DroidDefects, the first comprehensive and largest benchmark of Android app exception bugs. This benchmark contains 33 reproducible exceptions (with test cases, stack traces, faulty and fixed app versions, bug types, etc.), and 3,696 ground-truth exceptions (real faults manifested by automated testing tools), which cover the apps with different complexities and diverse exception types. Based on our findings, we also built two prototype tools: Stoat+, an optimized dynamic testing tool, which quickly uncovered three previously-unknown, fixed crashes in Gmail and Google+; ExLocator, an exception localization tool, which can locate the root causes of specific exception types. Our dataset, benchmark and tools are publicly available on https://github.com/tingsu/droiddefects.Keywords
Funding Information
- SNSF SPARK (CRSK-2_190302)
- National Natural Science Foundation of China (61632005, 61532019)
- National Research Foundation (NRF2018NCR-NCR005-0001)
- National Research Foundation Singapore (NRF2018NCR-NSOE004-0001, NRFI06-2020-0022)
This publication has 86 references indexed in Scilit:
- Auto-completing bug reports for Android applications2015
- Systematic execution of Android test suites in adverse conditions2015
- The ManyBugs and IntroClass Benchmarks for Automated Repair of C ProgramsIEEE Transactions on Software Engineering, 2015
- Unveiling Exception Handling Bug Hazards in Android Based on GitHub and Google Code Issues2015
- Understanding the Test Automation Culture of App Developers2015
- Towards mutation analysis of Android apps2015
- Guided GUI testing of android apps with minimal restart and approximate learning2013
- Verifying android applications using Java PathFinderACM SIGSOFT Software Engineering Notes, 2012
- Automated concolic testing of smartphone apps2012
- A Hitchhiker's guide to statistical tests for assessing randomized algorithms in software engineeringSoftware Testing, Verification and Reliability, 2012