Skip to content
sushil edited this page Sep 16, 2010 · 21 revisions

Sourcerer API Search – A search interface to find API Usage Examples

“Example isn’t another way to teach, it is the only way to teach.”
— Albert Einstein

The codesearch module in Sourcerer consists of a code search application (named Sourcerer API Search, or SAS in short) that is designed to find API usage examples in code repositories. API usage examples are code snippets that demonstrate how relevant APIs are used to solve certain programming tasks. SAS allows users to find API usage examples using queries consisting of natural language terms. Hence, developers can look for APIs that they donot know or do not exactly remember.

A running version of SAS that searches java source code from the Eclipse framework is available for use. Check out the running Prototype .

Here are some sample queries you can try:

  • open url in browser
  • track mouse
  • open file in editor
  • get shared image

Please refer to this list for a more exhaustive sample queries.

You can see a running demo in the video below:


>> Open Video <<

few more videos

Notes

  • Please note that the search server and the application is running on a somewhat low resource machine, thus some queries might take few seconds to run. Also, the respository that SAS is connected to has source code from Eclipse Framework only at the moment. So, queries about other lbraries/frameworks won’t work. We’re planning to connect SAS to a bigger respository soon.
  • The source code for SAS is available here