I've heard multiple stories from people who can't even look at the Linux source before they do something in their company's kernel because the act of just looking at it compromises them legally. So which is it?
Clean room implementation only happens for very special codes, like codecs or efficient matrix multmul that took billions of trials to develop with AI. Not for 2-3 lines of code snippets that do one simple thing and are already covered online in hundreds of places.