SlideShare a Scribd company logo
1 of 46
Download to read offline
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
Recreating Android Activity
Running
(visible)
Destroyed
Created
Running
(visible)
create activity restore activity state
save activity state1
2 3
https://disco.unimib.it
oliviero.riganelli
………….
Instance State
https://disco.unimib.it
oliviero.riganelli
………….
Recreating an Activity
https://disco.unim
ib.it
oliviero.riganelli
………….Running
(visible)
Destroyed
save activity state1
https://disco.unimib.it
oliviero.riganelli
………….
Instance State
Recreating an Activity
https://disco.unimib.it
oliviero.riganelli
………….
Created
create activity2
https://disco.unim
ib.it
oliviero.riganelli
………….
Instance State
Recreating an Activity
https://disco.unimib.it
oliviero.riganelli
………….
https://disco.unimib.it
oliviero.riganelli
………….
Created
Running
(visible)
restore activity state3
Instance State
Recreating an Activity
https://disco.unimib.it
oliviero.riganelli
………….
Data Loss
Instance State
https://disco.unimib.it
oliviero.riganelli
………….
https://disco.unim
ib.it
Running
(visible)
Destroyed
save activity state1
https://disco.unimib.it
oliviero.riganelli
………….
Data Loss
Instance State
https://disco.unimib.it
oliviero.riganelli
………….
Created
create activity2
https://disco.unim
ib.it
Instance State
Data Loss
https://disco.unimib.it
oliviero.riganelli
………….
https://disco.unimib.it
Created
Running
(visible)
restore activity state3
Instance State
Data Loss
https://disco.unimib.it
oliviero.riganelli
………….
https://disco.unimib.it
Created
Running
(visible)
restore activity state3
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
Pervasiveness of Data Loss
Problems
APP APP APP APP APP
Pervasiveness of Data Loss
Problems
88%
Apps with data loss
12%
App without data loss
Pervasiveness of Data Loss
Problems
88%
Apps with data loss
12%
App without data loss
Pervasiveness of Data Loss
Problems
88%
Apps with data loss
12%
App without data loss
Pervasiveness of Data Loss
Problems
88%
Apps with data loss
12%
App without data loss
Data Loss Detector (DLD)
https://disco.unimib.it
oliviero.riganelli
………….
https://disco.unimib.it
Data Loss Detector (DLD)
Touch buttons
Type text
Press HOME key
…
Data Loss Detector (DLD)
Touch buttons
Type text
Press HOME key
…
GrantPermissionsActivity
<FIRST>
GrantPermissionsActivity
TouchEvent(“ALLOW”) TouchEvent(“ALLOW”)
TouchEvent(“3”)
MainActivity
MainActivity
Launcher
KeyEvent(HOME)
GUI Model
TouchEvent(“3”)
GrantPermissionsActivity
<FIRST>
GrantPermissionsActivity MainActivity
MainActivity
Launcher
TouchEvent(“ALLOW”) TouchEvent(“ALLOW”)
KeyEvent(HOME)
GUI Model
GUI:
ACTIONS: KeyEvent(HOME)
TouchEvent(“ALLOW”)
…
STATE
TouchEvent(“3”)
GrantPermissionsActivity
<FIRST>
GrantPermissionsActivity MainActivity
MainActivity
Launcher
TouchEvent(“ALLOW”) TouchEvent(“ALLOW”)
KeyEvent(HOME)
GUI Model
Type: Touch
View:
Command: adb shell input …
EVENT
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
TouchEvent(“OK”)
Sn
TouchEvent(“NO THANKS”)
KeyEvent(MENU)
Biased Model-Based Exploration
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
P:0.333
P:0.333
P:0.333
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
P:0.333
P:0.333
P:0.333
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
P:0.033
P:0.483
P:0.483
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
P:0.033
P:0.483
P:0.483
Sn
KeyEvent(MENU)
Biased Model-Based Exploration
P:0.033
P:0.933
P:0.033
90% Unexecuted event 10% Any event
TouchEvent(“OK”)
TouchEvent(“NO THANKS”)
Data-Loss-Revealing Actions
NEW STATE
Systematic
Probabilistic
ALREADY VISITED STATE
Systematic data-loss-revealing action
https://
oliviero.riganelli
………….
Systematic data-loss-revealing action
https://
oliviero.riganelli
………….
https://disco.unimib.it
oliviero.riganelli
………….
https://
oliviero.riganelli
………….
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
Probabilistic data-loss-revealing actionhttps://
oliviero.rig
………….
https://
oliviero.rig
…
…
…
…
.
https://
oliviero.riganelli
…
…
…
…
.
https://
oliviero.rig
…
…
…
…
.
https://
oliviero.riganelli
…
…
…
…
.
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
Data Loss Oracles
Snapshot
Property
…
‘content_description':
…
…
‘content_description':
...
Before double rotation After double rotation
Data Loss Oracles
Snapshot
Property
…
‘content_description':
'Open navigation
drawer',
…
…
‘content_description':
‘Close navigation
drawer',
...
Before double rotation After double rotation
EvaluationEvaluation
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.
RQ1 - How effective is DLD
with data loss problems?
110
Benchmark Data Loss
RQ1 - How effective is DLD
with data loss problems?
27 83 267
Benchmark Data Loss Detected by DLD
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
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
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
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
https://github.com/datalossdetector/DLD
Get Your Copy
Now!!!

More Related Content

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Data loss detector: automatically revealing data loss bugs in Android apps