Abstract

5 API methods are not used alone, but in groups and following some patterns. However, despite being a key information for API users, most usage patterns are not explicitly described in official API documents. In this article, we report a study to evaluate the feasibility of automatically enriching API documents with information on usage patterns. For this purpose, we extract and analyze 1,952 usage patterns, from a set of 396 Android applications. As part of our findings, we report that the Android API has many undocumented and non-trivial usage patterns, which can be inferred using association rule mining algorithms. We also describe a field study where a version of the original Android documentation was instrumented with the extracted usage patterns and source code examples. During 17 months, this documentation received 77,863 visits from real Android developers. . 6

Highlights

  • Methods in modern APIs are not used independently of each other, but according to some patterns (Robillard et al, 2013; Long, Wang & Cai, 2009)

  • 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

  • Even considering that this dataset might not represent an ideal sample of the whole population of Android applications, this result suggests that a considerable proportion of the Android API methods are rarely used by real clients

Read more

Summary

Introduction

Methods in modern APIs are not used independently of each other, but according to some patterns (Robillard et al, 2013; Long, Wang & Cai, 2009). The Android JavaDoc page that documents the beginTransaction method explicitly reports that it is usually used together with setTransactionSucessful and endTransaction. This page is an exception and most usage patterns are not documented at all. We extend a tool, called APIMiner (Montandon et al, 2013), to mine usage patterns from a dataset of Android open-source applications. This tool instruments the original API documents with information on the extracted usage patterns

Methods
Results
Discussion
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.