I found a mistake in my master thesis's code
they're not gonna take my certificate back, right


No, your degree won't be revoked on the basis of an honest mistake.  (Revoking the degree would only make sense for serious fraud or misconduct.)


  Since one of the main contributions of the thesis is the release of the source-code, am I obligated to fix the bugs?


Obligated by whom?  There's certainly no legal obligation, but deliberately withholding knowledge from the rest of the world would be unpleasant and harmful.

If you know how to fix the bugs without much effort, then I'd recommend that you do so.  If you don't know how to fix them or it would take too much time, you could at least attach a note explaining the problem (for the benefit of anyone who wants to use the code in the future).


  Am I required to keep my source-code online? In other words, can I now decide to take it down and not give it to anyone?


Again, required by whom?  Nobody can punish you if you take it down, but going out of your way to deny access is at least unfriendly.  If your thesis said that the code would be publicly available, then changing your mind now would be unethical.


  I don't want to contact them again to tell them about the bugs. But am I obligated to do that?


Nobody can make you, but it would be nice.  Think about it this way: another student might begin a project related to your thesis.  If you don't tell your advisor that the results of one experiment were wrong, then this student might experience pain and wasted time that could have been avoided if they had known about the problem earlier.  You might not care about your advisor, but surely there's some value to preventing future students from suffering unnecessarily.

And what's the worst case scenario if you tell your advisor?  Maybe your advisor would insult you, in which case you can take some satisfaction in having behaved better than your advisor, but there's nothing he/she can do to disrupt your life now.

In response to the edit:


  Well what I'm thinking is that since one of the main contributions of my thesis is the source-code, and since my examiners passed my thesis because it has contributions, then I thought that I must have that source-code always available. It feels to me like a contract:


If you said in the thesis that the code would be available in a public repository, then you have an ethical obligation to keep it available.  But universities revoke degrees only very rarely and for exceptionally serious reasons, such as research fraud or cheating.  There's no way a university would even try to revoke your degree for taking down the source code.  (However, if you're still worried you could look up your university's procedures for revoking degrees or search online for degrees revoked in the past.)

I don't mean to encourage you to take the code down, and I don't think you should.  My point is that this is about doing what you feel is right (keeping promises, helping other people, contributing to the world's knowledge) rather than about what someone else might try to make you do.