Do LLMs Provide Links to Code Similar to what they Generate? A Study with Gemini and Bing CoPilot

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Bifolco, Daniele, Cassieri, Pietro, Scanniello, Giuseppe, Di Penta, Massimiliano, Zampetti, Fiorella
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910792284110848
author Bifolco, Daniele
Cassieri, Pietro
Scanniello, Giuseppe
Di Penta, Massimiliano
Zampetti, Fiorella
author_facet Bifolco, Daniele
Cassieri, Pietro
Scanniello, Giuseppe
Di Penta, Massimiliano
Zampetti, Fiorella
contents Large Language Models (LLMs) are currently used for various software development tasks, including generating code snippets to solve specific problems. Unlike reuse from the Web, LLMs are limited in providing provenance information about the generated code, which may have important trustworthiness and legal consequences. While LLM-based assistants may provide external links that are "related" to the generated code, we do not know how relevant such links are. This paper presents the findings of an empirical study assessing the extent to which 243 and 194 code snippets, across six programming languages, generated by Bing CoPilot and Google Gemini, likely originate from the links provided by these two LLM-based assistants. The study leverages automated code similarity assessments with thorough manual analysis. The study's findings indicate that the LLM-based assistants provide a mix of relevant and irrelevant links having a different nature. Specifically, although 66% of the links from Bing CoPilot and 28% from Google Gemini are relevant, LLMs-based assistants still suffer from serious "provenance debt".
format Preprint
id arxiv_https___arxiv_org_abs_2501_12134
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Do LLMs Provide Links to Code Similar to what they Generate? A Study with Gemini and Bing CoPilot
Bifolco, Daniele
Cassieri, Pietro
Scanniello, Giuseppe
Di Penta, Massimiliano
Zampetti, Fiorella
Software Engineering
Large Language Models (LLMs) are currently used for various software development tasks, including generating code snippets to solve specific problems. Unlike reuse from the Web, LLMs are limited in providing provenance information about the generated code, which may have important trustworthiness and legal consequences. While LLM-based assistants may provide external links that are "related" to the generated code, we do not know how relevant such links are. This paper presents the findings of an empirical study assessing the extent to which 243 and 194 code snippets, across six programming languages, generated by Bing CoPilot and Google Gemini, likely originate from the links provided by these two LLM-based assistants. The study leverages automated code similarity assessments with thorough manual analysis. The study's findings indicate that the LLM-based assistants provide a mix of relevant and irrelevant links having a different nature. Specifically, although 66% of the links from Bing CoPilot and 28% from Google Gemini are relevant, LLMs-based assistants still suffer from serious "provenance debt".
title Do LLMs Provide Links to Code Similar to what they Generate? A Study with Gemini and Bing CoPilot
topic Software Engineering
url https://arxiv.org/abs/2501.12134