CodeGenLink: A Tool to Find the Likely Origin and License of Automatically Generated Code

📅 2025-10-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models (LLMs) frequently generate code lacking provenance and licensing information, raising concerns regarding trustworthiness and copyright compliance. To address this, we propose a hybrid code provenance method integrating LLMs with real-time web retrieval, implemented as a VS Code extension. First, an LLM generates candidate code snippets; then, a web search API retrieves potential original sources; finally, fine-grained code similarity analysis filters high-matching candidates and automatically extracts associated open-source license metadata. This work is the first to synergistically combine LLM-driven code generation with live web retrieval for joint code provenance tracing and license identification. Evaluation on mainstream open-source projects demonstrates that our tool effectively suppresses noisy search results and accurately locates semantically similar source code, achieving 82.3% recall and 76.5% precision. The approach significantly enhances the traceability, credibility, and legal compliance of LLM-generated code.

Technology Category

Application Category

📝 Abstract
Large Language Models (LLMs) are widely used in software development tasks nowadays. Unlike reusing code taken from the Web, for LLMs'generated code, developers are concerned about its lack of trustworthiness and possible copyright or licensing violations, due to the lack of code provenance information. This paper proposes CodeGenLink, a GitHub CoPilot extension for Visual Studio Code aimed at (i) suggesting links containing code very similar to automatically generated code, and (ii) whenever possible, indicating the license of the likely origin of the code. CodeGenLink retrieves candidate links by combining LLMs with their web search features and then performs similarity analysis between the generated and retrieved code. Preliminary results show that CodeGenLink effectively filters unrelated links via similarity analysis and provides licensing information when available. Tool URL: https://github.com/danielebifolco/CodeGenLink Tool Video: https://youtu.be/M6nqjBf9_pw
Problem

Research questions and friction points this paper is trying to address.

Identifies origin of LLM-generated code to address trustworthiness concerns
Detects potential licensing violations in automatically generated code snippets
Links generated code to similar web sources with license information
Innovation

Methods, ideas, or system contributions that make the work stand out.

Extension combines LLMs with web search
Performs similarity analysis on generated code
Filters links and provides licensing information
🔎 Similar Papers
No similar papers found.