APIExample: An effective web search based usage example recommendation system for java APIs

  • Authors:
  • Lijie Wang; Lu Fang; Leye Wang; Ge Li; Bing Xie; Fuqing Yang

  • Affiliations:
  • Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Software Institute, School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China

  • Venue:
  • ASE '11 Proceedings of the 2011 26th IEEE/ACM International Conference on Automated Software Engineering
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

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.