Since most people use git to manage robot code, there may be an easier way to go about this.
1) Allow people to submit their code. Take the appropriate deets (team #, year, primary lang) if applicable (remember, non-teams can have FRC code too

).
2) Store this on a database, along with a link to the git repo
3) Index it by downloading the latest commit (--depth=1) of this repo somewhere known. Keep a watch on all repos, updating if needed maybe once per day. (You could do a deeper depth but HDD use would skyrocket if you plan on scaling at all)
4) Just pass in your query as a git grep.
If anyone is willing to do this project and wants some extra information about the implementation of the above, let me know.
GLHF