Windows Phone 8 Source Code

There's no way you can purchase the source code to a closed, patented system like Windows Phone 8. I believe doing so would probably break laws. The closest you'll get is probably looking through the XDA forums.