I imagine typing a code comment in my text-editor before I start writing the code (e.g., calculate fibonacci sequence) and my editor (on a machine connected to the internet) populates with sample open-source code in my language (inferred from the file extension, or shebang, etc), that I can use as a boilerplate and make changes. The populated code is one search result, with the option to look at second most relevant result, third-most relevant and so on. And it shows the source url where I can go for details.
I think something like this with rosetta-code snippets is very doable (a weekend project, assuming you're good with your editor's programmability).