Mobile apps have become ubiquitous. For app developers, it is a key priority to ensure their apps' correctness and reliability. 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 guide developers, or help improve testing and analysis tools. However, such studies do not exist -- this paper fills this gap. Over a four-month long effort, we have collected 16,245 unique exception traces from 2,486 open-source Android apps, and observed that framework-specific exceptions account for the majority of these crashes. We then extensively investigated the 8,243 framework-specific exceptions (which took six person-months): (1) identifying their characteristics (e.g., manifestation locations, common fault categories), (2) evaluating their manifestation via state-of-the-art bug detection techniques, and (3) reviewing their fixes. Besides the insights they provide, these findings motivate and enable follow-up research on mobile apps, such as bug detection, fault localization and patch generation. In addition, to demonstrate the utility of our findings, we have optimized Stoat, a dynamic testing tool, and implemented ExLocator, an exception localization tool, for Android apps. Stoat is able to quickly uncover three previously-unknown, confirmed/fixed crashes in Gmail and Google+; ExLocator is capable of precisely locating the root causes of identified exceptions in real-world apps. Our substantial dataset is made publicly available to share with and benefit the community.
翻译:移动应用程序已经变得无处不在。 对于应用程序开发者来说,这是一个关键优先事项,以确保应用程序的正确性和可靠性。 但是,许多应用程序仍然偶尔会遭遇频繁碰撞的意外,削弱了其竞争优势。大规模、深入分析真实世界应用程序崩溃的特点可以提供有用的洞见来指导开发者,或帮助改进测试和分析工具。然而,这些研究并不存在 -- -- 本文填补了这一空白。在四个月的努力中,我们从2,486个开放源码和机器人应用程序中收集了16,245个独特的例外痕迹,并观察到这些崩溃的大部分是框架特有例外。我们随后广泛调查了8,243个框架特有例外(花了6个人月):(1) 查明其特性(例如,显示地点,常见故障类别),(2) 通过状态的错误检测技术评估其表现形式,(3) 审视其修正方法。除了这些发现外,这些发现激励并能够对移动应用程序进行后续研究,例如错误检测、本地化和整版数据生成。此外,为了展示我们发现结果的实用性社区的作用,我们之前的Stoal Exlial Exator 将快速测试一个动态工具。