Chapter. Searching for Examples of API Usage

Description

This chapter will review the literature on searching for examples of API usage to learn which API to use and how to use a particular API. Hoffman, Fogarty, and Weld published a paper in UIST 2007 on their Assieme tool, which tackled both kinds of API example search.

Programmers regularly use search as part of the development process, attempting to identify an appropriate API for a problem, seeking more information about an API, and seeking samples that show how to use an API. However, neither general-purpose search engines nor existing code search engines currently fit their needs, in large part because the information programmers need is distributed across many pages. We present Assieme, a Web search interface that effectively supports common programming search tasks by combining information from Web-accessible Java Archive (JAR) files, API documentation, and pages that include explanatory text and sample code. Assieme uses a novel approach to finding and resolving implicit references to Java packages, types, and members within sample code on the Web. In a study of programmers performing searches related to common programming tasks, we show that programmers obtain better solutions, using fewer queries, in the same amount of time spent using a general Web search interface.

Authors

Raphael Hoffmann, James Fogarty, and Dan Weld

Bio and Photo

Raphael Hoffmann is a PhD Candidate of Computer Science & Engineering at the University of Washington under the supervision of Professor Daniel S. Weld and Professor Luke Zettlemoyer. His research interests are in the intersections of natural language processing, machine learning, and human-computer interaction. His focus is on developing and evaluating techniques for information extraction using distant supervision and user guidance.

James Fogarty is an Assistant Professor of Computer Science & Engineering at the University of Washington. His broad research interests are in Human-Computer Interaction, User Interface Software and Technology, and Ubiquitous Computing. His focus is on developing, deploying, and evaluating new approaches to the human obstacles surrounding widespread everyday adoption of ubiquitous sensing and intelligent computing technologies.

Daniel S. Weld is Thomas J. Cable / WRF Professor of Computer Science & Engineering at the University of Washington. His research interests are in artificial intelligence, machine learning and planning algorithms with an emphasis on building innovative Web systems such as the Intelligence in Wikipedia Project and intelligent user intefaces. Dan is also an active entrepreneur with several patents and technology licenses, and a Venture Partner at Madrona Venture Group.

Text