tracking the software quality of android applications ... · tracking the software quality of...
TRANSCRIPT
Tracking the Software Quality of Android Applicationsalong their Evolution
Geoffrey Hecht, Omar Benomar, Romain Rouvoy, Naouel Moha,Laurence Duchien
UQAM/Université Lille 1/Inria
11/11/2015 (ASE 2015, Lincoln, Nebraska)
1 / 60
2 / 60
How to track quality ?
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
3 / 60
How to track quality ?
Tracking QualityBugs
MetricsPerformanceChange-pronenessAntipatterns
4 / 60
How to track quality ?
Tracking QualityBugsMetrics
PerformanceChange-pronenessAntipatterns
5 / 60
How to track quality ?
Tracking QualityBugsMetricsPerformance
Change-pronenessAntipatterns
6 / 60
How to track quality ?
Tracking QualityBugsMetricsPerformanceChange-proneness
Antipatterns
7 / 60
How to track quality ?
Tracking QualityBugsMetricsPerformanceChange-pronenessAntipatterns
8 / 60
What are antipatterns ?
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
9 / 60
What are antipatterns ?
AntipatternsBad pratices
Impede maintenanceDegrade performance
10 / 60
What are antipatterns ?
AntipatternsBad praticesImpede maintenance
Degrade performance
11 / 60
What are antipatterns ?
AntipatternsBad praticesImpede maintenanceDegrade performance
12 / 60
What are antipatterns ?
Example : Blob
System
InputHandler
Driver
UI
Entity
Utils
SubSystem
Manager
View
Theme
Analyzer
Database
13 / 60
Why android antipatterns ?
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
14 / 60
Why android antipatterns ?
Why android antipatterns ?
Mobile app specifity (battery, network...)
Android frameworkQuality and performance matterLack of studies
15 / 60
Why android antipatterns ?
Why android antipatterns ?
Mobile app specifity (battery, network...)Android framework
Quality and performance matterLack of studies
16 / 60
Why android antipatterns ?
Why android antipatterns ?
Mobile app specifity (battery, network...)Android frameworkQuality and performance matter
Lack of studies
17 / 60
Why android antipatterns ?
Why android antipatterns ?
Mobile app specifity (battery, network...)Android frameworkQuality and performance matterLack of studies
18 / 60
Why android antipatterns ?
Useful for
19 / 60
Why android antipatterns ?
Example of Android antipattern : UI Overdraw
20 / 60
The Paprika approach
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
21 / 60
The Paprika approach
A four-step approach
GraphDB
APK
Paprikamodel
Metadata
Step 1 : Model Generation
Constructmodel
Extractmetrics
Step 3 : Antipattern Detection
Determinethresholds
Executequeries
Graphmodel
Antipatternqueries
Detectedantipatterns
Step 2 : Model Conversion
Convertentities
Convertmetrics
Step 4 : Software QualityEvolution Computation
Buildestimationmodel
Computequalityscore
Softwarequaityevolution
22 / 60
The Paprika approach
Step 1-2
GraphDB
APK
Paprikamodel
Metadata
Step 1 : Model Generation
Constructmodel
Extractmetrics
Graphmodel
Step 2 : Model Conversion
Convertentities
Convertmetrics
23 / 60
The Paprika approach
A graph model
24 / 60
The Paprika approach
Step 3
GraphDB
Step 3 : Antipattern Detection
Determinethresholds
Executequeries
Graphmodel
Antipatternqueries
Detectedantipatterns
25 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)
Complex Class (CC)Long Method (LM)Member Ignoring Method (MIM)UIO Overdraw (UIO)Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
26 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)
Long Method (LM)Member Ignoring Method (MIM)UIO Overdraw (UIO)Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
27 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)Long Method (LM)
Member Ignoring Method (MIM)UIO Overdraw (UIO)Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
28 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)Long Method (LM)Member Ignoring Method (MIM)
UIO Overdraw (UIO)Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
29 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)Long Method (LM)Member Ignoring Method (MIM)UIO Overdraw (UIO)
Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
30 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)Long Method (LM)Member Ignoring Method (MIM)UIO Overdraw (UIO)Leaking Inner Class (LIC)
Heavy Broadcast Receiver (HBR)
31 / 60
The Paprika approach
Detected antipatterns
Blob Class (BLOB)Complex Class (CC)Long Method (LM)Member Ignoring Method (MIM)UIO Overdraw (UIO)Leaking Inner Class (LIC)Heavy Broadcast Receiver (HBR)
32 / 60
The Paprika approach
MIM Query
MATCH (m :Method)WHERE NOT HAS(m.is_static)AND NOT HAS(m.is_init)AND NOT m-[ :USES]->( :Variable)AND NOT (m)-[ :CALLS]->( :Method)RETURN m
33 / 60
The Paprika approach
Step 4
Detectedantipatterns
Step 4 : Software QualityEvolution Computation
Buildestimationmodel
Computequalityscore
Softwarequaityevolution
34 / 60
The Paprika approach
Example of residuals for linear regression used for quality estimation
35 / 60
Study
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
36 / 60
Study
Research questionsRQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?
RQ2 : How does software quality evolve in Android applications ?
37 / 60
Study
Research questionsRQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?RQ2 : How does software quality evolve in Android applications ?
38 / 60
Study
Dataset3568 versions of 106 apps
Top 150 of each category on Google PlayMinimum 20 versions (June 2013-2014)
39 / 60
Study
Dataset3568 versions of 106 appsTop 150 of each category on Google Play
Minimum 20 versions (June 2013-2014)
40 / 60
Study
Dataset3568 versions of 106 appsTop 150 of each category on Google PlayMinimum 20 versions (June 2013-2014)
41 / 60
Study
APP_W
ALL
PA
PER
BO
OK
S_A
ND
_REFE
REN
CE
BU
SIN
ESS
CO
MIC
S
CO
MM
UN
ICA
TIO
N
ED
UC
ATIO
N
EN
TER
TA
INM
EN
T
FIN
AN
CE
GA
ME
HEA
LTH
_AN
D_F
ITN
ESS
LIFE
STYLE
MED
IA_A
ND
_VID
EO
MED
ICA
L
MU
SIC
_AN
D_A
UD
IO
NEW
S_A
ND
_MA
GA
ZIN
ES
PER
SO
NA
LIZ
ATIO
N
PH
OTO
GR
APH
Y
PR
OD
UC
TIV
ITY
SH
OPPIN
G
SO
CIA
L
SPO
RTS
TO
OLS
TR
AV
EL_
AN
D_L
OC
AL
WEA
TH
ER
category
0
5
10
15
20#
app
Number of apps per category
42 / 60
Study
10
00
0
50
00
0
10
00
00
50
00
00
10
00
00
0
50
00
00
0
10
00
00
00
50
00
00
00
10
00
00
00
0
50
00
00
00
0
# downloads
0
500
1000
1500
2000
2500
3000
3500
4000
4500avera
ge #
cla
sses
Average number of classes per download categories
43 / 60
Study
RQ1RQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?
5 trends
44 / 60
Study
RQ1RQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?5 trends
45 / 60
Study
Constant Decline (LM)
0 1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
version
800
700
600
500
400
300
200
qualit
y s
core
com.picsart.studio
46 / 60
Study
Constant Rise (CC)
0 1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
version
36
38
40
42
44
46
48
50
52
qualit
y s
core
flipboard.app
47 / 60
Study
Stability (LIC)
0 1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
version
120
100
80
60
40
20
0
20
qualit
y s
core
org.mozilla.firefox
48 / 60
Study
Sudden Decline (BLOB)
0 1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version
75
70
65
60
55
50
qualit
y s
core
com.evernote
49 / 60
Study
Sudden Rise (LIC)
0 1 2 3 4 5 6 7 8 9
10
11
12
13
14
15
version
20
40
60
80
100
120
qualit
y s
core
com.skype.raider
50 / 60
Study
Other observations
20
40
60
80
100
120
140
160C
C
0
200
400
600
800
1000
1200
MIM
0 5 10 15 20 25 30 35version
100
200
300
400
500
600
700
800
900
LM
0 5 10 15 20 25 30 35version
0
10
20
30
40
50
BLO
B
com.imo.android.imoim
51 / 60
Study
Other observations
500
400
300
200
100
0
100
200LM
0 5 10 15 20 25version
0
10
20
30
40
50
60
BLO
Bcom.onemanwithcameralomo
52 / 60
Study
RQ2RQ2 : How does software quality evolve in Android applications ?
Case Study of Twitter
53 / 60
Study
RQ2RQ2 : How does software quality evolve in Android applications ?Case Study of Twitter
54 / 60
Study
Other observations
0 1 2 3 4 5 6 7 8 91
01
11
21
31
41
51
61
71
81
92
02
12
22
32
42
52
62
72
82
93
03
13
23
33
43
53
63
73
83
94
04
14
24
34
44
54
64
74
84
95
05
15
25
35
45
55
65
75
85
96
06
16
26
36
46
56
66
76
86
97
07
17
27
37
47
5
version
0
1000
2000
3000
4000
5000
# c
lass
es
com.twitter.android
55 / 60
Study
CC score
0 1 2 3 4 5 6 7 8 91
01
11
21
31
41
51
61
71
81
92
02
12
22
32
42
52
62
72
82
93
03
13
23
33
43
53
63
73
83
94
04
14
24
34
44
54
64
74
84
95
05
15
25
35
45
55
65
75
85
96
06
16
26
36
46
56
66
76
86
97
07
17
27
37
47
5
version
25
20
15
10
5
0
5
10
15
20
qualit
y s
core
com.twitter.android
56 / 60
Future works
Plan
1 How to track quality ?
2 What are antipatterns ?
3 Why android antipatterns ?
4 The Paprika approach
5 Empirical Study
6 Future works
57 / 60
Future works
Future worksEvolution of external attributes (app reviews)
Impact on performance
58 / 60
Future works
Future worksEvolution of external attributes (app reviews)Impact on performance
59 / 60
Future works
Thank you for your attention
60 / 60