I think you can notice that output looks similar, error messages are similar, etc. If the program is non-trivial its usually pretty obvious if its a copy or a reimplementation.
If it sounds plausible, presumably you could sue and read the source in discovery (ianal, not sure precisely how that works)