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.
@InProceedings{sulir_et_al:OASIcs.SLATE.2017.3, author = {Sul{\'\i}r, Mat\'{u}\v{s} and Porub\"{a}n, Jaroslav}, title = {{Generating Method Documentation Using Concrete Values from Executions}}, booktitle = {6th Symposium on Languages, Applications and Technologies (SLATE 2017)}, pages = {3:1--3:13}, series = {Open Access Series in Informatics (OASIcs)}, ISBN = {978-3-95977-056-9}, ISSN = {2190-6807}, year = {2017}, volume = {56}, editor = {Queir\'{o}s, Ricardo and Pinto, M\'{a}rio and Sim\~{o}es, Alberto and Leal, Jos\'{e} Paulo and Varanda, Maria Jo\~{a}o}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.SLATE.2017.3}, URN = {urn:nbn:de:0030-drops-79398}, doi = {10.4230/OASIcs.SLATE.2017.3}, annote = {Keywords: documentation generation, source code summarization, methods, dynamic analysis, examples} }
Feedback for Dagstuhl Publishing