Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Per the Official Google Blog:

Code Search, which was designed to help people search for open source code all over the web, will be shut down along with the Code Search API on January 15, 2012.

Google Code Search is now gone, and since that makes it much harder to understand the features it presented, here's my attempt to render them via information I gathered from a cache of the page for the Search Options:

The "In Search Box" just notes the syntax to type the command directly in the main search box instead of using the advance search interface.

  • Package (In Search Box: "package:linux-2.6")
  • Language (In Search Box: "lang:c++")
    • (OPTIONS: any language, actionscript, ada, applescript, asp, assembly, autoconf, automake, awk, basic, bat, c, c#, c++, caja, cobol, coldfusion, configure, css, d, eiffel, erlang, fortran, go, haskell, inform, java, java, javascript, jsp, lex, limbo, lisp, lolcode, lua, m4, makefile, maple, mathematica, matlab, messagecatalog, modula2, modula3, objectivec, ocaml, pascal, perl, php, pod, prolog, proto, python, python, r, rebol, ruby, sas, scheme, scilab, sgml, shell, smalltalk, sml, sql, svg, tcl, tex, texinfo, troff, verilog, vhdl, vim, xslt, xul, yacc)
  • File (In Search Box: "file:^.*.java$")
  • Class (In Search Box: "class:HashMap")
  • Function (In Search Box: "function:toString")
  • License (In Search Box: "license:mozilla")
    • (OPTIONS: null/any-license, aladdin/Aladdin-Public-License, artistic/Artistic-License, apache/Apache-License, apple/Apple-Public-Source-License, bsd/BSD-License, cpl/Common-Public-License, epl/Eclipse-Public-License, agpl/GNU-Affero-General-Public-License, gpl/GNU-General-Public-License, lgpl/GNU-Lesser-General-Public-License, disclaimer/Historical-Permission-Notice-and-Disclaimer, ibm/IBM-Public-License, lucent/Lucent-Public-License, mit/MIT-License, mozilla/Mozilla-Public-License, nasa/NASA-Open-Source-Agreement, python/Python-Software-Foundation-License, qpl/Q-Public-License, sleepycat/Sleepycat-License, zope/Zope-Public-License)
  • Case Sensitive (In Search Box: "case:no")
    • (OPTIONS: yes, no)

Also of use in understanding the search tool would be the still live FAQs page for Google Code Search.

Is there any code search engine that would fully replace Google Code Search's features?

share|improve this question

closed as not constructive by Yannis Rizos Dec 27 '12 at 16:23

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
@Mark Trapp: The answer contains "facts, references, or specific expertise" -- and I don't see any "opinion, debate, arguments, polling, or extended discussion", nor given the amount of time the question has been posted does that appear likely. What is the issue with the question? Thanks! –  blunders Feb 23 '12 at 20:54
    
It's a poll: see "Real Questions Have Answers" for a longer explanation. If you have any additional questions or concerns, please ask on our meta-discussion site. –  user8 Feb 23 '12 at 21:00
    
@Mark Trapp: Posted a reply to meta as requested, Is this question a poll? –  blunders Feb 23 '12 at 23:01
1  
Unrelated but extremely interesting: Regular Expression Matching with a Trigram Index or How Google Code Search Worked –  Yannis Rizos Feb 27 '12 at 1:45

4 Answers 4

up vote 15 down vote accepted

Six similar code search engines are presented as alternatives at alternativeTo.net:

Koders.com

Koders is a syntax-specific (33 languages, soon to be 43) open source code search engine that enables developers to find, understand, and use open source code. Koders has a search index of several billion lines of code, and will further expand this to include the extensive project list on ohloh.net.

search[code]

search[code] is a code specific search engine. API documentation, code snippets and open source (free sofware) repositories are indexed and searchable. Most information is presented in such a way that you shouldn't need to click through, but of course you always can.

SymbolHound

SymbolHound offers symbol-inclusive search of open source code repositories, in addition to a feature that allows regular web searches for otherwise-ignored special characters.

Black Duck Code Sight

Black Duck® Code Sight™ is a scalable, syntax-specific (43 languages) source code search engine that enables developers to find, understand, and use shared code. Code Sight's out-of-the-box adapters allow a search index to be created from a file system or across multiple source code management systems and types. The free version limitation is 5 million LOCs

Codase

Codase is the leading source code search company with advanced source code understanding and xml index/search technologies. Rather than treating code as text, Codase understands programming languages, and treats code as code, the way it's supposed to be. This unique and syntax-aware approach provides the most accurate and detailed search results with fine granularity levels of controls. With Codase, one can search functions, classes, strings, constants, macros, comments and other programming language constructs.

GrepCode

GrepCode.com is a code search engine built by developers for developers to search and browse open source Java projects.

A very similar service is Snipplr, a code snippet search engine. I don't think there's an obvious alternative, all services have their distinct features, you will have to evaluate them for yourself and see which one you enjoy the most.

Worth noting that Google Code Search is not really dead yet.

share|improve this answer
1  
I would recommend Snip2Code: snip2code.com. It has a powerful search engine like the one of Google Code Search, high integration in IDEs like Eclipse, Visual Studio, IntelliJ, Notepad++, and a good growing communty of coders posting new snippets in all the languages –  Cristiano Ghersi May 16 at 6:37

6 November 2012 a regexp code search engine for all Debian packages was announced on the debian-devel mailing list:

http://codesearch.debian.net/

Search queries can be written in regular expression syntax defined by re2.

It is possible to search for a specific file type (C, C++, Perl, Python, Go, Java, Ruby, Shell) where the files have been filtered out by their extension.

Debian is very serious about Software licensing. If you find code in this search engine you can be confident that the software is fulfilling the requirements for being open source software.

It is also great to be able to search in the debian/rules files. They are normally not distributed in source packages outside of Debian. In these files you can see how the package was built for Debian, e.g. which options that were given to the CMake command (if CMake was the build system in the package).

share|improve this answer

Try this: Koders

Edit

Update: Koders has merged with Ohloh.

share|improve this answer
2  
Unfortunately it is not as flexible as CodeSearch, but well, looks like we have to live with it :-/ –  johannes Oct 16 '11 at 21:28
    
It can't regexes and gives millions of duplicates... goo.gl/ODY1U versus goo.gl/q6QVZ –  Nakilon Oct 23 '11 at 2:42
2  
Link only answers are not particularly helpful, please expand your answer to tell us why you suggest Koders as an alternative to Google Code Search. –  Yannis Rizos Feb 27 '12 at 1:29

Also there is http://www.koders.com/:

Koders.com, a Black Duck Software Company, is a free on-line search engine for open source software and other web-downloadable code.

Over 30,000 developers each day rely on Koders to search over 1 billion lines of code written in over 30 languages and identified with 28 software licenses.

Koders is helping to fuel the open source software revolution. Developers can use this free resource to quickly find the best reusable open source code, methods, examples, algorithms and more, enabling them to be more successful with open source and complete projects faster.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.