How developers search for code: a case study
research.google.com
research.google.com
This is probably totally different to search working over internal codebases however.
I must confess... I was originally looking from a vanity point of view and have mixed feelings to see that searchcode was mentioned in the references but not linked.
I guess the fundamental problem here is that optimising for one group sometimes comes at the expense of another and statistically we (meaning developers) just aren't a big enough group to matter.
I think something like this with rosetta-code snippets is very doable (a weekend project, assuming you're good with your editor's programmability).
http://blogs.msdn.com/b/onecode/p/devassistant.aspx
Sadly they also appear to be keeping it closed source.
It's pretty much the standard I'll aim in my own documentation in the future, lean, precise and covers the main cases with useful examples.
If anything, it's the API signatures that get out of sync with the user's needs. And as anyone who's ever tried to deprecate public APIs will know, it's a real pain, frustrating to users and devs alike.
No language developer ever seems to take it seriously as a design challenge to solve though. You get tools like rustdoc as "good enough"