Advisor professor asks for my dissertation research source code I am a PhD student and I wrote a computer program for my dissertation research. Recently my advisor professor got a grant and she wants to use my computer program in her grant and she asks me for the computer source-code. I will graduate next May and I am planning to use this program in my other studies. So I am not willing to share the code with her. She didn't mention future cooperation and I will also not cooperate with her because of huge differences in our research interests and perspectives.

So how can I refuse her properly?

Note: I was not a RA for her when I wrote the computer program, but this semester she got a grant and she set me as RA.
One of the reasons Science has been so successful is that scientists treat knowledge and tools as public goods. We don't hoard knowledge, but rather we write papers, share techniques, offer suggestions, etc. There are certainly cases in which sharing isn't beneficial, but these seem not to apply here. So of course you should share your computer program! You should share it with people you like, people you don't like, and people you don't even know.