I'm writing a Java class, part of an opensource game development framework under the Apache 2.0 license.
There is another framework, under the same license, that happens to also have a Java class that addresses the same subject as mine. I recently checked it out, and my implementation is extremely similar to that. Heck, even the local variables. The differences are minimal.
Since both classes are opensource, I guess it doesn't matter. However, since the codes are so similar, anyone may come to the conclusion that I just modified theirs a bit, and eventually quote the license:
You must give any other recipients of the Work or Derivative Works a copy of this License;
You must cause any modified files to carry prominent notices stating that You changed the files;
Since I wrote my class, there's no need to put their copyright notice in my code. However, it cannot be proven that I didn't just copy their code and modified a bit.
What is one supposed to do in this scenario?