skip to main content
10.1145/3510454.3516849acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Code implementation recommendation for Android GUI components

Published: 19 October 2022 Publication History

Abstract

We present a prototype tool Icon2Code, targeted to helping app developers more quickly implement the callback functions of complex Android GUI components by recommending code implementations learnt from similar GUI components from other apps. Given an icon or UI widget provided by designers, Icon2Code first queries a large pre-established database to locate similar icons that other apps have utilized. It then leverages a collaborative filtering model to suggest the most relevant APIs and their usage examples associated with the intended behaviours of these icons. Experimental results on 5,000 randomly selected real-world apps show that Icon2Code is useful and effective in recommending code examples for implementing the behaviours of complex GUI components. It has over 50% of success rate when only one recommended API is taken into account, and over 94% of success rate if 20 APIs are considered. The video demo can be found at https://youtu.be/pM3ZBGrQTdQ.

References

[1]
Vitalii Avdiienko, Konstantin Kuznetsov, Isabelle Rommelfanger, Andreas Rau, Alessandra Gorla, and Andreas Zeller. 2017. Detecting behavior anomalies in graphical user interfaces. In 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C). IEEE, 201--203.
[2]
Haipeng Cai, Ziyi Zhang, Li Li, and Xiaoqin Fu. 2019. A Large-Scale Study of Application Incompatibilities in Android. In The 28th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2019).
[3]
Chunyang Chen, Ting Su, Guozhu Meng, Zhenchang Xing, and Yang Liu. 2018. From ui design image to gui skeleton: a neural machine translator to bootstrap mobile gui implementation. In Proceedings of the 40th International Conference on Software Engineering. 665--676.
[4]
Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S Mirrokni. 2004. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the twentieth annual symposium on Computational geometry. 253--262.
[5]
Jun Gao, Li Li, Pingfan Kong, Tegawendé F Bissyandé, and Jacques Klein. 2019. Understanding the Evolution of Android App Vulnerabilities. IEEE Transactions on Reliability (TRel) (2019).
[6]
David R Kaeli, Perhaad Mistry, Dana Schaa, and Dong Ping Zhang. 2015. Heterogeneous computing with OpenCL 2.0. Morgan Kaufmann.
[7]
Pingfan Kong, Li Li, Jun Gao, Kui Liu, Tegawendé F Bissyandé, and Jacques Klein. 2018. Automated Testing of Android Apps: A Systematic Literature Review. IEEE Transactions on Reliability (2018).
[8]
Vladimir I Levenshtein. 1966. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet physics doklady, Vol. 10. 707--710.
[9]
Bo Li, Qiang He, Feifei Chen, Xin Xia, Li Li, John Grundy, and Yun Yang. 2021. Embedding App-Library Graph for Neural Third Party Library Recommendation. In The 29th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2021).
[10]
Li Li, Tegawendé F Bissyandé, Jacques Klein, and Yves Le Traon. 2016. Parameter values of Android APIs: A preliminary study on 100,000 apps. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 1. IEEE, 584--588.
[11]
Li Li, Tegawendé F Bissyandé, Mike Papadakis, Siegfried Rasthofer, Alexandre Bartel, Damien Octeau, Jacques Klein, and Yves Le Traon. 2017. Static Analysis of Android Apps: A Systematic Literature Review. Information and Software Technology (2017).
[12]
Li Li, Tegawendé F Bissyandé, Haoyu Wang, and Jacques Klein. 2018. CiD: Automating the Detection of API-related Compatibility Issues in Android Apps. In The ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2018).
[13]
Li Li, Jun Gao, Tegawendé F Bissyandé, Lei Ma, Xin Xia, and Jacques Klein. 2020. CDA: Characterising Deprecated Android APIs. Empirical Software Engineering (EMSE) (2020).
[14]
Li Li, Jun Gao, Médéric Hurier, Pingfan Kong, Tegawendé F Bissyandé, Alexandre Bartel, Jacques Klein, and Yves Le Traon. 2017. AndroZoo++: Collecting Millions of Android Apps and Their Metadata for the Research Community. arXiv preprint arXiv:1709.05281 (2017).
[15]
Li Li, Timothée Riom, Tegawendé F Bissyandé, Haoyu Wang, Jacques Klein, and Yves Le Traon. 2019. Revisiting the Impact of Common Libraries for Android-related Investigations. Journal of Systems and Software (JSS) (2019).
[16]
Pei Liu, Li Li, Yichun Yan, Mattia Fazzini, and John Grundy. 2021. Identifying and Characterizing Silently-Evolved Methods in the Android API. In The 43rd ACM/IEEE International Conference on Software Engineering, SEIP Track (ICSE-SEIP 2021).
[17]
Kevin Moran, Carlos Bernal-Cárdenas, Michael Curcio, Richard Bonett, and Denys Poshyvanyk. 2018. Machine learning-based prototyping of graphical user interfaces for mobile apps. IEEE Transactions on Software Engineering 46, 2 (2018), 196--221.
[18]
Phuong T Nguyen, Juri Di Rocco, Davide Di Ruscio, Lina Ochoa, Thomas Degueule, and Massimiliano Di Penta. 2019. Focus: A recommender system for mining api function calls and usage patterns. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 1050--1060.
[19]
Tam The Nguyen, Hung Viet Pham, Phong Minh Vu, and Tung Thanh Nguyen. 2015. Recommending API usages for mobile apps with hidden markov model. In 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 795--800.
[20]
Danilo Dominguez Perez and Wei Le. 2017. Generating predicate callback summaries for the Android framework. In 2017 IEEE/ACM 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft). IEEE, 68--78.
[21]
Eric Sven Ristad and Peter N Yianilos. 1998. Learning string-edit distance. IEEE Transactions on Pattern Analysis and Machine Intelligence 20, 5 (1998), 522--532.
[22]
Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski. 2011. ORB: An efficient alternative to SIFT or SURF. In 2011 International conference on computer vision. Ieee, 2564--2571.
[23]
Sandip Sarkar, Dipankar Das, Partha Pakray, and Alexander Gelbukh. 2016. JUNITMZ at SemEval-2016 task 1: Identifying semantic similarity using Levenshtein ratio. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016). 702--705.
[24]
J Ben Schafer, Dan Frankowski, Jon Herlocker, and Shilad Sen. 2007. Collaborative filtering recommender systems. In The adaptive web. Springer, 291--324.
[25]
Wei Song, Xiangxing Qian, and Jeff Huang. 2017. EHBDroid: Beyond GUI testing for Android applications. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 27--37.
[26]
Statista Research Department. 2021. Number of apps available in leading app stores as of 1st quarter 2021. (2021). https://www.statista.com/statistics/276623/number-of-apps-available-in-leading-app-stores/ [accessed 15-June-2021].
[27]
Weizhao Yuan, Hoang H Nguyen, Lingxiao Jiang, Yuting Chen, Jianjun Zhao, and Haibo Yu. 2019. API recommendation for event-driven Android application development. Information and Software Technology 107 (2019), 30--47.
[28]
Xian Zhan, Tianming Liu, Lingling Fan, Li Li, Sen Chen, Xiapu Luo, and Yang Liu. 2021. Research on Third-Party Libraries in Android Apps: A Taxonomy and Systematic Literature Review. IEEE Transactions on Software Engineering (2021).
[29]
Yanjie Zhao, Li Li, Kui Liu, and John Grundy. 2022. Towards Automatically Repairing Compatibility Issues in Published Android Apps. In The 44th International Conference on Software Engineering (ICSE 2022).
[30]
Yanjie Zhao, Li Li, Xiaoyu Sun, Pei Liu, and John Grundy. 2021. Icon2Code: Recommending Code Implementations for Android GUI Components. Information and Software Technology (IST) (2021).
[31]
Yanjie Zhao, Li Li, Haoyu Wang, Qiang He, and John Grundy. 2022. API-Matchmaker: Matching the Right APIs for Supporting the Development of Android Apps. IEEE Transactions on Software Engineering (2022), 1--1.

Cited By

View all

Index Terms

  1. Code implementation recommendation for Android GUI components
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        ICSE '22: Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings
        May 2022
        394 pages
        ISBN:9781450392235
        DOI:10.1145/3510454
        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Sponsors

        In-Cooperation

        • IEEE CS

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 19 October 2022

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. API recommendation
        2. Android
        3. app development
        4. collaborative filtering
        5. icon implementation

        Qualifiers

        • Research-article

        Conference

        ICSE '22
        Sponsor:

        Acceptance Rates

        Overall Acceptance Rate 276 of 1,856 submissions, 15%

        Upcoming Conference

        ICSE 2025

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • 0
          Total Citations
        • 65
          Total Downloads
        • Downloads (Last 12 months)23
        • Downloads (Last 6 weeks)1
        Reflects downloads up to 01 Nov 2024

        Other Metrics

        Citations

        Cited By

        View all

        View Options

        Get Access

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media