Databases Reference
In-Depth Information
adapt the code to integrate it to their current development task. The types of tools
that mainly help developers find snippets are API and example code search tools
[ 2 , 3 , 5 , 13 , 14 , 24 , 32 , 36 , 38 , 39 , 41 ], code snippet Web search engines, reuse
opportunity recommenders [ 25 , 40 ], and source code integration tools [ 7 ]. Many
of these tools, especially the ones in the first and third group in the list, make use
of the current context of the user to suggest potentially related code snippets. A
few tools in the project-hosting sites, test-driven code search, and general-purpose
search engine group also help developers look for code snippets. Many tools in the
listed groups support both snippet and component searches, but only the reuse op-
portunity recommender group and code snippet search engines support exclusively
snippet searches. When developers evaluate the result set given by the tools, they
mainly pay attention to the functionality of the code snippet. Not many tools offer
support for integrating code snippets, mainly, because they assume developers will
copy and paste them.
Part IV , “Remix: Snippets and Answers,” contains three papers. Chapter 13
by Rosalva E. Gallardo-Valencia and Susan Elliott Sim is on “Software Problems
that Motivate Web Searches.” They observed software developers as they worked
and paid particular attention to the searches that they performed. They found that
searches for snippets were examples of opportunistic problem solving. Software de-
velopers engaged in these types of searches when they needed information to solve
a problem that they encountered in their daily work. Gallardo-Valencia and Sim also
found a stark division between searches for snippets and searches for components.
The latter took more time and the selection process took more factors into consider-
ation.
These results informed the design and implementation of a search engine for
Java snippets described in Chap. 14 . Using information retrieval infrastructure, sim-
ilar to those described elsewhere in this volume, Phitchayaphong Tantikul, C. Albert
Thompson, Rosalva E. Gallardo-Valencia, and Susan Elliott Sim, used tutorial web
pages rather than open source projects as source material. The examples in the tu-
torials were the “documents” in the repository and the surrounding text was used as
metadata.
An increasingly important resource for software developers is Stack Overflow,
a web site where one can post programming-related questions and expect answers
from other users. While many questions and answers contain code snippets, not all
of them do. Nevertheless, software developers often search the site for informa-
tion. In Chap. 15 , Ohad Barzilay, Christoph Treude, and Alexey Zagalsky report on
a study that they conducted on Stack Overflow and a tool that they developed to
help software developers to remix the found snippets or examples into their own
software.
1.5 Concluding
We conclude this topic with Part V , “Looking Ahead,” which contains two provoca-
tive articles that look at broader issues. Chapter 16 by Susan Elliott Sim and Erik
B. Stenberg is on “Intellectual Property Law in Source Code Reuse and Remix.”
Search WWH ::




Custom Search