Code search gives users the ability to search for publicly accessible soruce code.Â According to Google, source code lives in two ways on the internet: in things like zip files and gzip, or in software control repositories such as SourceForge, Google’s code hosting, and other places.Â They aim to index source code found in all of those places.
Google won’t just be indexing the zip file, but they’ll also be opening it up, unzipping it, and indexing all the individual files within in it.Â Â
The regular Googlebot crawler is being updated to recognize these zip files, and although they are unable to give an exact figure, Google says that Code Search already contains billions of lines of code.Â Such a staggering number makes you wonder how easily this code will even be able to be searched.Â But fear not, theÂ smart people at Google have set it up so that Code Search can be searched by software license, programming language, and by file name.Â With all three of those in place, you should be able to find the code that you are looking for. Users may also search by regular expressions and patterns of words.
Launching alongsideÂ Code Search is the Code Search API, which will allow coders and programmersÂ to further extend the project.Â
There will be no AdSense ads in the Code Search results, at least at first, and the results will not show up in regular Google searches.
Some potential uses of Google code is for developers to look and seeÂ where there code is being used.Â This may help to combat plagerism and software license use infractions.
Most of the code indexed by Google is open-source, and they believe that very little of it is proprietary since it is all posted in public places.Â However, with anything, there does remain the possibility that some people may post other people’s code illegally.Â Therefore, there may be some proprietary content included in the Code Search index.Â Luckily though, they have created a way for such instances to be reported so that they can be removed from the index.
You can access Code Search directly at http://www.google.com/codesearch,via the Google Labs page, or by clicking “Advanced Search” on the Google web search.