Sciweavers

ICSE
2012
IEEE-ACM

Synthesizing API usage examples

12 years 1 months ago
Synthesizing API usage examples
Abstract—Key program interfaces are sometimes documented with usage examples: concrete code snippets that characterize common use cases for a particular data type. While such documentation is known to be of great utility, it is burdensome to create and can be incomplete, out of date, or not representative of actual practice. We present an automatic technique for mining and synthesizing succinct and representative human-readable documentation of program interfaces. Our algorithm is based on a combination of path sensitive dataflow analysis, clustering, and pattern ion. It produces output in the form of well-typed program snippets which document initialization, method calls, assignments, looping constructs, and exception handling. In a human study involving over 150 participants, 82% of our generated examples were found to be at least as good at humanwritten instances and 94% were strictly preferred to state of the art code search.
Raymond P. L. Buse, Westley Weimer
Added 29 Sep 2012
Updated 29 Sep 2012
Type Journal
Year 2012
Where ICSE
Authors Raymond P. L. Buse, Westley Weimer
Comments (0)