, , , , , , ,

GitHub Copilot can now tell developers when its suggestions match code in a public repository

GitHub Copilot has changed how developers write their code. However, it can also create issues when it creates code similar to what’s already available in another public repository. In 2022, GitHub launched a feature that allowed users to block suggestions of matching public code automatically. According to a GitHub spokesperson, this system would trigger less than 1% of the time. But sometimes, developers may want to see what these code fragments are — either to use them (within the licensing restrictions set up by their companies) or to maybe use the entire library this snippet came from.

So to find a middle ground, GitHub today launched a private beta of a code referencing feature for GitHub Copilot that will give developers this choice. With code referencing turned on, Copilot won’t automatically block any matching code it generates but instead shows it to developers in a sidebar and lets them decide what to do with it. Over time, this feature will also come to Copilot Chat.

Image Credits: GitHub

GitHub previewed this feature last November but it clearly took a while to release it.

As GitHub CEO Thomas Dohmke told me, Microsoft, GitHub and most Copilot enterprise customers were using the original blocking feature, but he also noted that it’s a bit of a blunt tool. “It gives you little control to decide for yourself whether you actually want to take that code and attribute it back to an open-source license. It doesn’t actually let you discover that there might be a library that you could use instead of synthesizing code,” he told me. “It prevents you from exploring these libraries and submitting pull requests. You might be reproducing everything that already exists in some open-source repo.”

Image Credits: GitHub

Dohmke pointed out that this often applies to common computer algorithms, like sorting, which tend to exist in many different places. Now, developers can either reject the code, use it directly — assuming the library makes that possible — or have Copilot rewrite the code so it doesn’t match the original code anymore.

As of now, it’s not possible to only see results that match specific licenses, but the team is actively looking for feedback to see if that is a feature users are asking for.

“We’re letting people understand the match and then go on and explore or go and make the right decision,” Dohmke said. “I think it fills the gap that the original solution had.”

The code referencing feature also tends to fire more often when there isn’t a lot of context for Copilot to work with. When Copilot can see a lot of context from the existing code you are working on, it’s unlikely to produce a suggestion that matches public code. But when you’re just getting started, it’s significantly more likely to generate matching code.

At the core of this is a very fast search engine (GitHub says it wants to keep latency down to 10-20ms) that can quickly find the matching code and its license. As of now, the matching code snippets are listed in the order the search engine finds them. In its original announcement from last year, GitHub said that developers should have the “ability to sort that inventory by repository license, commit date, etc.,” so I expect it’ll add this functionality later.

 

 

https://techcrunch.com/2023/08/03/github-copilot-now-shows-developers-when-its-code-suggestions-match-code-in-a-public-repository/


January 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

About Us

Welcome to encircle News! We are a cutting-edge technology news company that is dedicated to bringing you the latest and greatest in everything tech. From automobiles to drones, software to hardware, we’ve got you covered.

At encircle News, we believe that technology is more than just a tool, it’s a way of life. And we’re here to help you stay on top of all the latest trends and developments in this ever-evolving field. We know that technology is constantly changing, and that can be overwhelming, but we’re here to make it easy for you to keep up.

We’re a team of tech enthusiasts who are passionate about everything tech and love to share our knowledge with others. We believe that technology should be accessible to everyone, and we’re here to make sure it is. Our mission is to provide you with fun, engaging, and informative content that helps you to understand and embrace the latest technologies.

From the newest cars on the road to the latest drones taking to the skies, we’ve got you covered. We also dive deep into the world of software and hardware, bringing you the latest updates on everything from operating systems to processors.

So whether you’re a tech enthusiast, a business professional, or just someone who wants to stay up-to-date on the latest advancements in technology, encircle News is the place for you. Join us on this exciting journey and be a part of shaping the future.

Podcasts

TWiT 1013: Calamari in Crisis – Touching the Sun, Fake Spotify Artists, Banished Words This Week in Tech (Audio)

Touching the Sun, Fake Spotify Artists, Banished Words AI Needs So Much Power, It's Making Yours Worse How many billions Big Tech spent on AI data centers in 2024 NASA Spacecraft 'Touches Sun' In Defining Moment For Humankind Elon Musk Calls Out NASA's Moon Ambitions: 'We're Going Straight to Mars' Elon Musk and the right's war on Wikipedia Trump Asks Supreme Court to Pause Law Threatening TikTok Ban US Treasury says Chinese hackers stole documents in 'major incident' Judge blocks parts of California bid to protect kids from social media Finland probes Russian shadow fleet oil tanker after cable-cutting incident US appeals court blocks Biden administration effort to restore net-neutrality rules The Ghosts in the Machine (fake spotify artists) Massive VW Data Leak Exposed 800,000 EV Owners' Movements, From Homes To Brothels Banished Words | Lake Superior State University 2025 Public Domain Day 2025 Happy Birthday, Bitcoin! The top cryptocurrency is old enough to drive End of the lines? QR-style codes could replace barcodes 'within two years' Host: Leo Laporte Guests: Richard Campbell, Anthony Ha, and Stacey Higginbotham Download or subscribe to This Week in Tech at https://twit.tv/shows/this-week-in-tech Get episodes ad-free with Club TWiT at https://twit.tv/clubtwit Sponsors: ZipRecruiter.com/Twit joindeleteme.com/twit promo code TWIT canary.tools/twit – use code: TWIT zscaler.com/security
  1. TWiT 1013: Calamari in Crisis – Touching the Sun, Fake Spotify Artists, Banished Words
  2. TWiT 1012: Our Best Of 2024 – The Best Moments From TWiT's 2024
  3. TWiT 1011: The Year in Review – A Look at the Top Stories of 2024
  4. TWiT 1010: The Densest State in the US – TikTok Ban, Drones Over Jersey, GM Quits Robotaxis
  5. TWiT 1009: Andy Giveth & Bill Taketh Away – Trump's Tech Titans, Crypto Boom, TikTok's US Ban, Intel CEO Exits