Google is not great for code search, but I dislike this "rich snippet" thing.
These engines are stealing the sites traffic. The whole point was to be a search engine, not an encyclopedia. If you want to be the latter, produce your own content.
It's my opinion. I don't use those engines because of that. They jeopardize their sources. It's unsustainable.
IMHO, the options you listed still miss the point.
When I do a code-related search, most often I'm looking for a documentation entry.
So, for example, if I search for "python string replace", Google returns me a bunch of crappy pages.
I can fix it with "site:python.org string replace".
SearchCode does a terrible job [1]. So does Public WWW [2].
Now, Google nails with the first result, pointing to Python's built-in types page. But it would be perfect if it could just add a #str.replace fragment to the URL [3] and save me some scrolling. Instead, it sends me to the top of the page...
searchcode seems to not let you say things like "in the main api", or in libraries, it's all usages, it's also actually the code itself. so "boto3 list_buckets" a common query I do (that google actually does well).
These engines are stealing the sites traffic. The whole point was to be a search engine, not an encyclopedia. If you want to be the latter, produce your own content.
It's my opinion. I don't use those engines because of that. They jeopardize their sources. It's unsustainable.