I am currently investigating this topic, I have found source codes for previous IDE revisions in the Arduino page, but I need to do a little bit more of research, to provide you useful information. I will post my results as get them.
The open source Arduino IDE tree is here:
This should give you all you need if you just want to learn how the IDE is implemented.
You will notice the Galileo build 1.53 is not part of this tree. No idea if it is open source or not. In any case, the differences should be minor, and largely related to object code generation.
The Galileo Arduino software is an open source application therefore the code should be available for download, however is not listed in my database, Galileo use the standard Arduino IDE you can obtain the code from this link