Someone published a paper whose supplementary material contains source code. Can I include part of that code (I would mark it as copied in the source and the manuscript) in my own code, which is intended for the supplementary material of my own paper?
If not (or at least not automatically), who would I have to contact to ask for permission, the journal or the author of the other paper?