GitHub Copilot 的新研究发现“代码质量面临下行压力”
New GitHub Copilot research finds 'downward pressure on code quality'

原始链接: https://visualstudiomagazine.com/articles/2024/01/25/copilot-research.aspx

本文讨论了人力资源解决方案提供商 Dice 进行的一项研究,该研究发现,虽然超过一半 (51%) 的软件开发团队在过去一年中采用了 GitHub Copilot 或 GitHub CoPilot Plus,但只有 27% 的团队计划继续使用这些工具 后试点阶段。 列举的原因包括对许可成本、数据隐私和安全风险的担忧(由于依赖外部服务提供商)、对与公司防火墙之外的副驾驶共享代码时潜在的知识产权所有权冲突缺乏了解,以及围绕知识产权控制、许可协议的负面体验和访问控制。 在培训活动方面,列出了多种选择,包括 VSLive! 在西雅图、奥兰多和雷德蒙德等多个城市举办研讨会; 免费网络广播; 并在线打印问题。 付费培训课程的定价信息从 2,495 美元到 5,195 美元不等,具体取决于长度、形式、地点和涵盖的内容。 该报告表明,鉴于其他技术专业人员的结果好坏参半,公司对采用 GitHub CoPilot 持谨慎态度,因为与知识产权管理相关的法律影响和成本考虑存在挑战。 文章还提到了 Stack Overflow 和 Stack Exchange 等替代平台的兴起,以及对在公司网络之外使用开源贡献的担忧。 要了解有关应用程序开发趋势和技术见解的更多信息,读者可能需要查看 TechMentor Events 和 MedCloudInsider。 此外,亚马逊和微软组织的 Docking Bay 系列活动提供了实践学习机会和交流机会。 最后,微软提供了多种出版物,从杂志和数字媒体到印刷刊物和电子通讯。 有兴趣购买重印本的读者应直接联系出版商。 列出某些资源可用的租赁选项。

本文讨论了随着人工智能 (AI) 和机器学习 (ML) 工具在软件开发过程中的使用变得越来越普遍而导致代码质量下降的现象。 分析显示,从 2015 年开始的五年间,重复源代码文件和复制粘贴函数的数量急剧增加,这表明 GitHub Copilot 和 ChatGPT 等 AI 程序会导致重复代码,导致代码质量较差。 作者建议企业专注于维护旨在增强代码可读性、可调试性和可维护性的模式,并承认法学硕士和机器学习技术无法取代高级系统架构所需的专业知识和深刻理解,从而导致费力且容易出错的手动调整 使用这些工具时。 尽管如此,作者认识到,就快速输出而言,这些人工智能和机器学习工具可以提供巨大的价值,只要它们的局限性和弱点得到充分认识和考虑。 总体而言,作者警告软件工程中盲目信任人工智能和机器学习技术可能带来的潜在危险后果,呼吁谨慎采取负责任的部署策略。
相关文章

原文

News

New GitHub Copilot Research Finds 'Downward Pressure on Code Quality'

New research on the effect of AI-powered GitHub Copilot on software development cites some adverse results.

The "Coding on Copilot" whitepaper from GitClear sought to investigate the quality and maintainability of AI-assisted code compared to what would have been written by a human. In other words: "Is it more similar to the careful, refined contributions of a Senior Developer, or more akin to the disjointed work of a short-term contractor?"

The answer to that is summarized in this paragraph from the whitepaper's abstract:

"We find disconcerting trends for maintainability. Code churn -- the percentage of lines that are reverted or updated less than two weeks after being authored -- is projected to double in 2024 compared to its 2021, pre-AI baseline. We further find that the percentage of 'added code' and 'copy/pasted code' is increasing in proportion to 'updated,' 'deleted,' and 'moved 'code. In this regard, AI-generated code resembles an itinerant contributor, prone to violate the DRY-ness [don't repeat yourself] of the repos visited."

That serves as a counterpoint to findings of some other studies, including one from GitHub in 2022 that found, for one thing: "developers who used GitHub Copilot completed the task significantly faster -- 55 percent faster than the developers who didn't use GitHub Copilot." That study was noted in the new whitepaper from GitClear, which sells a cloud-based code review tool. In addition to productivity, the GitHub study also measured positive effects in developer satisfaction and conserving mental energy.

GitClear's research, however, investigated "how the composition of code changes when AI is used." GitClear said its report sheds light on:

  • What are the three significant changes since Copilot's introduction?
  • What do Technical Leaders need to be on the lookout for 2024?
  • How can you measure the impact of AI on your team's code quality?

Regarding that first item, the paper indicated the three most significant changes associated with Copilot's rise concerned "Churn" and "Moved" and "Copy/Pasted" code:

The paper concludes: "How will Copilot transform what it means to be a developer? There's no question that, as AI has surged in popularity, we have entered an era where code lines are being added faster than ever before. The better question for 2024: who's on the hook to clean up the mess afterward?"

Some other studies on the topic include:

For its study, GitClear collected and analyzed 153 million changed lines of code, authored between January 2020 and December 2023.


About the Author

David Ramel is an editor and writer for Converge360.

联系我们 contact @ memedata.com