Google Code Search is dead
3 February 2012, by Tajinder Birdi
One of the best online tools for programmers, Google Code Search, is now dead. This amazing tool was very useful for looking through open source code. You could just type in a class name, or an error string, and be taken instantaneously to a hyperlinked, browseable source listing. This search engine was one of my most used bookmarks.
So what can we use instead?
- In many cases your IDE debugger will provide the information you want – and often in a more useful fashion.
- Otherwise, there are plenty of other search engines you can try.
For Java, if you have Eclipse set up properly (especially on a Maven project), it should be able to auto-download source for most of your JARs. You can control+click on a type name, and (after a short pause on the first occasion), Eclipse will show you the source. Of course, the search functionality is not as good as Google, but you can still right click on types and members and choose “find references”. Eclipse will search inside all your JARs, as well as in your workspace. You can even debug inside the 3rd party code. When this works, this is often even better than GCS.
There are a few JARs whose owners don’t properly upload the source to Maven, so this won’t work. See the other options below for these.
I would expect other Java IDEs to have similar functionality, but I haven’t tried any recently.
For C#, Visual Studio has very similar functionality, especially if you have ReSharper installed, which takes care of connecting you to a Debugging Symbol server and even decompiling 3rd party code on the fly. Just as for Eclipse, you can debug inside 3rd party code.
While these both work very well for debugging 3rd party code, there is a major use case of GCS which they don’t meet, which is finding examples of APIs in use.
Other search engines
There are a few other search engines which attempt to do the same thing that GCS did.
The discussion at the closing announcement of Google Code Search links to a few, including the following:
http://koders.com/ attempts to do much the same as GCS, and works OKish. They have been promising a major update for some time, so it could be about to get a lot better.
http://grepcode.com is tolerable, but a bit ugly and Java only. It’s a little better than Koders for Java-specific searches. The source code is weirdly formatted — comments are HTML/javadoc formatted inline with the source, which is jarring, but OK once you get used to it.
http://searchco.de/. This search engine is code-focussed, but isn’t quite a drop-in replacement for GCS. All the Java searches I tried linked to JavaDoc, rather than source code. It might be useful for searching for programming terms which contain symbols or which are ambiguous with non-software terms.
If anyone has any better suggestions, or thoughts on the above, please let us know below!