Novel and Applied Algorithms in a Search Engine for Java Code Snippets [chapter]

Phitchayaphong Tantikul, C. Albert Thompson, Rosalva E. Gallardo-Valencia, Susan Elliott Sim
2013 Finding Source Code on the Web for Remix and Reuse  
Programmers often look for a "snippet," that is, a small piece of example code, to remind themselves of how to solve a problem or to quickly learn about a new resource. However, existing tools such as general-purpose search engines and code-specific search engines do not deal well with searches for snippets. In this chapter, we present a prototype search engine designed to work with code snippets. Our approach is based on using the non-code text on a web page as metadata for the snippet to
more » ... ve indexing and retrieval. We discuss some implementation issues that we encountered, which lead to lessons learned for others who follow. These issues include: extracting snippets from web pages, selecting and indexing metadata, matching query terms with multiple metadata indexes, and identifying a text summary to be used in the presentations of results.
doi:10.1007/978-1-4614-6596-6_14 fatcat:oen36zu6pfhfjjzr5ofkhqbhy4