Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example if I have code that contains parts of code rewritten from code found here or on Stack Overflow or other Creative-Commons licensed code, can my final code be licensed with an Apache License?

share|improve this question
up vote 5 down vote accepted

You should read and understand any license that you agree to. CC licenses, like CC-BY-SA-3.0, explicitly state:

You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License.

There are currently no approved compatible licenses.

IANAL, but it seems to me that you cannot sublicense CC content under the Apache license.

See also:

share|improve this answer
Interesting. If you are correct, then the code in answers on SO or any of the SE sites is unusable in a large number of projects. I suspect that that was not their intent so I look forward to having @JeffAtwood chime in on this. – Peter Rowell Oct 17 '12 at 20:16
In the referenced Meta SO link Jeff says "I am not sure this is really a practical ongoing concern except for the truly paranoid." – M. Dudley Oct 18 '12 at 12:24
Given the multimillion dollar fiasco that Oracle just ran Google through based (ultimately) on 9 lines of code, I find Jeff's statement—"That said, a snippet of code falls under excerpt category and thus should be free to use under fair use."—to be either outdated or naive. This is one of those times when his opinion should have been clearly marked as IANAL. – Peter Rowell Oct 18 '12 at 16:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.