Recommending Relevant Examples

Frameworks provide developers with a repository of code that can help them in their coding tasks. However, frameworks are frequently large and difficult to understand. Documentation is often incomplete or insufficient to help developers with the specific tasks they are working on. The Strathcona system automatically provides developers with relevant source code examples to help them use frameworks properly and effectively.

Prototype: Eclipse

The Eclipse framework provides a great deal of functionality to tool developers enabling them to concentrate on creating their tools instead of implementing low-level routines. However, this functionality is not without cost. The Eclipse framework is quite complex and sometimes figuring out how to use it can be challenging.

Strathcona has been designed for any developer who has wondered how to use some part of Eclipse but found the documentation to be lacking.

Quick Overview

Using Strathcona is relatively straightforward. Find some code in the Java editor that you’re interested in and select it. Use the context menu to chose “Query Strathcona”. A query is formulated based on the code you have selected and is sent to the server. Up to 10 examples are displayed in the results view ranked in the order of relevance to your query.

These examples can be examine visually in the results view. The visual representation gives clues about the structure of the example including inheritance, calls, and uses relationships. You can click on the icon to see specifically why the examples was returned to you. If you wish to see the code for the example you can click on the icon.

A quick flash demonstration is also available to show how the tool can be used. To learn how to install and use Strathcona, check the installation page and the usage page.

Publications

Reid Holmes, Robert J. Walker, and Gail C. Murphy. Approximate structural context matching: An approach for recommending relevant examples. IEEE Transactions on Software Engineering, 32(12):952–970, December 2006.

Reid Holmes, Robert J. Walker, and Gail C. Murphy. Strathcona example recommendation tool. In Proceedings of the European Software Engineering Conference held jointly with the ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 237–240, 2005.

Reid Holmes and Gail C. Murphy. Using structural context to recommend source code examples. In Proceedings of the International Conference on Software Engineering, pp. 117–125, 2005.

People