The "source code" has nothing to do with it. Verizon uses CDMA, T-Mobile uses GSM. This is what unlocking a GSM phone does for you, which is why people who jailbreak and unlock their iPhone can use it on T-Mobile. The only real reason you can't do the same between Verizon and Sprint is because the companies themselves won't allow it on their network.