Another, very good approach is to use Google Code Search. For example, a search for factor coreutils (see the man page or factor --help
to see that it's from coreutils) came up with the package as the second result. Two clicks away I was browsing factor.c online.
Google Code Search searches most public source code. You can use regexps and many advanced search options, including restricting by language and license.