Technical caveat: To work effectively, it needs to be able to compile (parse into an AST) the code, which for many GitHub projects is challenging. I'd bet they could easily get to 80% compilation rate though and then use dumb text search on the rest.
Just hire someone who worked for Google and copy their internal code search.
(Preview available here: https://source.chromium.org/)
Technical caveat: To work effectively, it needs to be able to compile (parse into an AST) the code, which for many GitHub projects is challenging. I'd bet they could easily get to 80% compilation rate though and then use dumb text search on the rest.