licensing
How to change the code so that it does not fall under the violation of the license &quot;partial copying&quot;
<p>Good afternoon!</p>

<p>I'm interested in a legal issue regarding code licensing. I am writing an Ansible role for two companies, and each company wants to impose its own license on this code: “full or PARTIAL copying is prohibited”.</p>

<p>The point is that I am writing a role for the same environments and services. Naturally, it turns out that the roles are very similar. And since the changes in the code can not be swung in the role of Ansible, no matter how you say it, it will be at least recognizable.</p>

<p>For example:</p>

<pre><code>- name: "Oracle | Install basic Oracle 7 repos"
  yum_repository:
    name: "{{ item.name }}"
    description: "{{ item.description | default ('No descr') }}"
    baseurl: "{{ item.baseurl }}"
    gpgcheck: "{{ item.gpgcheck | default ('0') }}"
    gpgkey: "{{ item.gpgkey | default ('file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5') }}"
    state: "{{ item.state | default('present') }}"
    enabled: "{{ item.enabled | default('yes') }}"
    priority: " {{ item.priority | default('20') }}"
  with_items: "{{ linux_oracle_yum_repo }}"
  tags:
    - update
</code></pre>

<p>In both companies, this piece of code is similar to one and it does not work out to change much.</p>

<p>I ask for a little help in the legal issue of this situation: HOW much do I need to change the code so that it does not regarded as "partial copying"?</p>

<p>Is this changing a one character in a file? Or in the whole program? Or changing one line? Or need to dial a certain percentage of the code difference? Or is it enough just to change a name the variables and the descriptions?</p>

<p>Thank you for help!</p>

<p>If you change a single character, that's clearly a partial copy.</p>

<p>Copyright protection has a limited extent, however.  The protected work must be original and not obvious.  For example, there are only so many ways to write a function that computes the average of two numbers, so the copyright owner of one body of code cannot claim infringement by the author of a second body of code simply because they both have a function <code>float Average(float a, float b) { return (a + b) / 2; }</code></p>

<p>A surefire way to avoid infringing copyright is to specify the function of the code and then have someone who has never seen the code write it from scratch.  This is sometimes called <a href="https://en.wikipedia.org/wiki/Cleanroom_software_engineering" rel="nofollow noreferrer">clean-room engineering</a>.</p>

<p>Otherwise, there is no way to answer your question definitively.  If you create a modified copy of the code (a "derived work" in copyright terminology), there is no strict formula available to evaluate the extent of the infringement.  It comes down to a case-specific analysis of the facts by a judge.  Depending on the jurisdiction, which you have not specified, there may be specific laws or judicial precedent that guide the judge, but the determination will still require a specific analysis of the facts.  For example, if the alleged infringer raises these arguments, the judge would have to determine how obvious the code is, or whether the copyright claimant even owns the copyright to the code.</p>
