Google product manager Tom Stocky said the searching and indexing covers code on webpages as well as code found in compressed files. All of the code will be drawn from sources that are otherwise publicly available, most of it coming from open-source projects.
“Most of the code is open source so you can reuse it,” Stocky said. “But I don't think that's the primary use — it's more about how to learn about things, and when you're building open-source packages, to make sure you doing it the right way.”
Code Search was the brainchild of the early technology group at Google Labs.
According to Stocky, Google engineers, many of whom participate in open-source projects, have used the product internally already.
Google has no plans to pair Code Search with AdSense, saying the service is primarily educational.
Code Search allows users to look for code using keywords and “regular expressions,” which let people scan for specified patterns.
Google will release an application programming interface to create an XML feed based on a specific query.
"More and more the developer community is the way Google products are getting to scale," Stocky said. "We think developers can really improve Google products and use Google technology to improve their own products."