I want to know if a software developer can potentially be sued for writing everyday boilerplate code or similar functions at 2 separate software jobs with different clients.
Suppose a software developer writes source code for client A. The contract the developer works under specifies that the source code belongs to the client after the developer finishes the code.
Suppose the software developer ends his/her work with client A and begins a new contract at client B. The software developer is required in his/her job to implement some functions that are very similar to functions implemented in their work at client A.
The two source code projects (for clients A and B) written by the developer are very similar, and are both proprietary, closed-source projects. The two software implementations are almost identical and converge on the same mathematical ideas.
Statistical ideas such as ‘standard deviation’ are used in software frequently. Can client A or B claim that others are committing plagiarism or violating copyright law if other companies implement the same functions in their software releases?
Can the developer be successfully sued by client A or B for having implemented the same (or very similar) functions at more than one company?
It is probably common for software developers to re-invent the wheel independently of one another - intentionally or not.
At what point is software plagiarized? An algorithm is an algorithm - implementing it could arguably not be done any other way than what is outlined in a standard algorithms text.
I have tried to find answers to this type of question, but all I can find is references to hash-based plagiarism detectors (MOSS, etc.).