The thing is that it probably isn't. The thing you call "laundering" is probably actually fine. The thing that people misunderstand is that copyright is written such that it never protects function. If your code is open source, then I can write code that does the same thing, and if I can't because your code perfectly encapsulates the function, it's inseparable from that function and thus isn't eligible for copyright protection at all.
https://casetext.com/case/kern-river-gas-transmission-v-coas...
Your comments and creative expression are the only portions of your code that are protected by copyright. The function isn't.