Is it okay to use source code from another paper in thesis? I am currently writing my Master's thesis in Math and part of my results involves using running simulations to test for certain types of algebraic properties of parameterised equations. The theoretical basis for these simulations were derived from a paper, in which the authors published their code online. I wish to copy this code and put it in the appendix. My reason for doing this is that I don't trust the link to always be available and the interested readers of my thesis will always be able to view said code which makes it easier to reader the thesis, as opposed to looking it up.
It depends on the licensing terms of their code. If it's under an open source license, then you might probably be able to use the same by giving due credits to the authors of the same. It would also be better if you could try to contact the author of the paper and ask their permission before using the same if you're not able to find any specific licensing terms.