Managing Code Snippets from Public Repositories
The AI-powered GitHub Copilot assistant has already proven its value, making programming tasks easier for developers. However, one recurring concern arises when Copilot suggests code snippets that already exist in public repositories, leading to potential copyright claims.
GitHub’s Approach: Empowering Developers with Choices
In 2022, GitHub provided an option to automatically block proposals containing such code, but many programmers still felt the need to review these snippets. To strike a balance, GitHub initiated testing of a feature that displays such code in the sidebar, allowing developers to decide how to handle it. Eventually, this feature will transition to Copilot Chat.
Addressing Code Borrowing and License Issues
The blocking feature was favored by most of GitHub’s enterprise customers, including Microsoft and GitHub employees, notes NIXSolutions. However, it was deemed too restrictive as it could hinder legitimate use cases. Now, programmers have three choices: reject the proposed code, use it directly (if the license permits), or request Copilot to rephrase the snippet to avoid exact replication. GitHub is working on ensuring that Copilot only sources code samples from appropriately licensed projects.