The primary site for GeoGebra's source code is https://dev.geogebra.org/svn/trunk/geogebra/ which is a read-only Subversion repository. We maintain a copy of it at https://github.com/geogebra/geogebra.
Please read http://geogebra.org/license about GeoGebra's licensing. A copy of this license should also be found in the file desktop/src/nonfree/resources/org/geogebra/desktop/_license.txt.
To learn more on development of GeoGebra (including suggested compilation steps) please visit http://dev.geogebra.org/.