Translating code comments to procedure specifications

Download: Toradocu implementation.

“Translating code comments to procedure specifications” by Arianna Blasi, Alberto Goffi, Konstantin Kuznetsov, Alessandra Gorla, Michael D. Ernst, Mauro Pezzè, and Sergio Delgado Castellanos. In ISSTA 2018, Proceedings of the 2018 International Symposium on Software Testing and Analysis, (Amsterdam, Netherlands), July 2018.


Procedure specifications are useful in many software development tasks. As one example, in automatic test case generation they can guide testing, act as test oracles able to reveal bugs, and identify illegal inputs. Whereas formal specifications are seldom available in practice, it is standard practice for developers to document their code with semi-structured comments. These comments express the procedure specification with a mix of predefined tags and natural language. This paper presents Jdoctor, an approach that combines pattern, lexical and semantic matching to translate Javadoc comments into executable procedure specifications written as Java expressions. In an empirical evaluation, Jdoctor achieved precision of 91% and recall of 83% in translating Javadoc into procedure specifications. We also supplied the Jdoctor-derived specifications to an automated test case generation tool, Randoop. The specifications enabled Randoop to generate test cases that reveal more defects and produce fewer false alarms.

Download: Toradocu implementation.

BibTeX entry:

   author = {Arianna Blasi and Alberto Goffi and Konstantin Kuznetsov and
	Alessandra Gorla and Michael D. Ernst and Mauro Pezz{\`e} and
	Sergio Delgado Castellanos},
   title = {Translating code comments to procedure specifications},
   booktitle = {ISSTA 2018, Proceedings of the 2018 International
	Symposium on Software Testing and Analysis},
   address = {Amsterdam, Netherlands},
   month = jul,
   year = {2018}

(This webpage was created with bibtex2web.)

Back to Michael Ernst's publications.