You are best to start at the wiki for most things.
https://wiki.shibboleth.net/confluence/display/SHIB2/Home
The source access is describe on this page:
https://wiki.shibboleth.net/confluence/display/SHIB2/SourceAccess
Specifically the IdP and Discovery Service are written in Kava and they exist in several SVN repositories list on that page.
However I would suspect that reading the source is not the most profitable way to learn about it. https://wiki.shibboleth.net/confluence/display/SHIB2/UnderstandingShibboleth is a good place to start, and I’d recommend getting hold of the SAML specifications and profiles and understanding them.