CS I · Mon Dec 7 · 18.1 · Do Now

Code Reuse and Permission

Open the discussion form on the right and answer Section 1 from your first reading.

Announcements

Open Source, Licenses and Intellectual Property

This section explains who owns code, how an owner gives permission to use it, and how the same questions apply to code an AI tool generates.

Code Is Someone's Work

The Java that checks every snippet in Bench Basics is a free download from Eclipse Adoptium, and the download includes the source code of Java's own classes. Anyone may reuse that code because its authors published it with written terms, which sit in a folder named legal inside the download. Intellectual property is a creation of the mind that the law treats as someone's property, such as an invention, a book, a song or a computer program. The Chromebook a program runs on is ordinary property, because it is a physical object. The program itself is intellectual property, because it is written work that a person created. In the United States, copyright protects an original work, including a computer program, as soon as the author writes it down, with no form to fill out. The owner then decides who may copy the work, change it and share it.

Licenses and Open Source

A license is the owner's written permission to use a work, together with the conditions that come with it. It states what other people may do with the code and what they must do in return. A license is not a price tag, because a free license still has conditions. For example, the MIT License lets anyone use, copy, change, share and even sell the code, free of charge. Its one condition is that the copyright notice and the license text stay with every copy of the code or of any large part of it.

Open source code is source code published under a license that lets anyone use it, change it and share it, including changed versions. The Open Source Initiative's official definition states that open source "doesn't just mean access to the source code." Code that a person can see on a website is not open source just because it is visible. The AP Computer Science A course description states that programmers often reuse code published as open source. It adds that code not published as open source can go into a program only after the programmer gets permission, which often means buying the code.

The class's own Java has an open source license. Its LICENSE file is the GNU General Public License, version 2, often called the GPL. The GPL asks more than the MIT License does, because anyone who shares a changed version must share its source code under the same license. The end of the same file adds the Classpath Exception, which lets a program that only uses this Java be shared under terms its own author chooses. Figure 1 shows the path a programmer follows to decide whether found code may be used.

Code Without a License and Code from an AI Tool

Seeing code is not the same as having permission to use it. GitHub's guide to choosing a license explains that code is under the author's exclusive copyright by default. When code has no license, other people generally have no permission to use, change or share it, so the guide suggests asking the author to add one.

Code from an AI tool needs the same check, because a model generates code by predicting what is likely to come next from its training. GitHub states that its Copilot tool was trained on code from public sources, including public repositories on GitHub. GitHub's documentation says that, while the chance is low, a suggestion can match code in the training set. The tool can also check suggestions against public code on GitHub and either block a match or show its source and license.

Who owns generated code is still being decided. In January 2025, the United States Copyright Office concluded that copyright does not protect material generated entirely by AI. With the tools available then, it also found that writing a prompt alone does not make a person the author. The Office said that it decides case by case whether a person added enough of their own work. In a class, the class's rule decides whether AI-generated code may be used, and a student names where any code came from. Before reusing any code, a programmer checks where it came from, whether it has a license and what that license asks. If the code is not open source, the programmer also needs the owner's permission.

Summary

Code is intellectual property, so in the United States its author owns it from the moment it is written down. A license gives permission with conditions, and open source code has a license that lets anyone use, change and share it. Code with no license, code that is not open source and code from an AI tool all need the same check of where it came from and what permission it carries.

Sources: College Board, AP CSA Course Description (2025); Open Source Initiative, Open Source Definition (2007) and MIT License (n.d.); GitHub, No License (n.d.); U.S. Copyright Office, What is Copyright? (n.d.) and Copyright and AI, Part 2 (2025); WIPO, What is IP? (n.d.); GitHub, Copilot docs and FAQ (n.d.); Adoptium, FAQ (n.d.); course JDK legal folder (2026).

