Prioritizing Corrective Maintenance Activities for Android Applications: An Industrial Case Study on Android Crash Reports
1. V.Lenarduzzi1, A.C. Stan1, D.Taibi1,2, G.Venters1 and M.Windegger3
1 Free University of Bolzano-Bozen, Italy
2 Tampere University of Technology, Finland
3 SASAbus, Bolzano-Bozen, Italy
Software Quality Days 2018
January 16 - 19, 2018 in Vienna
Prioritizing Corrective Maintenance
Activities for Android Applications:
An Industrial Case Study on Android Crash Reports
2. The Problem
Unhandled exceptions in Android apps
• Often not considered
• Possible faults
• Hard to reproduce
• Reflected in negative comments in the Play Store
• Drop of users
3. Classify Uncaught Exceptions
- Exception that caused crashes…
Prioritize issues removal activities
- Based on uncaught exceptions
- based on the impact on end users
The Idea
4. Exception Monitoring Tools
Tool Programming Language
OverOps Java, Scala, Closure, .NET
Airbrake All major ones
Sentry All major ones
Rollbar All major ones
Raygun All major ones
Honeybadger All major ones
Stackhunter Java
Bugsnag All major ones
Exceptionless All major ones
Firebase Android, iOS
5. Firebase
- Provided to all Google Play Store Apps
- Lists fatal crashes
- Provide (high level) information on uncaught
exceptions
- Do not provide
- summary of exceptions
- Statistics on exceptions
The Android Crash Report
6. Firebase – Crash ReportPackageName
DateAndTime
Device
AndroidOSVersion
AppVersionName
AppVersionCode
Exception Class Name Exception Message
it.sasabz.and
roid.sasabus
2013-09-
04T07:33:37Z
m0 16 0.2.12 23 java.lang.RuntimeException Only one Looper may be created per thread
it.sasabz.and
roid.sasabus
2013-09-
02T18:25:34Z
GT-I9100 16 0.3.01 24
android.view.WindowManager$Bad
TokenException
Unable to add window -- token
android.os.BinderProxy@41b6d448 is not valid; is your activity
running?
it.sasabz.and
roid.sasabus
2013-09-
03T14:09:20Z
cx2 10 0.3.01 24
android.database.sqlite.SQLiteExcep
tion
no such column: partenza: , while compiling: Select * from
favoriten where partenza="(Bolzano) via Maso della Pieve 2 -
(Bozen) Pfarrho" and destinazione="(Bolzano) Ospedale 1 -
(Bozen) Krankenhaus 1";
7. The Case Study
Goal:
Analyze unhandled exceptions
For the purpose of prioritizing them
With respect to their frequency
RQ1: Which are the most frequently recurring exceptions?
RQ1: Which and Many exceptions-related issues should be fixed in
order to reduce the number of exceptions by 70%
RQ3: Which classes generate more exceptions?
9. The Case Study
SASABus App (Google Play Store)
• 50K Users
• 1208 exceptions (4 years)
• 453 comments
• >20% complaining about crashes
10. RQ1: frequently recurring exceptions
• 1208 total exceptions
• 0.83/day
• 19 different types of exceptions
• 2 exceptions caused occurred in more
than 50% of cases
12. RQ2: Frequency of exception per class
Java Class Frequency %
android.graphics.Bitmap 223 18.5
android.os.Looper 211 17.5
java.util.Collections$UnmodifiableCollection 106 8.8
it.sasabz.sasabus.ui.busstop.NextBusFragment$2 81 6.7
dalvik.system.BaseDexClassLoader 57 4.7
14. Results
Six classes generated 70% of exceptions
Class affected by the same exception
- frequently affected by the same code smell
- Spaghetti code -> runtime exception
- Other 3 exc -> swiss army knife
Results are not statistically significant
- only a limited number of classes analysed
15. Follow-up
We set a continuous exception monitoring (Sentry)
- Automatically create statistics on exceptions
- Automatically create Jira issues for exceptions
We trained the developers on design patterns and code smells
All classes have been refactored removing code smells
From May 2017 to Dec 2017
- only 87 exceptions occurred (out of 200 expected).
- the four exceptions considered occurred only 5 times
16. Conclusions & Future Work
• Continuous Exception Monitoring tools can help to improve
software quality
• More advanced Exception Monitoring tools could improve the
issue tracking process
• Industrial case studies are needed to proof if exceptions are
correlated with Code Smells or other SW metrics