Other answers here seem to focus on the issue of copyright.
I will add that it is also a good idea to publish your code and results in the interest of documenting replication of the original study. This is an important aspect of science, being able to replicate/reproduce the results of others, as it helps validate scientific findings.
In this context, I think it is also important to cite the original work to help document your replication of their work. Actually, you could even consider publishing your replication in a journal that focuses on this important aspect which is usually ignored by traditional journals in favour of new results. One such journal is Rescience C.