一句话:提出 iFixDataloss,自动检测并修复 Android 应用因外部事件中断导致的数据丢失问题。
Android 应用是事件驱动的,外部事件常中断执行,导致数据丢失问题(如屏幕旋转时页面销毁重建,状态保存不当则用户数据丢失)。本文提出工具 iFixDataloss,自动检测并修复此类问题:识别可能发生数据丢失的场景,设计暴露问题的策略,并设计补丁模板进行修复。在 66 个 Android 应用上的实验表明,iFixDataloss 检测到 374 个数据丢失问题(其中 284 个此前未知),为 188 个问题成功生成补丁;提交的 20 个补丁中 16 个被开发者接受。与现有技术相比,iFixDataloss 在检测问题数量和生成补丁质量上均显著更优。
Android apps are event-driven, and their execution is often interrupted by external events. This interruption can cause data loss issues that annoy users. For instance, when the screen is rotated, the current app page will be destroyed and recreated. If the app state is improperly preserved, user data will be lost. In this work, we present an approach and tool iFixDataloss that automatically detects and fixes data loss issues in Android apps. To achieve this, we identify scenarios in which data loss issues may occur, develop strategies to reveal data loss issues, and design patch templates to fix them. Our experiments on 66 Android apps show iFixDataloss detected 374 data loss issues (284 of them were previously unknown) and successfully generated patches for 188 of the 374 issues. Out of 20 submitted patches, 16 have been accepted by developers. In comparison with state-of-the-art techniques, iFixDataloss performed significantly better in terms of the number of detected data loss issues and the quality of generated patches.