Mining usage patterns for the Android API

View article
PeerJ Computer Science

Main article text

 

Introduction

  • First, we report a characterization study on the usage of the Android API by client applications. Our central goal is to check whether the Android API and the proposed dataset of Android clients are indeed interesting objects of study.

  • Next, we describe the methodology followed to extract usage patterns for the Android API and we characterize such patterns, in terms of their representativeness and complexity. We also show the results of a validation of the extracted usage patterns with two professional Android developers.

  • Finally, we report a long-term field study, in which our version of the Android API instrumented with usage patterns and associated examples was made available to public access. During 17 months, it received 77,863 visits, coming from 160 countries. We analyze these visits to answer two research questions: (a) Do API users search for source code examples? (b) Do API users search for examples of usage patterns?

Materials & Methods

APIMiner

Mining dataset

Mining usage patterns

Results

Examples and types of patterns

Evaluation by developers

Do you recommend to refer to method Y when documenting method X, since they are usually used together?

Fragment.onActivityCreated(android.os.Bundle) ⇒ Fragment.getActivity()

Field study

RQ #1: do API users search for source code examples?

RQ #2: do API users search for examples of usage patterns?

Discussion

Most Android API methods are underused

Less than 10% of the API methods called by clients have usage patterns

In one out of three opportunities users search for usage patterns

Threats to validity

Conclusion

Additional Information and Declarations

Competing Interests

The authors declare there are no competing interests.

Author Contributions

Hudson S. Borges conceived and designed the experiments, performed the experiments, analyzed the data, contributed reagents/materials/analysis tools, wrote the paper, prepared figures and/or tables, performed the computation work, reviewed drafts of the paper.

Marco Tulio Valente conceived and designed the experiments, analyzed the data, contributed reagents/materials/analysis tools, wrote the paper, reviewed drafts of the paper.

Data Availability

The following information was supplied regarding the deposition of related data:

The dataset with the transactions and usage patterns used in this paper is available at: http://aserg.labsoft.dcc.ufmg.br/apiminer-dataset.

Funding

This work was funded by grants from Brazilian National Research Council (CNPq) and Minas Gerais Research Foundation (FAPEMIG). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

10 Citations 8,700 Views 1,050 Downloads

Your institution may have Open Access funds available for qualifying authors. See if you qualify

Publish for free

Comment on Articles or Preprints and we'll waive your author fee
Learn more

Five new journals in Chemistry

Free to publish • Peer-reviewed • From PeerJ
Find out more