I Do questions
  1. notebook cue: open source

    The Java the class runs on the bench publishes its source code for anyone to read, change and share. What makes that open source, and not just code you happen to be able to see?

    Check

    It is open source because a license, the GPL in its LICENSE file, gives everyone the right to use, change and share the code, including changed versions. Code that is only visible on a website comes with no such right. See Licenses and Open Source, paragraphs 2 and 3.

  2. notebook cue: license

    Inside the class's Java download is a folder named `legal` with a file named LICENSE. What does that file tell a programmer, and why read it before reusing the code?

    Check

    The LICENSE file is the owner's written permission and its conditions: it says what a programmer may do with the code and what they must do in return. The class's Java uses the GPL, which asks anyone who shares a changed version to share its source code under the same license, so a programmer reads it first to know the conditions. See Licenses and Open Source, paragraphs 1 and 3.

  3. notebook cue: intellectual property

    A student writes a short Java program at home for fun. Is the program intellectual property, and what makes it so?

    Check

    Yes. The program is a creation of the mind and written work, so in the United States copyright protects it as soon as it is written down, with no form to fill out, and the student owns it. The Chromebook it runs on is ordinary property; the program is intellectual property. See Code Is Someone's Work.

Figure 1. A programmer who finds code checks for a license first, and the answer decides whether to ask the owner, follow the license's terms, or get permission; code from an AI tool raises the same questions.
I Do questions
  1. notebook cue: open source

    The Java the class runs on the bench publishes its source code for anyone to read, change and share. What makes that open source, and not just code you happen to be able to see?

    Check

    It is open source because a license, the GPL in its LICENSE file, gives everyone the right to use, change and share the code, including changed versions. Code that is only visible on a website comes with no such right. See Licenses and Open Source, paragraphs 2 and 3.

  2. notebook cue: license

    Inside the class's Java download is a folder named `legal` with a file named LICENSE. What does that file tell a programmer, and why read it before reusing the code?

    Check

    The LICENSE file is the owner's written permission and its conditions: it says what a programmer may do with the code and what they must do in return. The class's Java uses the GPL, which asks anyone who shares a changed version to share its source code under the same license, so a programmer reads it first to know the conditions. See Licenses and Open Source, paragraphs 1 and 3.

  3. notebook cue: intellectual property

    A student writes a short Java program at home for fun. Is the program intellectual property, and what makes it so?

    Check

    Yes. The program is a creation of the mind and written work, so in the United States copyright protects it as soon as it is written down, with no form to fill out, and the student owns it. The Chromebook it runs on is ordinary property; the program is intellectual property. See Code Is Someone's Work.

Open Source, Licenses and Intellectual Property

This section explains who owns code, how an owner gives permission to use it, and how the same questions apply to code an AI tool generates.

Code Is Someone's Work

The Java that checks every snippet in Bench Basics is a free download from Eclipse Adoptium, and the download includes the source code of Java's own classes. Anyone may reuse that code because its authors published it with written terms, which sit in a folder named legal inside the download. Intellectual property is a creation of the mind that the law treats as someone's property, such as an invention, a book, a song or a computer program. The Chromebook a program runs on is ordinary property, because it is a physical object. The program itself is intellectual property, because it is written work that a person created. In the United States, copyright protects an original work, including a computer program, as soon as the author writes it down, with no form to fill out. The owner then decides who may copy the work, change it and share it.

Licenses and Open Source

A license is the owner's written permission to use a work, together with the conditions that come with it. It states what other people may do with the code and what they must do in return. A license is not a price tag, because a free license still has conditions. For example, the MIT License lets anyone use, copy, change, share and even sell the code, free of charge. Its one condition is that the copyright notice and the license text stay with every copy of the code or of any large part of it.

Open source code is source code published under a license that lets anyone use it, change it and share it, including changed versions. The Open Source Initiative's official definition states that open source "doesn't just mean access to the source code." Code that a person can see on a website is not open source just because it is visible. The AP Computer Science A course description states that programmers often reuse code published as open source. It adds that code not published as open source can go into a program only after the programmer gets permission, which often means buying the code.

The class's own Java has an open source license. Its LICENSE file is the GNU General Public License, version 2, often called the GPL. The GPL asks more than the MIT License does, because anyone who shares a changed version must share its source code under the same license. The end of the same file adds the Classpath Exception, which lets a program that only uses this Java be shared under terms its own author chooses. Figure 1 shows the path a programmer follows to decide whether found code may be used.

Code Without a License and Code from an AI Tool

Seeing code is not the same as having permission to use it. GitHub's guide to choosing a license explains that code is under the author's exclusive copyright by default. When code has no license, other people generally have no permission to use, change or share it, so the guide suggests asking the author to add one.

