skip to main content
research-article

Automated Documentation of Android Apps

Published: 01 January 2021 Publication History
  • Get Citation Alerts
  • Abstract

    Developers do not always have the knowledge needed to understand source code and must refer to different resources (e.g., teammates, documentation, the web). This non-trivial process, called program comprehension, is very time-consuming. While many approaches support the comprehension of a given code at hand, they are mostly focused on defining extractive summaries from the code (i.e., on selecting from a given piece of code the most important statements/comments to comprehend it). However, if the information needed to comprehend the code is not there, their usefulness is limited. We present <sc>ADANA</sc>, an approach to automatically inject comments describing a given piece of Android code. <sc>ADANA</sc> reuses the descriptions of similar and well-documented code snippets retrieved from various online resources. Our evaluation has shown that <sc>ADANA</sc> is able to aid the program comprehension process.

    References

    [1]
    D. Spinellis, “Code documentation,” IEEE Softw., vol. 27, no. 4, pp. 18–19, Jul. 2010.
    [2]
    B. Fluri, M. Wursch, and H. C. Gall, “Do code and comments co-evolve? On the relation between source code and comment changes,” in Proc. 14th Work. Conf. Reverse Eng., 2007, pp. 70–79.
    [3]
    B. Fluri, M. Würsch, E. Giger, and H. C. Gall, “Analyzing the co-evolution of comments and source code,” Softw. Quality J., vol. 17, no. 4, pp. 367–394, Dec. 2009. [Online]. Available: https://doi.org/10.1007/s11219-009-9075-x
    [4]
    M. Linares-Vásquez, B. Li, C. Vendome, and D. Poshyvanyk, “How do developers document database usages in source code?” in Proc. 30th IEEE/ACM Int. Conf. Automated Softw. Eng., Nov. 2015, pp. 36–41.
    [5]
    T. D. LaToza, G. Venolia, and R. DeLine, “Maintaining mental models: A study of developer work habits,” in Proc. Int. Conf. Softw. Eng., 2006, pp. 492–501.
    [6]
    L. Moreno, J. Aponte, G. Sridhara, A. Marcus, L. Pollock, and K. Vijay-Shanker, “Automatic generation of natural language summaries for Java classes,” in Proc. 21st Int. Conf. Program Comprehension, May 2013, pp. 23–32.
    [7]
    A. T. T. Ying and M. P. Robillard, “Code fragment summarization,” in Proc. 9th Joint Meet. Found. Softw. Eng., 2013, pp. 655–658. [Online]. Available: http://doi.acm.org/10.1145/2491411.2494587
    [8]
    J. Fowkes, P. Chanthirasegaran, R. Ranca, M. Allamanis, M. Lapata, and C. Sutton, “Autofolding for source code summarization,” IEEE Trans. Softw. Eng., vol. 43, no. 12, pp. 1095–1109, 2017. [Online]. Available: https://arxiv.org/abs/1403.4503v5
    [9]
    L. F. Cortés-Coy, M. Linares-Vásquez, J. Aponte, and D. Poshyvanyk, “On automatically generating commit messages via summarization of source code changes,” in Proc. IEEE 14th Int. Work. Conf. Source Code Anal. Manipulation, Sep. 2014, pp. 275–284.
    [10]
    A. T. T. Ying and M. P. Robillard, “Selection and presentation practices for code example summarization,” in Proc. 22nd ACM SIGSOFT Int. Symp. Found. Softw. Eng., 2014, pp. 460–471. [Online]. Available: http://doi.acm.org/10.1145/2635868.2635877
    [11]
    P. W. McBurney and C. McMillan, “Automatic source code summarization of context for Java methods,” IEEE Trans. Softw. Eng., vol. 42, no. 2, pp. 103–119, Feb. 2016.
    [12]
    M. Linares-Vásquez, B. Li, C. Vendome, and D. Poshyvanyk, “Documenting database usages and schema constraints in database-centric applications,” in Proc. 25th Int. Symp. Softw. Testing Anal., 2016, pp. 270–281. [Online]. Available: http://doi.acm.org/10.1145/2931037.2931072
    [13]
    B. Li, C. Vendome, M. Linares-Vásquez, D. Poshyvanyk, and N. A. Kraft, “Automatically documenting unit test cases,” in Proc. IEEE Int. Conf. Softw. Testing Verification Validation, Apr. 2016, pp. 341–352.
    [14]
    S. Haiduc, J. Aponte, L. Moreno, and A. Marcus, “On the use of automated text summarization techniques for summarizing source code,” in Proc. 17th Work. Conf. Reverse Eng., Oct. 2010, pp. 35–44.
    [15]
    2017. [Online]. Available: https://gist.github.com
    [16]
    2017. [Online]. Available: https://stackoverflow.com
    [18]
    [19]
    C. D. Manning, M. Surdeanu, J. Bauer, J. R. Finkel, S. Bethard, and D. McClosky, “The Stanford CoreNLP natural language processing toolkit,” in Proc. Annu. Meet. Assoc. Comput. Linguistics, 2014, pp. 55–60.
    [20]
    R. Koschke, “Survey of research on software clones,” Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl, Germany Duplication, Redundancy, and Similarity Softw., R. Koschke, E. Merlo, and A. Walenstein, Eds., 2007, http://drops.dagstuhl.de/opus/volltexte/2007/962
    [21]
    S. Bellon, R. Koschke, G. Antoniol, J. Krinke, and E. Merlo, “Comparison and evaluation of clone detection tools,” IEEE Trans. Softw. Eng., vol. 33, no. 9, pp. 577–591, Sep. 2007.
    [22]
    C. K. Roy, J. R. Cordy, and R. Koschke, “Comparison and evaluation of code clone detection techniques and tools: A qualitative approach,” Sci. Comput. Program., vol. 74, no. 7, pp. 470–495, May 2009.
    [23]
    L. Jiang, G. Misherghi, Z. Su, and S. Glondu, “DECKARD: Scalable and accurate tree-based detection of code clones,” in Proc. 29th Int. Conf. Softw. Eng., 2007, pp. 96–105.
    [24]
    S. Harris, 2003. [Online]. Available: http://www.harukizaemon.com/simian/
    [25]
    I. Mojica Ruiz, M. Nagappan, B. Adams, and A. Hassan, “Understanding reuse in the Android market,” in Proc. 20th IEEE Int. Conf. Program Comprehension, 2012, pp. 113–122.
    [26]
    R. Minelli and M. Lanza, “Software analytics for mobile applications – insights & lessons learned,” in Proc. 17th Eur. Conf. Softw. Maintenance Reeng., 2013, pp. 144–153.
    [27]
    M. Linares-Vásquez, A. Holtzhauer, C. Bernal-Cárdenas, and D. Poshyvanyk, “Revisiting android reuse studies in the context of code obfuscation and library usages,” in Proc. Work. Conf. Mining Softw. Repositories, 2014, pp. 242–251.
    [28]
    R. Baeza-Yates and B. Ribeiro-Neto, Modern Information Retrieval. Reading, MA, USA: Addison-Wesley, 1999.
    [29]
    Replication package for “automatic documentation of android apps,” 2018. [Online]. Available: http://adana.si.usi.ch/
    [30]
    P. Jaccard, “Etude comparative de la distribution florale dans une portion des alpes et des jura,” Bull. Soc. Vaudoise Sci. Nat., vol. 37, pp. 547–579, 1901.
    [32]
    S. Scalabrino, M. Linares-Vasquez, D. Poshyvanyk, and R. Oliveto, “Improving code readability models with textual features,” in Proc. IEEE 24th Int. Conf. Program Comprehension, 2016, pp. 1–10.
    [33]
    R. Flesch, “A new readability yardstick,” J. Appl. Psychology, vol. 32, no. 3, 1948, Art. no.
    [35]
    M. White, M. Tufano, C. Vendome, and D. Poshyvanyk, “Deep learning code fragments for code clone detection,” in Proc. 31st IEEE/ACM Int. Conf. Automated Softw. Eng., Sep. 2016, pp. 87–98.
    [36]
    S. Scalabrino, G. Bavota, C. Vendome, M. Linares-Vasquez, D. Poshyvanyk, and R. Oliveto, “Automatically assessing code understandability: How far are we?” in Proc. 32nd IEEE/ACM Int. Conf. Automated Softw. Eng., 2017, pp. 417–427.
    [37]
    R. J. Grissom and J. J. Kim, Effect Sizes for Research: A Broad Practical Approach, 2nd ed. Mahwah, NJ, USA: Lawrence Earlbaum Associates, 2005.
    [41]
    P. Rodeghero, C. McMillan, P. W. McBurney, N. Bosch, and S. D'Mello, “Improving automated source code summarization via an eye-tracking study of programmers,” in Proc. 36th Int. Conf. Softw. Eng., 2014, pp. 390–401. [Online]. Available: http://doi.acm.org/10.1145/2568225.2568247
    [42]
    N. Dragan, M. L. Collard, and J. I. Maletic, “Reverse engineering method stereotypes,” in Proc. 22nd IEEE Int. Conf. Softw. Maintenance, Sep. 2006, pp. 24–34.
    [43]
    N. Dragan, M. L. Collard, and J. I. Maletic, “Automatic identification of class stereotypes,” in Proc. IEEE Int. Conf. Softw. Maintenance, Sep. 2010, pp. 1–10.
    [44]
    B. Li, C. Vendome, M. Linares-Vásquez, and D. Poshyvanyk, “Aiding comprehension of unit test cases and test suites with stereotype-based tagging,” in Proc. 26th Conf. Program Comprehension, 2018, pp. 52–63.
    [45]
    M. M. Rahman, C. K. Roy, and I. Keivanloo, “Recommending insightful comments for source code using crowdsourced knowledge,” in Proc. IEEE 15th Int. Work. Conf. Source Code Anal. Manipulation, Sep. 2015, pp. 81–90.
    [46]
    C. Vassallo, S. Panichella, M. Di Penta, and G. Canfora, “CODES: Mining source code descriptions from developers discussions,” in Proc. 22nd Int. Conf. Program Comprehension, 2014, pp. 106–109.
    [47]
    M. Kamimura and G. C. Murphy, “Towards generating human-oriented summaries of unit test cases,” in Proc. 21st Int. Conf. Program Comprehension, May 2013, pp. 215–218.
    [48]
    S. Panichella, A. Panichella, M. Beller, A. Zaidman, and H. C. Gall, “The impact of test case summaries on bug fixing performance: An empirical investigation,” in Proc. 38th Int. Conf. Softw. Eng., 2016, pp. 547–558.
    [49]
    M. Kim, D. Notkin, D. Grossman, and G. Wilson, “Identifying and summarizing systematic code changes via rule inference,” IEEE Trans. Softw. Eng., vol. 39, no. 1, pp. 45–62, Jan. 2013.
    [50]
    M. Linares-Vásquez, L. F. Cortés-Coy, J. Aponte, and D. Poshyvanyk, “ChangeScribe: A tool for automatically generating commit messages,” in Proc. IEEE/ACM 37th IEEE Int. Conf. Softw. Eng., May 2015, pp. 709–712.
    [51]
    S. Jiang and C. McMillan, “Towards automatic generation of short summaries of commits,” in Proc. IEEE/ACM 25th Int. Conf. Program Comprehension, May 2017, pp. 320–323.
    [52]
    L. Moreno, G. Bavota, M. Di Penta, R. Oliveto, A. Marcus, and G. Canfora, “Automatic generation of release notes,” in Proc. 22nd ACM SIGSOFT Int. Symp. Found. Softw. Eng., 2014, pp. 484–495.
    [53]
    L. Moreno, G. Bavota, M. D. Penta, R. Oliveto, A. Marcus, and G. Canfora, “ARENA: An approach for the automated generation of release notes,” IEEE Trans. Softw. Eng., vol. 43, no. 2, pp. 106–127, Feb. 2017.
    [54]
    L. Moreno, A. Marcus, L. Pollock, and K. Vijay-Shanker, “J Summarizer: An automatic generator of natural language summaries for Java classes,” in Proc. 21st Int. Conf. Program Comprehension, 2013, pp. 230–232.
    [55]
    G. Sridhara, E. Hill, D. Muppaneni, L. Pollock, and K. Vijay-Shanker, “Towards automatically generating summary comments for Java methods,” in Proc. IEEE/ACM Int. Conf. Automated Softw. Eng., 2010, pp. 43–52. [Online]. Available: http://doi.acm.org/10.1145/1858996.1859006
    [56]
    P. W. McBurney and C. McMillan, “Automatic documentation generation via source code summarization of method context,” in Proc. 22nd Int. Conf. Program Comprehension, 2014, pp. 279–290. [Online]. Available: http://doi.acm.org/10.1145/2597008.2597149
    [57]
    E. Wong, T. Liu, and L. Tan, “CloCom: Mining existing source code for automatic comment generation,” in Proc. IEEE 22nd Int. Conf. Softw. Anal. Evol. Reeng., 2015, pp. 380–389.
    [58]
    S. Rastkar, G. C. Murphy, and G. Murray, “Automatic summarization of bug reports,” IEEE Trans. Softw. Eng., vol. 40, no. 4, pp. 366–380, Apr. 2014.
    [59]
    S. Rastkar, G. C. Murphy, and A. W. J. Bradley, “Generating natural language summaries for crosscutting source code concerns,” in Proc. 27th IEEE Int. Conf. Softw. Maintenance, Sep. 2011, pp. 103–112.
    [60]
    S. Panichella, J. Aponte, M. D. Penta, A. Marcus, and G. Canfora, “Mining source code descriptions from developer communications,” in Proc. 20th IEEE Int. Conf. Program Comprehension, 2012, pp. 63–72.
    [61]
    S. Subramanian, L. Inozemtseva, and R. Holmes, “Live API documentation,” in Proc. 36th Int. Conf. Softw. Eng., 2014, pp. 643–652. [Online]. Available: http://doi.acm.org/10.1145/2568225.2568313
    [62]
    S. Jiang, A. Armaly, C. McMillan, Q. Zhi, and R. Metoyer, “Docio: Documenting API input/output examples,” in Proc. 25th Int. Conf. Program Comprehension, 2017, pp. 364–367.
    [63]
    C. Treude and M. P. Robillard, “Augmenting API documentation with insights from stack overflow,” in Proc. 38th Int. Conf. Softw. Eng., 2016, pp. 392–403.
    [64]
    M. P. Robillard and Y. B. Chhetri, “Recommending reference API documentation,” Empirical Softw. Eng., vol. 20, no. 6, pp. 1558–1586, Dec. 2015. [Online]. Available: https://doi.org/10.1007/s10664-014-9323-y
    [65]
    R. P. L. Buse and W. Weimer, “Synthesizing API usage examples,” in Proc. 34th Int. Conf. Softw. Eng., 2012, pp. 782–792.
    [66]
    L. Moreno, G. Bavota, M. Di Penta, R. Oliveto, and A. Marcus, “How can I use this method?” in Proc. 37th Int. Conf. Softw. Eng., 2015, pp. 880–890.
    [67]
    R. Holmes and G. C. Murphy, “Using structural context to recommend source code examples,” in Proc. 27th Int. Conf. Softw. Eng., 2005, pp. 117–125.
    [68]
    S. K. Bajracharya, J. Ossher, and C. V. Lopes, “Leveraging usage similarity for effective retrieval of examples in code repositories,” in Proc. 18th ACM SIGSOFT Int. Symp. Found. Softw. Eng., 2010, pp. 157–166. [Online]. Available: http://doi.acm.org/10.1145/1882291.1882316
    [69]
    C. Mcmillan, D. Poshyvanyk, M. Grechanik, Q. Xie, and C. Fu, “Portfolio: Searching for relevant functions and their usages in millions of lines of code,” ACM Trans. Softw. Eng. Methodology, vol. 22, no. 4, pp. 37:1–37:30, Oct. 2013.
    [70]
    L. Ponzanelli, G. Bavota, M. Di Penta, R. Oliveto, and M. Lanza, “Mining StackOverflow to turn the IDE into a self-confident programming prompter,” in Proc. 11th Work. Conf. Mining Softw. Repositories, 2014, pp. 102–111.
    [71]
    L. Ponzanelli, S. Scalabrino, G. Bavota, A. Mocci, R. Oliveto, M. Di Penta, and M. Lanza, “Supporting software developers with a holistic recommender system,” in Proc. 39th Int. Conf. Softw. Eng., 2017, pp. 94–105.

    Cited By

    View all
    • (2024)Unveiling ChatGPT's Usage in Open Source Projects: A Mining-based StudyProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644918(571-583)Online publication date: 15-Apr-2024
    • (2024)Towards Summarizing Code Snippets Using Pre-Trained TransformersProceedings of the 32nd IEEE/ACM International Conference on Program Comprehension10.1145/3643916.3644400(1-12)Online publication date: 15-Apr-2024
    • (2023)LinkDoc: An Automated Process in the Delivery of Documentation in a Global Software Development EnvironmentProceedings of the 2023 5th World Symposium on Software Engineering10.1145/3631991.3632016(9-16)Online publication date: 22-Sep-2023
    • Show More Cited By

    Index Terms

    1. Automated Documentation of Android Apps
          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 IEEE Transactions on Software Engineering
          IEEE Transactions on Software Engineering  Volume 47, Issue 1
          Jan. 2021
          220 pages

          Publisher

          IEEE Press

          Publication History

          Published: 01 January 2021

          Qualifiers

          • Research-article

          Contributors

          Other Metrics

          Bibliometrics & Citations

          Bibliometrics

          Article Metrics

          • Downloads (Last 12 months)0
          • Downloads (Last 6 weeks)0
          Reflects downloads up to 14 Aug 2024

          Other Metrics

          Citations

          Cited By

          View all
          • (2024)Unveiling ChatGPT's Usage in Open Source Projects: A Mining-based StudyProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3644918(571-583)Online publication date: 15-Apr-2024
          • (2024)Towards Summarizing Code Snippets Using Pre-Trained TransformersProceedings of the 32nd IEEE/ACM International Conference on Program Comprehension10.1145/3643916.3644400(1-12)Online publication date: 15-Apr-2024
          • (2023)LinkDoc: An Automated Process in the Delivery of Documentation in a Global Software Development EnvironmentProceedings of the 2023 5th World Symposium on Software Engineering10.1145/3631991.3632016(9-16)Online publication date: 22-Sep-2023
          • (2023)Fitting missing API puzzles with machine translation techniquesExpert Systems with Applications: An International Journal10.1016/j.eswa.2022.119477216:COnline publication date: 15-Apr-2023
          • (2019)Android Fragmentation in Malware DetectionComputers and Security10.1016/j.cose.2019.10157387:COnline publication date: 1-Nov-2019

          View Options

          View options

          Get Access

          Login options

          Media

          Figures

          Other

          Tables

          Share

          Share

          Share this Publication link

          Share on social media