首页> 外文会议>IEEE/ACM International Conference on Mining Software Repositories >Prevalence of Confusing Code in Software Projects: Atoms of Confusion in the Wild
【24h】

Prevalence of Confusing Code in Software Projects: Atoms of Confusion in the Wild

机译:软件项目中混乱代码的普遍性:混乱中的原子

获取原文

摘要

Prior work has shown that extremely small code patterns, such as the conditional operator and implicit type conversion, can cause considerable misunderstanding in programmers. Until now, the real world impact of these patterns - known as 'atoms of confusion' - was only speculative. This work uses a corpus of 14 of the most popular and influential open source C and C++ projects to measure the prevalence and significance of these small confusing patterns. Our results show that the 15 known types of confusing micro patterns occur millions of times in programs like the Linux kernel and GCC, appearing on average once every 23 lines. We show there is a strong correlation between these confusing patterns and bug-ix commits as well as a tendency for confusing patterns to be commented. We also explore patterns at the project level showing the rate of security vulnerabilities is higher in projects with more atoms. Finally, we examine real code examples containing these atoms, including ones that were used to ind and ix bugs in our corpus. In total this work demonstrates that beyond simple misunderstanding in the lab setting, atoms of confusion are both prevalent - occurring often in real projects, and meaningful - being removed by bug-fix commits at an elevated rate.
机译:先前的工作表明,极小的代码模式(例如条件运算符和隐式类型转换)会在程序员中引起相当大的误解。直到现在,这些模式对现实世界的影响(称为“混乱原子”)只是推测性的。这项工作使用了14个最受欢迎和最有影响力的开源C和C ++项目的语料库来衡量这些小小的混乱模式的普遍性和重要性。我们的结果表明,15种已知类型的令人困惑的微模式在Linux内核和GCC之类的程序中发生了数百万次,平均每23行出现一次。我们证明了这些令人迷惑的模式与bug-ix提交之间有着很强的相关性,并且有一种令人迷惑的模式被评论的趋势。我们还探索了项目级别的模式,这些模式显示出在原子更多的项目中安全漏洞的发生率更高。最后,我们检查包含这些原子的真实代码示例,包括用于我们语料库中的ind和ix bug的示例。总的来说,这项工作表明,除了在实验室环境中的简单误解之外,混乱的原子还很普遍-经常在实际项目中发生,并且有意义-被错误修复提交以更高的速率消除。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号