Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Data Loss Detector: Automatically Revealing Data Loss Bugs in Android Apps

Data Loss Detector: Automatically Revealing Data Loss Bugs in Android Apps

In this video, I present Data Loss Detector (DLD), an automatic testing technique that can reveal data loss problems in Android apps. DLD integrates three capabilities to effectively reveal data loss problems: (i) a biased model-based exploration strategy that steers the exploration towards new app states that may be affected by data loss problems, (ii) data-loss-revealing actions that increase the likelihood to expose data loss problems, and (iii) two state-based oracles, a snapshot-based oracle and a property-based oracle, that have a high data loss detection accuracy, especially if used jointly.

Oliviero Riganelli

July 20, 2020
Tweet

Other Decks in Research

Transcript

  1. Data Loss Detector: Automatically Revealing Data Loss Bugs in Android

    Apps Oliviero Riganelli University of Milano Bicocca joint work with Simone Paolo Mottadelli, Claudio Rota, Daniela Micucci and Leonardo Mariani Distinguished Artifact
  2. Recreating Android Activity Running (visible) Destroyed Created Running (visible) create

    activity restore activity state save activity state 1 2 3
  3. https://disco.unim ib.it oliviero.riganelli …………. Running (visible) Destroyed save activity state

    1 https://disco.unimib.it oliviero.riganelli …………. Instance State Recreating an Activity
  4. https://disco.unimib.it oliviero.riganelli …………. https://disco.unimib.it Created Running (visible) restore activity state

    3 Instance State Data Loss The metronome is frustrating. I use it when I practice but if I ever stop it, and turn off the screen, it resets to 40bpm and 4/4 time As soon as I opened a comic through this app I was really happy given its functionality and ease of use. But everytime I rotate the screen, the app exits saying " file could not be loaded" Randomly sets back to 100% and auto brightness after using camera
  5. https://disco.unimib.it oliviero.riganelli …………. Data Loss Detector (DLD) oliviero.riganelli Love is

    the answer Biased Model-Based Exploration Data Loss Oracles Data-Loss-Revealing Actions
  6. Sn KeyEvent(MENU) Biased Model-Based Exploration 0.9 Unexecuted event 0.1 Any

    event TouchEvent(“OK”) TouchEvent(“NO THANKS”)
  7. https:// oliviero.riganelli …………. https://disco.unimib.it oliviero.riganelli …………. https:// oliviero.riganelli …………. https://

    oliviero.riganelli … … … … . https://disco.unim ib.it Systematic data-loss-revealing action
  8. Probabilistic data-loss-revealing action https:// oliviero.rig …………. https:// oliviero.rig … …

    … … . https:// oliviero.riganelli … … … … . https:// oliviero.rig … … … … . https:// oliviero.riganelli … … … … .
  9. Data Loss Oracles [ … { 'content_description': None, 'resource_id': None,

    'text': 'Editing "test123"', 'visible': True, 'checkable': False, 'children': [], 'size': '720*81', 'checked': False, 'temp_id': 4, 'selected': False, 'child_count': 0, ... } ... ] Snapshot-based oracle Property-based oracle
  10. Data Loss Oracles Snapshot Property … ‘content_description': 'Open navigation drawer',

    … … ‘content_description': ‘Close navigation drawer', ... Before double rotation After double rotation
  11. Evaluation Evaluation Research Questions APPs Configuration Google Nexus 5 Android

    6.0 RQ0 - What is the ε that provides the best exploration? RQ1 - How effective is DLD with data loss problems? RQ2 - Is DLD more effective than state- of-the-art techniques? RQ3 - What is the tradeoff between the snapshot- and property- based oracles? RQ4 - Are data loss faults relevant to developers? 110 real data loss 54 app releases Riganelli et al. "A Benchmark of Data Loss Bugs for Android Apps”, MSR 2019.
  12. RQ1 - How effective is DLD with data loss problems?

    27 83 267 Benchmark Data Loss Detected by DLD
  13. RQ1 - How effective is DLD with data loss problems?

    27 83 267 Benchmark Data Loss Detected by DLD 90% of faults confirmed by developers, see RQ4 in the paper
  14. RQ2 - Is DLD more effective than state-of-the-art techniques? 0

    50 100 150 200 Faulty Activity Benchmark Faults New Faults Spuriuos Violations Alaric DLD
  15. RQ2 - Is DLD more effective than state-of-the-art techniques? 0

    50 100 150 200 Faulty Activity Benchmark Faults New Faults Spuriuos Violations Alaric DLD COMPARISON TO QUANTUM IN THE PAPER
  16. RQ3 - What is the tradeoff between the snapshot- and

    property- based oracles? 73% 18% 9% snapshot-based oracle property-based oracle both incomplete rotation 74% 21% 5% Data loss detected Spurious oracle violations
  17. RQ3 - What is the tradeoff between the snapshot- and

    property- based oracles? 73% 18% 9% snapshot-based oracle property-based oracle both incomplete rotation 74% 21% 5% Data loss detected Spurious oracle violations 0.1%