关于在使用 ChatGPT 生成代码时破坏 Copyleft 许可证的可能性
软件工程
2025-02-10 v1
摘要
AI 助手可以帮助开发人员通过推荐要包含在其实现中的代码(例如,从其签名推荐方法的实现)。虽然有用,但这些建议可能镜像公共存储库中可用的 Copyleft 代码,使开发人员面临仅在特定约束下(例如,针对衍生软件的特定许可证)才能重用的代码风险。本文关于 ChatGPT 中此现象频率和规模的大规模研究。在本研究中,我们使用一系列配置和提示生成超过 70,000 个方法实现,揭示更大的上下文会增加复制 Copyleft 代码的可能性,但更高的温度设置可缓解此问题。
引用
@article{arxiv.2502.05023,
title = {On the Possibility of Breaking Copyleft Licenses When Reusing Code Generated by ChatGPT},
author = {Gaia Colombo and Leonardo Mariani and Daniela Micucci and Oliviero Riganelli},
journal= {arXiv preprint arXiv:2502.05023},
year = {2025}
}
备注
Accepted at the 33rd IEEE/ACM International Conference on Program Comprehension (ICPC 2025)