On the Possibility of Breaking Copyleft Licenses When Reusing Code Generated by ChatGPT

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Colombo, Gaia, Mariani, Leonardo, Micucci, Daniela, Riganelli, Oliviero
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917916267511808
author Colombo, Gaia
Mariani, Leonardo
Micucci, Daniela
Riganelli, Oliviero
author_facet Colombo, Gaia
Mariani, Leonardo
Micucci, Daniela
Riganelli, Oliviero
contents AI assistants can help developers by recommending code to be included in their implementations (e.g., suggesting the implementation of a method from its signature). Although useful, these recommendations may mirror copyleft code available in public repositories, exposing developers to the risk of reusing code that they are allowed to reuse only under certain constraints (e.g., a specific license for the derivative software). This paper presents a large-scale study about the frequency and magnitude of this phenomenon in ChatGPT. In particular, we generate more than 70,000 method implementations using a range of configurations and prompts, revealing that a larger context increases the likelihood of reproducing copyleft code, but higher temperature settings can mitigate this issue.
format Preprint
id arxiv_https___arxiv_org_abs_2502_05023
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle On the Possibility of Breaking Copyleft Licenses When Reusing Code Generated by ChatGPT
Colombo, Gaia
Mariani, Leonardo
Micucci, Daniela
Riganelli, Oliviero
Software Engineering
AI assistants can help developers by recommending code to be included in their implementations (e.g., suggesting the implementation of a method from its signature). Although useful, these recommendations may mirror copyleft code available in public repositories, exposing developers to the risk of reusing code that they are allowed to reuse only under certain constraints (e.g., a specific license for the derivative software). This paper presents a large-scale study about the frequency and magnitude of this phenomenon in ChatGPT. In particular, we generate more than 70,000 method implementations using a range of configurations and prompts, revealing that a larger context increases the likelihood of reproducing copyleft code, but higher temperature settings can mitigate this issue.
title On the Possibility of Breaking Copyleft Licenses When Reusing Code Generated by ChatGPT
topic Software Engineering
url https://arxiv.org/abs/2502.05023