Google is not the only search tool, if you’re a java developper you can use many specialyzed search engines:
– jdocs to search the javadoc of many open source project
– jarhoo to search the jars and package names of many open source project
and here is a new one:
– Koders let you search the code of many open source project (not only in java but in a wide range of language)
If you’re are looking for code sample this might be the place to go.