不安全且未使用的代码?成熟开源项目中实用代码的历史
Unsafe and Unused? A History of Utility Code in Mature Open Source Projects
AI总结:
研究分析了七个成熟开源项目中实用代码的使用、复杂度、协作和安全性的相关性,发现实用代码可能更容易涉及漏洞,旨在帮助开发者避免创建不安全的实用代码。
摘要:
文件名是向其他开发者传达源代码信息的简洁方式。一种常见约定是util。通常理解为“实用”,带有util字母的文件名通常表明文件包含可能广泛有用或可重用的代码。一些项目大量使用此约定,例如Apache Tomcat服务器的路径名中有925个util文件,占所有源代码文件的17.9%。尽管名称的意图可能是防止重复代码并减少工作量,但随着时间的推移,util代码实际上会发生什么?项目在成熟过程中是否会远离util代码?util文件是否被同事使用,还是由其作者维护和使用?我们的目标是帮助开发者在开发项目时避免创建不安全且未使用的util文件。我们对七个具有长期开发历史的开源项目的Git仓库进行了纵向挖掘研究(Linux内核、Django、FFmpeg、httpd、Struts、systemd、Tomcat)。我们分析了这些项目中util使用、复杂度、开发者协作和安全性的潜在相关性。我们的纵向分析在每个项目的整个历史中每30天进行一次,共计1773个快照,覆盖147年的项目开发历史。我们在每个30天的快照中进行了重命名跟踪,以研究util文件在整个代码库中的整个生命周期。例如,我们发现util文件可能比非util文件多2.75倍参与漏洞。虽然每个项目都可以采用自己的命名约定,但util文件的普遍性和长期性显示了更广泛的开发者意图,这对理解软件开发的社会技术性质是有用的。
英文摘要:
Filenames are a concise means of conveying information about source code to fellow developers. One such convention is util. Commonly understood to stand for "utility", filenames with the letters util are often an indication that the file contains code that may be broadly useful or reusable. Some projects use this convention heavily, for example, the Apache Tomcat server contains 925 files with util in the path name, which is 17.9% of all source code files in the tree. While the intent of the name may be to prevent duplicate code and reduce workload, what actually happens to util code over time? Do projects move away from util code as they mature? Are util files being used by fellow colleagues, or maintained and used by their author? The goal of our work is to help developers avoid creating unsafe and unused util files when developing their projects. We conducted a longitudinal mining study of the Git repositories of seven open source projects that have a long development history (Linux kernel, Django, FFmpeg, httpd, Struts, systemd, Tomcat). We analyzed how util usage, complexity, developer collaboration, and security are potentially correlated within these projects. Our longitudinal analysis was measured at 30-day intervals throughout the entire history of each project, resulting in 1773 snapshots over 147 project-years of development. We conducted rename tracking at every 30-day snapshot to examine util files over their entire lifetime in a codebase. For example, we found that a util file can be as much as 2.75 times more likely to be involved in a vulnerability than non-util files. While every project can adopt their own naming conventions, the ubiquity and longevity of util files shows a broader developer intent that is useful for understanding the socio-technical nature of software development.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。