I can attest to at least one case where AT&T attempted to see whether its Unix code had been stolen.  A Unix look-alike came to AT&T's attention, and they wanted to get a sense of whether the code had been copied before bringing out the big legal guns.   I was one of several people asked to log into the system and see what I could figure out.  They particularly wanted me to look at their Yacc, because they assumed that would be hard to duplicate.

So I spent an interesting hour checking it out.   The first thing I did was to look to see whether some of my bugs or unadvertised features were in the program, and they weren't.   Then I threw a couple of difficult cases at it, and found a couple of bugs in their code.  And besides, it was VERY slow.  So I concluded it was a reimplementation.   I gather that was the consensus of others as well, and AT&T backed off.

Steve