Sometimes, firing up an IDE’s to do source code search might be more wait than I am willing to go through. So, here is an one-line command that I used to search through a directory full of source code:
for i in `find . -name "*.java"`; do egrep -H -n "search_string" $i; done
You may wish to replace file pattern and search pattern text to fit your needs.