Mining Hidden and Fragmented API Usages in Android Applications
Source abstract
Abstract
Application Programming Interface (API) usage mining is an approach used to extract the common API usage to help developers get used to the APIs. However, in Android applications, the usage can be hidden or fragmented due to class inheritance. Such hidden or fragmented usages could decrease the coverage and accuracy of the existing API mining approaches. Our method aims to resolve the problem of hidden and fragmented usages through API generalization. This generalized usage is expected to be applicable to every class that inherits a class in the usage. In the experiment, among 442,809 Android API usages, 104,839 usages either were hidden or fragmented. By revealing such usages, the accuracy of the code completion was improved by at most 6.66%. The usage generalization was efficient for extracting API usages in Android applications in which the APIs are used through class inheritance.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Software Engineering Research · Web Data Mining and Analysis · Advanced Malware Detection Techniques
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Computer Science and Engineering, Korea University, Seoul 02841, Korea
Funding
National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT)
References (38)
Show source-provided references
1. What Makes APIs Hard to Learn? Answers from Developers10.1109/MS.2009.193 ↗
2. Michail, A. (2000, January 9). Data mining library reuse patterns using generalized association rules. Proceedings of the 22nd International Conference on Software Engineering, Limerick, Ireland.10.1145/337180.337200 ↗
3. Nguyen, A.T., and Nguyen, T.N. (2015, January 16–24). Graph-Based Statistical Language Model for Code. Proceedings of the 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Florence, Italy.10.1109/ICSE.2015.336 ↗
4. Xie, T., and Pei, J. (2006, January 20–28). MAPO: Mining API usages from open source repositories. Proceedings of the International Workshop on Mining Software Repositories, Shanghai, China.10.1145/1137983.1137997 ↗
5. Fowkes, J., and Sutton, C. (2016, January 18). Parameter-free probabilistic API mining across GitHub. Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Seattle, WA, USA.10.1145/2950290.2950319 ↗
6. Buse, R.P.L., and Weimer, W. (2012, January 2–9). Synthesizing API usage examples. Proceedings of the 2012 34th International Conference on Software Engineering (ICSE), Zurich, Switzerland.10.1109/ICSE.2012.6227140 ↗
7. Data-driven approach to application programming interface documentation mining: A review10.1002/widm.1369 ↗
8. Zhong, H., Xie, T., Zhang, L., Pei, J., and Mei, H. (2009, January 3–10). MAPO: Mining and Recommending API Usage Patterns. Proceedings of the European Conference on Object-Oriented Programming, Genoa, Italy.10.1007/978-3-642-03013-0_15 ↗
9. Wang, J., Dang, Y., Zhang, H., Chen, K., Xie, T., and Zhang, D. (2013, January 18–19). Mining succinct and high-coverage API usage patterns from source code. Proceedings of the 2013 10th Working Conference on Mining Software Repositories (MSR), San Francisco, CA, USA.10.1109/MSR.2013.6624045 ↗
10. Nguyen, T.T., Nguyen, H.A., Pham, N.H., Al-Kofahi, J.M., and Nguyen, T.N. (2009, January 24–29). Graph-based mining of multiple object usage patterns. Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, Amsterdam, The Netherlands.10.1145/1595696.1595767 ↗
11. Moreno, L., Bavota, G., Di Penta, M., Oliveto, R., and Marcus, A. (2015, January 16–24). How Can I Use This Method?. Proceedings of the 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Florence, Italy.10.1109/ICSE.2015.98 ↗
12. Nguyen, P.T., Di Rocco, J., Di Ruscio, D., Ochoa, L., Degueule, T., and Di Penta, M. (2019, January 25–31). FOCUS: A Recommender System for Mining API Function Calls and Usage Patterns. Proceedings of the 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), Montreal, QC, Canada.10.1109/ICSE.2019.00109 ↗
13. API recommendation for event-driven Android application development10.1016/j.infsof.2018.10.010 ↗
14. Intelligent Code Completion with Bayesian Networks10.1145/2744200 ↗
15. Robbes, R., and Lanza, M. (2008, January 15–19). How Program History Can Improve Code Completion. Proceedings of the 2008 23rd IEEE/ACM International Conference on Automated Software Engineering, L’Aquila, Italy.10.1109/ASE.2008.42 ↗
16. Bruch, M., Mezini, M., and Monperrus, M. (2010, January 2–3). Mining subclassing directives to improve framework reuse. Proceedings of the 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010), Cape Town, South Africa.10.1109/MSR.2010.5463347 ↗
17. Nguyen, T.T., Pham, H.V., Vu, P.M., and Nguyen, T.T. (2016, January 14–22). Learning API usages from bytecode: A statistical approach. Proceedings of the 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE), Austin, TX, USA.10.1145/2884781.2884873 ↗
18. Saied, M.A., Abdeen, H., Benomar, O., and Sahraoui, H. (2015, January 18–19). Could We Infer Unordered API Usage Patterns Only Using the Library Source Code?. Proceedings of the 2015 IEEE 23rd International Conference on Program Comprehension, Florence, Italy.10.1109/ICPC.2015.16 ↗
19. Ogasawara, K., Kanda, T., and Inoue, K. (2020, January 23–29). On the variations and evolutions of API usage patterns: Case study on Android applications. Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, Seoul, Korea.10.1145/3387940.3392203 ↗
20. Raychev, V., Vechev, M., and Yahav, E. (2014, January 9–11). Code completion with statistical language models. Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, UK.10.1145/2594291.2594321 ↗
21. Nguyen, T.T., Nguyen, A.T., Nguyen, H.A., and Nguyen, T.N. (2013, January 18–26). A statistical semantic language model for source code. Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, New York, NY, USA.10.1145/2491411.2491458 ↗
22. Allamanis, M., Barr, E.T., Bird, C., and Sutton, C. (2014, January 16–22). Learning natural coding conventions. Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, China.10.1145/2635868.2635883 ↗
23. LSTM-Based with Deterministic Negative Sampling for API Suggestion10.1142/S0218194019500347 ↗
24. Maddison, C.J., and Tarlow, D. (2014, January 21–26). Structured generative models of natural source code. Proceedings of the 31st International Conference on Machine Learning, Beijing, China.
25. Gu, X., Zhang, H., and Kim, S. (2019, January 11–15). CodeKernel: A graph kernel based approach to the section of API usage examples. Proceedings of the IEEE/ACM International Conference on Automated Software Engineering, San Diego, CA, USA.10.1109/ASE.2019.00061 ↗
26. Nguyen, T.T., Vu, P.M., and Nguyen, T.T. (2019, January 18–20). Code Search on Bytecode for Mobile App Development. Proceedings of the 2019 ACM Southeast Conference, Kennesaw, GA, USA.10.1145/3299815.3314471 ↗
27. Nguyen, T.T., Pham, H.V., Vu, P.M., and Nguyen, T.T. (2015, January 9–13). Recommending API Usages for Mobile Apps with Hidden Markov Model. Proceedings of the 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), Lincoln, NE, USA.10.1109/ASE.2015.109 ↗
28. Zhong, H., Zhang, L., and Mei, H. (2008, January 2–5). Inferring Specifications of Object Oriented APIs from API Source Code. Proceedings of the 2008 15th Asia-Pacific Software Engineering Conference, Beijing, China.10.1109/APSEC.2008.54 ↗
29. Schäfer, T., Jonas, J., and Mezini, M. (2008, January 10–18). Mining framework usage changes from instantiation code. Proceedings of the 30th International Conference on Software Engineering, Leipzig, Germany.10.1145/1368088.1368153 ↗
30. Gu, X., Zhang, H., Zhang, D., and Kim, S. (2016, January 13–18). Deep API learning. Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Seattle, WA, USA.10.1145/2950290.2950334 ↗
31. Moritz, E., Linares-Vásquez, M., Poshyvanyk, D., Grechanik, M., McMillan, C., and Gethers, M. (2013, January 11–15). ExPort: Detecting and visualizing API usages in large source code repositories. Proceedings of the 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), Silicon Valley, CA, USA.10.1109/ASE.2013.6693127 ↗
32. Cottrell, R., Walker, R.J., and Denzinger, J. (2008, January 9–14). Semi-automating small-scale source code reuse via structural correspondence. Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Atlanta, GA, USA.10.1145/1453101.1453130 ↗
33. Nguyen, A.T., Hilton, M., Codoban, M., Nguyen, H.A., Mast, L., Rademacher, E., Nguyen, T.N., and Dig, D. (2016, January 13–18). API code recommendation using statistical learning from fine-grained changes. Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Seattle, WA, USA.10.1145/2950290.2950333 ↗
34. Nguyen, A.T., Nguyen, T.T., Nguyen, H.A., Tamrawi, A., Nguyen, H.V., Al-Kofahi, J., and Nguyen, T.N. (2012, January 2–9). Graph-based pattern-oriented, context-sensitive source code completion. Proceedings of the 2012 34th International Conference on Software Engineering (ICSE), Zurich, Switzerland.10.1109/ICSE.2012.6227205 ↗
35. Gosling, J., Joy, B., Steele, G., Bracha, G., Buckley, A., and Smith, D. (2018). Java Language Specification, Oracle America, Inc.. [Java SE 11 ed.].
36. Lindholm, T., Yellin, F., Bracha, G., Buckley, A., and Smith, D. (2019). The Java Virtual Machine Specification, Oracle America, Inc.. [Java SE 12 ed.].
37. An introduction to hidden Markov models10.1109/MASSP.1986.1165342 ↗
38. Gousios, G. (2013, January 18–19). The GHTorrent dataset and tool suite. Proceedings of the 10th Working Conference on Mining Software Repositories, San Francisco, CA, USA.10.1109/MSR.2013.6624034 ↗