36
Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs Dan Han, Chenlei Zhang, Xiaochao Fan, Abram Hindle, Kenny Wong and Eleni Stroulia Department of Computing Science University of Alberta 1

Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Embed Size (px)

DESCRIPTION

This is the presentation slides for our paper in WCRE 2012: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs (http://webdocs.cs.ualberta.ca/~chenlei1/publication/Zhang-wcre-2012.pdf).

Citation preview

Page 1: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Understanding Android Fragmentation with Topic

Analysis of Vendor-Specific Bugs

Dan Han, Chenlei Zhang, Xiaochao Fan, Abram Hindle, Kenny Wong and Eleni StrouliaDepartment of Computing Science

University of Alberta

Page 2: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Outline

Page 3: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Introduction

Page 4: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Hardware-Based Fragmentation

http://www.android.com/devices/?country=all

Page 5: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Software-Based Fragmentation

http://www.blackeco.com/petites-speculations-autour-de-la-prochaine-version-dandroid/

Page 6: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Why do we care

More than 20 Android device manufacturers

Multiple Android versions

6

Hundreds of different Android devices

Developers

Users

Stakeholders

Page 7: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

What do we do in this study

Goal: search for evidence of Android fragmentation within Android ecosystem based on the Android bug reports

Approach: apply topic model and topic analysis

Page 8: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Previous Work

Page 9: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Topic Model and Topic Analysis

Topic Model: a statistical model for discovering abstract topics that occur in a collection of documents. Latent Dirichlet Allocation (LDA)

Topic Analysis: extract and evaluate the topics from a corpus of text documents through topic models Traceability recovery: Asuncion et al., Lukins et al., Hindle et

al.

Feature location: Marcus et al., Poshyvanyk et al., Grant et al.

Software evolution and trend analysis: Thomas et al., Martie et al.

Page 10: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Differences between previous work and our work

Previous work applied unsupervised topic models, e.g. LDA

We performed Labeled-LDA, a supervised topic model to analyze topic evolution

We compared the performance between LDA and Labeled-LDA on our dataset

Page 11: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

LDA and Labeled-LDA

Labeled-LDA A novel method applied in

software engineering so far

Manual labeling Supervised topic

modeling algorithm Labeled-LDA only

predicts the relevance between each document and its labels

LDA Well studied in software

engineering Unsupervised topic

modeling algorithm Need documents and

number of topics N as input

LDA predicts the relevance between each document and all the N topics

Page 12: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Difference between a topic and a label

Topic: A word distribution extracted from bug

reports by topic models

Label: The annotation of a document

Page 13: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Methodology

Page 14: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Methodology

Page 16: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Create labels for Android bug reports

Feature-oriented labels for Android bug reports

Android labels Features in Android versionse.g. Language, Bluetooth

Popular applicationse.g. Google Maps, Gmail

Hardware of Android devices e.g. Keyboard, GPS

Page 17: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Label Android bug reports

60 person-hours of manual labeling effort

Labeled bug reports are public now

HTC – 72 labels in total Motorola – 58 labels in total

Page 18: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Apply Labeled-LDA

Page 19: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Apply LDA

Try a range of N to find the most distinct topics

Label each topic using our manual labels for the bug reports of HTC and Motorola

2 hours of labeling effort

Page 20: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Comparing LDA and Labeled-LDA

Each topic model generates the document-topic matrix

Determine if LDA generates similar results to Labeled-LDA

Compute and compare the Jaccard similarity of documents related to each topic generated by LDA and Labeled-LDA

Page 21: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Comparing Topic Models

Page 22: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Comparing Topic Models in HTCPairwise Jaccard Similarity between each topic in LDA and Labeled-LDA

Labeled-LDA

LDA

Page 23: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Diagonal Entries in HTC

Labeled-LDA

LDA

Page 24: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Comparing Topic Models in MotorolaPairwise Jaccard Similarity between each topic in LDA and Labeled-LDA

LDA

Labeled-LDA

Page 25: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Conclusion of comparing LDA and Labeled-LDA

Mean Jaccard similarities of the diagonal entries are 0.2 for HTC and 0.08 for Motorola

The number of bug reports related to same labels in LDA and Labeled-LDA are different ( tests: p<0.01) for both HTC and Motorola

Labeled-LDA produced more feature relevant topics than LDA

2

Page 26: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Topic Analysis

Page 27: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Categorized Topics

Common Topics Unique Topics

Unique TopicsCommon

Topics Unique Topics

HTC Motorola

Page 28: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Common Topics

Both vendors share many identical topic wordsLabel HTC Motorola

bluetooth bluetooth, headset, car, connect, device, connection, version, data, app, desire, 2.2, work, connects, behavior, 2.1

bluetooth, headset, droid, device, connected, connect, devices, calls, car, issue, connection, 2.2, car, pair, time

Relevance of common topic “bluetooth” in HTC and MotorolaAndroid 2.1 Android 2.2

Page 29: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Common Topics

Topics of each vendor tend to have vendor-specific terms

Label HTC Motorola

display screen, version, desire, behavior, app, home, number, code, final, press, sure, user, black, new, power

droid, screen, button, correct, home, display, behavior, landscape, 2.1, menu, bar, xoom, device, user, status

http://www.motorola.com/xoomhttp://en.wikipedia.org/wiki/Motorola_droid

http://en.wikipedia.org/wiki/HTC_Desire

Page 30: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Unique Topics in HTCLabel HTC Motorola

keyboard keyboard, input, text, key, version, number, typing, on-screen, mode, field, landscape, virtual, keys, type, message

keyboard, droid, keys, text, press, space, box, open, device, key, app, software, 2.0.1, landscape

Relevance of unique topic “keyboard” in HTCAndroid 2.1Android 1.5

Page 31: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Unique Topics in Motorola

Label HTC Motorola

GPS gps, data, position, location, maps, google, time, lock, wrong, icon, turn, home, latitude, unit, tag, available

maps, gps, google, app, droid, location, application, navigation, map, device, traffic, time, upgrade, turn, route

Relevance of unique topic “GPS” in Motorola

Android 2.2

Page 32: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Discussion

Page 33: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Fragmentation Discussion

Software-Based Fragmentation New features and changes contribute the bug reports Difficult to test across all of the vendor and product-lines

Relevance of common topic “bluetooth” in HTC and Motorola

Android 2.1 Android 2.2

Page 34: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

Fragmentation Discussion

Hardware-Based Fragmentation Different product lines were associated with different topics Evident by differing bug topics and product specific issues

Label HTC Motorola

display screen, version, desire, behavior, app, home, number, code, final, press, sure, user, black, new, power

droid, screen, button, correct, home, display, behavior, landscape, 2.1, menu, bar, xoom, device, user, status

Page 35: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

• Introduction• Previous Work• Methodology• Comparing Topic Models• Fragmentation Topic Analysis• Fragmentation Discussion• Conclusion

Conclusion

Page 36: Understanding Android Fragmentation with Topic Analysis of Vendor-Specific Bugs

ConclusionFound how fragmentation is manifested within Android between HTC and Motorola

Incompatibility issues Portability issues

Compared the performance of Labeled-LDA and LDA

Labeled-LDA produced more feature relevant topics than LDA Labeled-LDA need more manual effort http://softwareprocess.es/static/Fragmentation.html (http://goo.gl/SwGDT)

Could be useful to make project dashboards, process mining and software process recovery