Is it okay to use source code from another paper in thesis?
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.