I will explaining how to figure out if a piece of source code is open source or not, The Open Source Initiative defines open source code using a criteria of 10 factors that must be met to for software or its associated license to be consider open source.
Let’s look at these 10 factors:
Although you have the ability to charge for software that includes an open source project, the code you get from the open source project can not require a royalty or any other fee,
Must provide source code:
This goes to the core of open source code, without the source code and the ability to use, modify, and distribute that code, there wouldn’t be any benefits to having open source in the first place,
Must allow derived works:
The license must allow them to be distributed under the same terms as the license of the original software. The is important to the whole idea of open source which is to nurture an ecosystem that builds upon the work of others,
The integrity of the author’s code must be maintained:
The ability to trace code to specific authors is necessary. For example, code you contribute and modify should be traceable to you. This is accomplished through the use of public repositories like GitHub, and the request and acceptance of pull requests from individual contributors,
No discrimination against groups/persons:
Open source does not allow discrimination against persons or group and similar to this point,
No discrimination against fields of endeavour:
Open source means open, the code should have no restrictions on how software can be used,
Distribution of only one license required to secure rights:
Everything required to secure rights is in the distributed license, meaning there are no subsequent activities that must be carried out in order to use, modify, or distribute the code.
License must not be specific to a product:
The rights attached to the program must not depend on the program being part of a particular software distribution. If open source code was limited to specific products. Open source cod can still rely on other open source projects but it cannot require you to acquire a product that is not open source in order to use and implement that open source project.
License most not restrict other software:
This means that you’re free to include your open source code with proprietary code. Your use of open source software doesn’t require that your entire project itself has to be open sourced.
License must be technically neutral:
No provision of the license may be predicated on any specific technology or style of interface. Again, open means open, and it has to be open to a variety of technologies and interfaces.
So, if you’re in a scenario where the license/software meets these 10 factors of the criteria, then what you have is open source.
I found this wonderful explanation for open source code using legos!