May I modify the code/program for my undergraduate thesis project?
That is an ambiguous enough statement from the author about licensing, that I would simply send them an email and ask what they would allow. You can make your decision on whether to use it after you know whether you can. 

I would also ask your advisor if this kind of work is acceptable for your project. If the project requires more self-work, you need to know that before you use too much of this code. 

Finally, if you do use it, don't forget to cite it.