Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of...

60
Tracking the Software Quality of Android Applications along 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

Transcript of Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of...

Page 1: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 2: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

2 / 60

Page 3: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 4: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

How to track quality ?

Tracking QualityBugs

MetricsPerformanceChange-pronenessAntipatterns

4 / 60

Page 5: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

How to track quality ?

Tracking QualityBugsMetrics

PerformanceChange-pronenessAntipatterns

5 / 60

Page 6: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

How to track quality ?

Tracking QualityBugsMetricsPerformance

Change-pronenessAntipatterns

6 / 60

Page 7: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

How to track quality ?

Tracking QualityBugsMetricsPerformanceChange-proneness

Antipatterns

7 / 60

Page 8: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

How to track quality ?

Tracking QualityBugsMetricsPerformanceChange-pronenessAntipatterns

8 / 60

Page 9: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 10: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

What are antipatterns ?

AntipatternsBad pratices

Impede maintenanceDegrade performance

10 / 60

Page 11: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

What are antipatterns ?

AntipatternsBad praticesImpede maintenance

Degrade performance

11 / 60

Page 12: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

What are antipatterns ?

AntipatternsBad praticesImpede maintenanceDegrade performance

12 / 60

Page 13: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

What are antipatterns ?

Example : Blob

System

InputHandler

Driver

UI

Entity

Utils

SubSystem

Manager

View

Theme

Analyzer

Database

13 / 60

Page 14: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 15: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Why android antipatterns ?

Mobile app specifity (battery, network...)

Android frameworkQuality and performance matterLack of studies

15 / 60

Page 16: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Why android antipatterns ?

Mobile app specifity (battery, network...)Android framework

Quality and performance matterLack of studies

16 / 60

Page 17: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Why android antipatterns ?

Mobile app specifity (battery, network...)Android frameworkQuality and performance matter

Lack of studies

17 / 60

Page 18: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Why android antipatterns ?

Mobile app specifity (battery, network...)Android frameworkQuality and performance matterLack of studies

18 / 60

Page 19: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Useful for

19 / 60

Page 20: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Why android antipatterns ?

Example of Android antipattern : UI Overdraw

20 / 60

Page 21: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 22: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 23: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 24: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

The Paprika approach

A graph model

24 / 60

Page 25: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

The Paprika approach

Step 3

GraphDB

Step 3 : Antipattern Detection

Determinethresholds

Executequeries

Graphmodel

Antipatternqueries

Detectedantipatterns

25 / 60

Page 26: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 27: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 28: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 29: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 30: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 31: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 32: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 33: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 34: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

The Paprika approach

Step 4

Detectedantipatterns

Step 4 : Software QualityEvolution Computation

Buildestimationmodel

Computequalityscore

Softwarequaityevolution

34 / 60

Page 35: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

The Paprika approach

Example of residuals for linear regression used for quality estimation

35 / 60

Page 36: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 37: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 38: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 39: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

Dataset3568 versions of 106 apps

Top 150 of each category on Google PlayMinimum 20 versions (June 2013-2014)

39 / 60

Page 40: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

Dataset3568 versions of 106 appsTop 150 of each category on Google Play

Minimum 20 versions (June 2013-2014)

40 / 60

Page 41: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

Dataset3568 versions of 106 appsTop 150 of each category on Google PlayMinimum 20 versions (June 2013-2014)

41 / 60

Page 42: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 43: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 44: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

RQ1RQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?

5 trends

44 / 60

Page 45: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

RQ1RQ1 : Can we infer software quality evolution trends across differentversions of Android applications ?5 trends

45 / 60

Page 46: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 47: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 48: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 49: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 50: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 51: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 52: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 53: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

RQ2RQ2 : How does software quality evolve in Android applications ?

Case Study of Twitter

53 / 60

Page 54: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Study

RQ2RQ2 : How does software quality evolve in Android applications ?Case Study of Twitter

54 / 60

Page 55: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 56: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 57: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

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

Page 58: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Future works

Future worksEvolution of external attributes (app reviews)

Impact on performance

58 / 60

Page 59: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Future works

Future worksEvolution of external attributes (app reviews)Impact on performance

59 / 60

Page 60: Tracking the Software Quality of Android Applications ... · Tracking the Software Quality of Android Applications along their Evolution GeoffreyHecht,OmarBenomar,RomainRouvoy,NaouelMoha,

Future works

Thank you for your attention

60 / 60