Hi,
Webparts are stored within the website filesystem (CMSWebParts folder) as the special User controls (implementing CMSAbstractWebpart interface to meet our lifecycle).
Their definitions are then in the database / managed in
Site manager - Development - Webparts, however there you cannot access the source code of the webparts.
Only the transformations (for Repeaters / Datalists) are accessible from the administration interface.
However, as you've correctly mentioned, you can export the web parts together with codefiles and download those exports from the server, so you could import them into existing setup or get the files out of the export zip packages to modify them and upload back (or import back, if you have access to the server filesystem).
More at
Import/export documentation in DevguideRegards,
Zdenek.