I can see the source code of the core QGIS plugins from the repository in github. But is there any repository of source codes for QGIS toolbars also?
If you mean QGIS default toolbars, well, those are written in C++ and you can find their creation and configuration here (C++ file) and here (Qt4 UI file). All actions (buttons) inside QGIS toolbars are written in C++ (except by plugin buttons) and you can find them in the QGIS source code as well.
If you want to get a reference of a QGIS toolbar in Python, you should use the
iface object (instance of QgisInterface), which exposes QGIS toolbars. For example, have a look at How to customize the QGIS GUI using Python?, where I explain how to customize the QGIS GUI (menus and toolbars) via Python.