APIExample: An effective web search based usage example recommendation system for java APIs
Abstract
Programmers often learn how to use an API by studying its usage examples. There are many usage examples scattered in web pages on the Internet. However, it often takes programmers much effort to find out the desired examples from a large number of web pages by web search. This paper proposes a tool named APIExample that can extract usage examples for java APIs from web pages on the Internet and recommend them to programmers. Given a java API, the tool collects its related web pages from the Internet, extracts java code snippets and their surrounding descriptive texts embedded in the pages, then assembles them into usage examples for programmers. Furthermore, in order to help programmers capture more kinds of usages of the target API by browsing fewer examples, our tool clusters and ranks the listed examples based on the target API's usage. Besides, as a practical tool, APIExample provides multiple aspects of frequently-used information about using the target API in a concise user interface with friendly user experience. Two kinds of user-interaction style, a web search portal and an Eclipse plug-in, are now both publicly available.
BibTeX
@inproceedings{Wang-al:ASE11,
author = {Lijie Wang and
Lu Fang and
Leye Wang and
Ge Li and
Bing Xie and
Fuqing Yang},
title = {{APIExample:} An effective web search based usage example recommendation system for java {APIs}},
booktitle = {ASE},
pages = {592--595},
publisher = {{IEEE} Computer Society},
year = {2011},
}