Plenty of search engines that find code are popping up on my radar lately. The latest one is AlltheCode, which is in alpha at http://www.allthecode.com/ . The engine notes in its FAQ that “Unlike similar source code search engines, All The Code considers the relation between code and uses this to help judge the relevance.” At the moment it only offers Java code search, and doesn’t plan a beta version until late 2007 or early 2008.
(Also noted in the FAQ: there’s currently now way to submit code, and new languages will be added to the search engine this summer.)
I did a simple search for xml parser. I got 247 results, with the caveat on the results page that I was getting only results based on a nonfuzzy search. With that warning was an invitation to do a fuzzy search. When I did I got 946 results, so there’s quite a results. Results included a URL and substantial code snippets. Clicking on the URL actually doesn’t move you offsite. Instead AlltheCode has the code on its own site, with a pointer to the original code.
The founder’s blog is available at http://blog.holdenkarau.com/ and has some updates on the search engine with plenty of geeky backstage peeking.