Sharing Code In thesis My question is about sharing code in my thesis. I ran simulations using ready data in my field from a book. After that, I compared the results with those from the book. Do I need to share my code or is sharing it optional? Because I already explained the methodology that I used for my thesis. 
Looking forward to your answer. I tried to find a proper answer but I couldn't find it.
Your institute is the one who gives you your degree, revoking it is only going to happen if there is some sort of serious academic misconduct that they find out about much later. They know at the time you submit your thesis whether or not your code is included, so there is no reason that they would give you your degree knowing this, and then later deciding it is a reason to revoke your degree.

The most important thing is that your degree needs to be approved by your advisor and committee, so if your advisor says not to include it, don't. You could always put your code up on GitHub and include a reference to it in your thesis. (My thesis included my code at the end, as an appendix; I'm pretty sure no one ever looked at it).