Serviceeinschränkungen vom 12.-22.02.2026 - weitere Infos auf der UB-Homepage

Treffer: Source Code Documentation Generation Using Program Execution

Title:
Source Code Documentation Generation Using Program Execution
Source:
Information, Vol 8, Iss 4, p 148 (2017)
Publisher Information:
MDPI AG, 2017.
Publication Year:
2017
Collection:
LCC:Information technology
Document Type:
Fachzeitschrift article
File Description:
electronic resource
Language:
English
ISSN:
2078-2489
DOI:
10.3390/info8040148
Accession Number:
edsdoj.72f48cfc91ec4fbfb727cbd53e80d9f2
Database:
Directory of Open Access Journals

Weitere Informationen

Automated source code documentation approaches often describe methods in abstract terms, using the words contained in the static source code or code excerpts from repositories. In this paper, we describe DynamiDoc: a simple automated documentation generator based on dynamic analysis. Our representation-based approach 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 each method, it generates documentation sentences with examples, such as “When called on [3, 1.2] with element = 3, the object changed to [1.2]”. Advantages and shortcomings of the approach are listed. We also found out that the generated sentences are substantially shorter than the methods they describe. According to our small-scale study, the majority of objects in the generated documentation have their string representations overridden, which further confirms the potential usefulness of our approach. Finally, we propose an alternative, variable-based approach that describes the values of individual member variables, rather than the state of an object as a whole.