Code from an AI tool needs the same check, because a model generates code by predicting what is likely to come next from its training. GitHub states that its Copilot tool was trained on code from public sources, including public repositories on GitHub. GitHub's documentation says that, while the chance is low, a suggestion can match code in the training set. The tool can also check suggestions against public code on GitHub and either block a match or show its source and license.

Who owns generated code is still being decided. In January 2025, the United States Copyright Office concluded that copyright does not protect material generated entirely by AI. With the tools available then, it also found that writing a prompt alone does not make a person the author. The Office said that it decides case by case whether a person added enough of their own work. In a class, the class's rule decides whether AI-generated code may be used, and a student names where any code came from. Before reusing any code, a programmer checks where it came from, whether it has a license and what that license asks. If the code is not open source, the programmer also needs the owner's permission.

Summary

Code is intellectual property, so in the United States its author owns it from the moment it is written down. A license gives permission with conditions, and open source code has a license that lets anyone use, change and share it. Code with no license, code that is not open source and code from an AI tool all need the same check of where it came from and what permission it carries.

Sources: College Board, AP CSA Course Description (2025); Open Source Initiative, Open Source Definition (2007) and MIT License (n.d.); GitHub, No License (n.d.); U.S. Copyright Office, What is Copyright? (n.d.) and Copyright and AI, Part 2 (2025); WIPO, What is IP? (n.d.); GitHub, Copilot docs and FAQ (n.d.); Adoptium, FAQ (n.d.); course JDK legal folder (2026).

Table Talk
You find Java code online that does exactly what your program needs. Before you paste it in, write one question about whether the code works and one question about whether you are allowed to use it.

Each table agrees on the one question that matters most before using someone else's code, and says why it comes first.

Chromebooks stay closed while your table talks. Sections 1 and 2 of the discussion form are already done. After you talk, finish Section 3 right here under My View. Submit before the exit ticket.

This form has three sections. Section 1: answer today's Board Question. Section 2: after the reading. Section 3 opens later in class. Today's Board Question: You find Java code online that does exactly what your program needs. Before you paste it in, write one question about whether the code works and one question about whether you are allowed to use it.

CR 1. Board Question: You find Java code online that does exactly what your program needs. Before you paste it in, write one question about whether the code works and one question about whether you are allowed to use it. Give your answer and one reason.

Write your answer in your lab notebook, labeled CR 1.

MC 1. Think about your answer to the board question. You find Java code online that does exactly what your program needs. Before you paste it in, write one question about whether the code works and one question about whether you are allowed to use it. Which position is closest to yours now?

  • If code is on the internet, anyone can use it.
  • Check the license first. Open source code can be used if you follow its terms, and other code needs permission.
  • Never use code that someone else wrote.

MC 2. (Reading claim 1) Code posted online with no license is free for anyone to copy.

  • Agree
  • Disagree

MC 3. (Reading claim 2) An open source license can still have conditions, such as keeping the author's notice.

  • Agree
  • Disagree

MC 4. (Reading claim 3) Code an AI tool generates can sometimes closely match code that someone else wrote.

  • Agree
  • Disagree

MC 5. (Reading claim 4) The MIT License lets people use and share the code only after they pay the author.

  • Agree
  • Disagree

MC 6. (Reading claim 5) Code that is not open source can go into a program after the programmer gets permission, which often means buying it.

  • Agree
  • Disagree

MC 7. (Reading claim 6) In the United States, a program is protected by copyright only after its author fills out a form with the government.

  • Agree
  • Disagree

MC 8. (Reading claim 7) In Figure 1, code with no license leads to asking the owner for permission.

  • Agree
  • Disagree

MC 9. (Reading claim 8) The United States Copyright Office said in 2025 that a person who only writes the prompt is the author of the code an AI tool generates.

  • Agree
  • Disagree

CR 2. (A different view) Write the view at your table that was most different from yours. If everyone agreed, write the strongest argument against your table's answer.

Write your answer in your lab notebook, labeled CR 2.

CR 3. Think about the Board Question again: You find Java code online that does exactly what your program needs. Before you paste it in, write one question about whether the code works and one question about whether you are allowed to use it. Do you have the same opinion as when you first answered the board question? If it is the same, what from the reading or table talk reaffirmed your opinion? If it is different, what from the reading or table talk changed your opinion?

Write your answer in your lab notebook, labeled CR 3.