If your intent is to see how a game works and are willing to spend a small amount of money to see it, I highly recommend the Torque Gaming Engine from GarageGames. For $150 you get the entire engine source code of a AAA game title (Tribes 2). The content was ripped so you aren't buying Tribes 2, but content is easy to replace. Compared to the cost of other comparable engines, Torque is an amazing bargain. And if you ever decide to produce a game, you can do so without overbearing licensing restrictions.
EDIT: I know its not Open Source, but for your purpose of learning code it should qualify. The engine is coded in C++ and there is a script layer that is similar in syntax to C#/Java.