Transcript
Page 1: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

1

Software Engineering

Prof. Dr. Colin Atkinson 1

Overview

1. Find out why software engineering is important

■ see some software engineering failures

2. Get acquainted with –

■ the Chair of Software Engineering

■ the research

■ the people

■ the teaching

Colin Atkinson, Marcus Kessel, Marcus Schumacher

droidcon. 2012, Berlin

Merodroid

A Search Engine for

Android Software Components

Page 2: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

2

Software Engineering

Prof. Dr. Colin Atkinson 2

Outline

■ About Us

■ Motivation

■ Search Android Components with Merodroid

■ What is Merodroid?

■ Core Features

■ How does it work?

■ Indexing of Android Software Artifacts

■ Analysis and Recognition

■ Demo

■ Conclusion

■ Appendix

Page 3: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

3

Software Engineering

Prof. Dr. Colin Atkinson 3

About Us

■ Chair of Software Engineering, Prof.

Colin Atkinson, at the University of

Mannheim [1]

■ Research Areas

■ Software Reuse

■ Model-Driven Development

■ Component/Service Oriented

Development

■ Search Driven Development – current

research project

■ Merobase – Software Component

Finder

Prof. Dr. Colin Atkinson

M.Sc. Wirtschaftsinformatik

Marcus Kessel

Dipl. Informatik

Marcus Schumacher

Page 4: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

4

Software Engineering

Prof. Dr. Colin Atkinson 4

Motivation

■ Fast-growing market of mobile devices, mainly smartphones and internet

tablets

■ Lots of mobile applications already exist (~375.000 in Android Market,

February 2012 [2])

■ High demand for new mobile applications (e.g. provide all kind of

functionality as “apps”)

■ Developer perspective

■ Redundant work ..

■ Tired of reinventing the wheel for every new app

■ Organizational perspective

■ Reduce the effort and save money at application development

■ Component Reuse

Page 5: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

5

Software Engineering

Prof. Dr. Colin Atkinson 5

Our Approach: Search-Driven Development

■ Search-Driven Development

■ Semantic component retrieval

■ Special query language and constraints to retrieve

potential reuse candidates

■ Merobase

■ General search engine for software components

■ Merodroid

■ Component search engine based on Merobase

adjusted to the needs of Android application

developers

■ Specifics of Android application development

■ Project layout, resources,

AndroidManifest.xml

■ Special component types

■ …

Page 6: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

6

Software Engineering

Prof. Dr. Colin Atkinson 6

Core Features (1)

■ App queries

■ Browse all components of an “app”

■ Includes additional information sources (AndroidManifest.xml, Android

Market information, …)

■ Component queries

■ Query for specific Android application

components

■ activity, fragment, service, content

provider, broadcast receiver

■ Interface/method signature search

■ Keyword search

■ Constraints (restrict result set)

■ Combined queries: app + component + constraints

Page 7: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

7

Software Engineering

Prof. Dr. Colin Atkinson 7

Core Features (2)

■ Create queries by

■ Using a graphical wizard

■ Hand

■ Component details

■ Source and component type

■ Tree-like view of methods and fields

■ Metrics

■ Documentation (JavaDoc)

■ Intent filter and capabilities defined in AndroidManifest.xml

■ Android Market information (if available)

■ Unrelated Android components

■ Usual Java classes

■ Publish your own components

Page 8: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

8

Software Engineering

Prof. Dr. Colin Atkinson 8

Indexing Android Software Artifacts (1)

Crawling Recognition

of artifact type

Parsing & Linking

Index

Crawling Process

Iterate over index

Recognition of

components Linking Index

Analysis: Recognition & Data Mining Process

Page 9: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

9

Software Engineering

Prof. Dr. Colin Atkinson 9

Indexing Android Software Artifacts (2)

■ Supported Android software artifacts

■ Application projects (incl. resources)

■ APK, Dalvik Executable

■ Single classes (source & binary)

■ Java classes are analyzed and indexed

■ Fields, methods, inheritance hierarchy, dependencies …

■ AndroidManifest.xml

■ Additional information source

■ Capabilities of components (intent filter)

■ Recognition of components

■ Android (application) components (e.g. activity) are tagged

■ Tagged components are linked with additional information from

AndroidManifest.xml

■ E.g. Intent filter declarations

Page 10: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

10

Software Engineering

Prof. Dr. Colin Atkinson 10

Android Component Recognition

■ Analysis of inheritance hierarchy of classes represented by the data model

(tree traversal)

■ Interfaces/classes of key components are known from the Android API

■ Interfaces/classes can be easily configured for later extensibility (e.g.

Android API changes)

■ For instance, any Activity implementation has to inherit from the class

android.app.Activity

Page 11: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

11

Software Engineering

Prof. Dr. Colin Atkinson 11

Demo

Page 12: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

12

Software Engineering

Prof. Dr. Colin Atkinson 12

Conclusion

■ Merodroid – Android Component Finder

■ Software component search engine adjusted to the needs of Android

Application developers

■ Powerful query language

■ Links several information sources (components, AndroidManifest.xml,

Android Market ..)

■ Public web service available at merodroid.com

■ Search for Android application projects & components crawled from

open source repositories

■ Future work

■ Eclipse plugin (http://code-conjurer.org)

■ Test-driven development support (query components by using JUnit

tests/TestSheets)

Page 13: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

13

Software Engineering

Prof. Dr. Colin Atkinson 13

Questions

Thank you for listening!

Page 15: droidcon 2012: Merodroid – A Search-Engine for Android Software Components, Marcus Kessel, University Mannheim

15

Software Engineering

Prof. Dr. Colin Atkinson 15

Appendix: Query Samples

Description Query Result

Find app by id packageId:com.example.

app¹ All related components

Find Android application

component

android:activity or android:service or android:fragment or android:provider or android:receiver or

All Activities

All Services

All Fragments

All ContentProviders

All BroadcastReceivers

Find all Activities of app .. packageId:com.example.app¹ android:activity

All Activities of app ..

Find all Activities

supporting mime-type:

image/jpeg

android:activity mimetype:image/jpeg

List of all Activities supporting

specified mime-type (known from

manifest)

Find all Activities

supporting mime-type:

image/jpeg in app ..

packageId:com.example.app¹ android:activity mimetype:image/jpeg

List of all Activities supporting

specified mime type in app ..

Find Activity by name android:activity Sudoku List of all Activities containing

„Sudoku“ as name

¹ Unique package id known from AndroidManifest.xml (also widely used in several app markets as identifier)