Unless otherwise stated, it is reasonable to expect the reader to assume that everything discussed in your thesis is your own work. Therefore I do not see a need to explicitly state your own involvement in data analysis.
Concerning your supervisor's code, there are a few options.
- One thing to consider is whether the code has been published, or has previously been used in other published work. If this is the case then you should cite the publication(s) in the text.
- Is the code available online? If so, I would likely provide a footnote providing the url. You could mention in the footnote that your supervisor is the author, but perhaps the code already contains a reference to its author.
- If the answer to the previous two questions is no, then I would likely mention in the acknowledgements that the supervisor had authored the code.
In some cases there's a distinction between writing code and creating the process that the code performs. For example, imagine I write a piece of code that performs a one sample t-test. I am the author of the code, but I'm not the creator of the t-test. I'm assuming that if your supervisor's code is implementing someone else's ideas then that person is being appropriately credited as well.