• DocumentCode
    2442232
  • Title

    Synthesizing API usage examples

  • Author

    Buse, Raymond P L ; Weimer, Westley

  • Author_Institution
    Dept. of Comput. Sci., Univ. of Virginia, Charlottesville, VA, USA
  • fYear
    2012
  • fDate
    2-9 June 2012
  • Firstpage
    782
  • Lastpage
    792
  • 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 abstraction. 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 human-written instances and 94% were strictly preferred to state of the art code search.
  • Keywords
    application program interfaces; data flow analysis; data mining; document handling; exception handling; pattern clustering; API usage example synthesis; concrete code snippets; document initialization; exception handling; key program interfaces; looping constructs; method assignment; method calls; path sensitive dataflow analysis; pattern abstraction; pattern clustering; program interface documentation mining; program interface documentation synthesis; program snippets; Abstracts; Algorithm design and analysis; Clustering algorithms; Concrete; Documentation; Humans; Java;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2012 34th International Conference on
  • Conference_Location
    Zurich
  • ISSN
    0270-5257
  • Print_ISBN
    978-1-4673-1066-6
  • Electronic_ISBN
    0270-5257
  • Type

    conf

  • DOI
    10.1109/ICSE.2012.6227140
  • Filename
    6227140