Eblogtip.com
  • Categories
    • News
    • Technology
    • Domains
    • Hosting
    • Promotions

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • December 2022

Categories

  • News
  • Technology
  • Uncategorized
eBlogTip
  • Categories
    • News
    • Technology
    • Domains
    • Hosting
    • Promotions
  • Technology

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

  • August 3, 2023
Total
0
Shares
0
0
0

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.

 

 


Source link

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Previous Article
  • News

Microsoft Teams chats are being hijacked by Russian hackers to spy on your business

  • August 3, 2023
View Post
Next Article
  • Technology

Coinbase’s blockchain Base to launch to the public next week

  • August 3, 2023
View Post
You May Also Like
View Post
  • Technology

Tinder goes ultra-premium, Amazon invests in Anthropic and Apple explains its new AirPods

  • September 30, 2023
View Post
  • Technology

How much can artists make from generative AI? Vendors won’t say

  • September 30, 2023
View Post
  • Technology

Venture capital is opening the gates for defense tech

  • September 30, 2023
View Post
  • Technology

Humane’s ‘AI Pin’ debuts on the Paris runway

  • September 30, 2023
View Post
  • Technology

Kick streamers consider leaving over CEO’s comments in a sex worker “prank” stream

  • September 30, 2023
View Post
  • Technology

VW bails on its plan for a $2.1B EV plant in Germany

  • September 29, 2023
View Post
  • Technology

When predatory investors damage your chances of success

  • September 29, 2023
View Post
  • Technology

Pudgy Penguins’ approach may be the answer to fixing NFTs’ revenue problems

  • September 29, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

eBlogTip.com
  • Categories

Input your search keywords and press Enter.