IANAL, but if the paper also contains a full description of the algorithm, seeing code excerpts per se should not preclude one from programming the algorithm without having to worry about this.
That said, it would be great if anyone publishing code excerpts would just include a footnote that they are licensed MIT or public domain, so we would not have to have these discussions.