Generating Method Documentation Using Concrete Values from Executions

Authors Matúš Sulír, Jaroslav Porubän



PDF
Thumbnail PDF

File

OASIcs.SLATE.2017.3.pdf
  • Filesize: 456 kB
  • 13 pages

Document Identifiers

Author Details

Matúš Sulír
Jaroslav Porubän

Cite As Get BibTex

Matúš Sulír and Jaroslav Porubän. Generating Method Documentation Using Concrete Values from Executions. In 6th Symposium on Languages, Applications and Technologies (SLATE 2017). Open Access Series in Informatics (OASIcs), Volume 56, pp. 3:1-3:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2017) https://doi.org/10.4230/OASIcs.SLATE.2017.3

Abstract

There exist multiple automated approaches of source code documentation generation. They often describe methods in abstract terms, using the words contained in the static source code or code excerpts from repositories. In this paper, we introduce DynamiDoc - a simple yet effective automated documentation approach based on dynamic analysis. It traces the program being executed and records string representations of concrete argument values, a return value, and a target object state before and after each method execution. Then for every concerned method, it generates documentation sentences containing examples, such as "When called on [3, 1.2] with element = 3, the object changed to [1.2]". A qualitative evaluation is performed, listing advantages and shortcomings of the approach.

Subject Classification

Keywords
  • documentation generation
  • source code summarization
  • methods
  • dynamic analysis
  • examples

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Raymond Buse and Westley Weimer. Automatic documentation inference for exceptions. In International Symposium on Software Testing and Analysis, pages 273-282. ACM, 2008. Google Scholar
  2. Raymond Buse and Westley Weimer. Synthesizing API usage examples. In 34th International Conference on Software Engineering (ICSE'2012), pages 782-792, 2012. Google Scholar
  3. Valentin Dallmeier, Christian Lindig, Andrzej Wasylkowski, and Andreas Zeller. Mining object behavior with ADABU. In International Workshop on Dynamic Systems Analysis, pages 17-24. ACM, 2006. Google Scholar
  4. Daniel Hoffman and Paul Strooper. Prose + Test Cases = Specifications. In 34th International Conference on Technology of Object-Oriented Languages and Systems, pages 239-250, 2000. Google Scholar
  5. Jinhan Kim, Sanghoon Lee, Seung-won Hwang, and Sunghun Kim. Adding examples into Java documents. In IEEE/ACM International Conference on Automated Software Engineering, pages 540-544, 2009. Google Scholar
  6. Douglas Kramer. API documentation from source code comments: A case study of Javadoc. In 17th Annual International Conference on Computer Documentation, pages 147-153, 1999. Google Scholar
  7. Geoffrey Lefebvre, Brendan Cully, Christopher Head, Mark Spear, Norm Hutchinson, Mike Feeley, and Andrew Warfield. Execution mining. In 8th ACM SIGPLAN/SIGOPS Conference on Virtual Execution Environments, pages 145-158, 2012. Google Scholar
  8. David Lo and Shahar Maoz. Scenario-based and value-based specification mining: Better together. In IEEE/ACM International Conference on Automated Software Engineering, pages 387-396, 2010. Google Scholar
  9. Fan Long, Xi Wang, and Yang Cai. API hyperlinking via structural overlap. In 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, pages 203-212, 2009. Google Scholar
  10. Paul W. McBurney and Collin McMillan. Automatic documentation generation via source code summarization of method context. In 22nd International Conference on Program Comprehension, pages 279-290, 2014. Google Scholar
  11. João E. Montandon, Hudson Borges, Daniel Felix, and Marco T. Valente. Documenting APIs with examples: Lessons learned with the APIMiner platform. In 20th Working Conference on Reverse Engineering (WCRE'2013), pages 401-408, October 2013. Google Scholar
  12. Laura Moreno, Jairo Aponte, Giriprasad Sridhara, Andrian Marcus, Lori Pollock, and K. Vijay-Shanker. Automatic generation of natural language summaries for Java classes. In 21st International Conference on Program Comprehension, pages 23-32, May 2013. Google Scholar
  13. Najam Nazar, Yan Hu, and He Jiang. Summarizing software artifacts: A literature review. Journal of Computer Science and Technology, 31(5):883-909, 2016. Google Scholar
  14. Sebastiano Panichella, Annibale Panichella, Moritz Beller, Andy Zaidman, and Harald C. Gall. The impact of test case summaries on bug fixing performance: An empirical investigation. In 38th International Conference on Software Engineering, pages 547-558, 2016. Google Scholar
  15. Sheikh Mohammed Sohan, Craig Anslow, and Frank Maurer. SpyREST: Automated RESTful API documentation using an HTTP proxy server. In 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 271-276, 2015. Google Scholar
  16. Giriprasad Sridhara, Emily Hill, Divya Muppaneni, Lori Pollock, and K. Vijay-Shanker. Towards automatically generating summary comments for Java methods. In IEEE/ACM International Conference on Automated Software Engineering, pages 43-52, 2010. Google Scholar
  17. Giriprasad Sridhara, Lori Pollock, and K. Vijay-Shanker. Automatically detecting and describing high level actions within methods. In 33rd International Conference on Software Engineering, pages 101-110, 2011. Google Scholar
  18. Giriprasad Sridhara, Lori Pollock, and K. Vijay-Shanker. Generating parameter comments and integrating with method summaries. In 19th IEEE International Conference on Program Comprehension, pages 71-80, 2011. Google Scholar
  19. Matúš Sulír, Milan Nosáľ, and Jaroslav Porubän. Recording concerns in source code using annotations. Computer Languages, Systems &Structures, 46:44-65, November 2016. Google Scholar
  20. Matúš Sulír and Jaroslav Porubän. Semi-automatic concern annotation using differential code coverage. In IEEE 13th International Scientific Conference on Informatics, pages 258-262, November 2015. Google Scholar
  21. Matúš Sulír and Jaroslav Porubän. A quantitative study of Java software buildability. In 7th International Workshop on Evaluation and Usability of Programming Languages and Tools, pages 17-25, 2016. Google Scholar
  22. Shin Hwei Tan, Darko Marinov, Lin Tan, and Gary T. Leavens. @tComment: Testing Javadoc comments to detect comment-code inconsistencies. In Fifth IEEE International Conference on Software Testing, Verification and Validation, pages 260-269, 2012. Google Scholar
  23. Gias Uddin and Martin P. Robillard. How API documentation fails. IEEE Software, 32(4):68-75, July 2015. Google Scholar
  24. Shin Yoo and Mark Harman. Regression testing minimization, selection and prioritization: a survey. Software Testing, Verification and Reliability, 22(2):67-120, 2012. Google Scholar
  25. Sai Zhang, Cheng Zhang, and Michael D. Ernst. Automated documentation inference to explain failed tests. In 26th IEEE/ACM International Conference on Automated Software Engineering, pages 63-72, 2011. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail