arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2010.14573cs.SE
收藏

JavaScript项目中的不良气味

Dependency Smells in JavaScript Projects

Abbas Javan Jafari, Diego Elias Costa, Rabe Abdalkareem, Emad Shihab, Nikolaos Tsantalis

摘要:

现代软件开发中的依赖管理为希望保持最新功能和修复同时确保向后兼容性的开发人员带来了许多挑战。项目维护人员选择了各种各样的,有时是相互冲突的方法来维护他们的依赖关系。选择不合适的方法可能会给项目带来bug和漏洞,引入破坏性的更改,导致无关的安装,并降低依赖性的可理解性,使其他人更难有效地做出贡献。在本文中,我们经验性地研究了经常性的依赖管理问题(依赖气味)的证据。我们查看了1,146个活动JavaScript存储库的数据集的提交数据,以分类,量化和理解依赖气味。通过对从业者的一系列调查,我们确定并量化了七种受欢迎程度不同的依赖气味,并调查了为什么它们会在整个项目历史中被引入。我们的研究结果表明,依赖气味在JavaScript项目中很普遍,80%的项目中出现了两种或两种以上不同的气味,但它们通常会感染项目的少数依赖项。我们的观察表明,依赖气味的数量往往会随着时间的推移而增加。实践者认为依赖气味会带来许多问题,包括安全威胁、bug、依赖破坏、运行时错误和其他维护问题。这些气味通常是在开发人员对依赖不当行为和npm生态系统的缺点做出反应时引入的。

英文摘要:

Dependency management in modern software development poses many challenges for developers who wish to stay up to date with the latest features and fixes whilst ensuring backwards compatibility. Project maintainers have opted for varied, and sometimes conflicting, approaches for maintaining their dependencies. Opting for unsuitable approaches can introduce bugs and vulnerabilities into the project, introduce breaking changes, cause extraneous installations, and reduce dependency understandability, making it harder for others to contribute effectively. In this paper, we empirically examine evidence of recurring dependency management issues (dependency smells). We look at the commit data for a dataset of 1,146 active JavaScript repositories to catalog, quantify and understand dependency smells. Through a series of surveys with practitioners, we identify and quantify seven dependency smells with varying degrees of popularity and investigate why they are introduced throughout project history. Our findings indicate that dependency smells are prevalent in JavaScript projects with two or more distinct smells appearing in 80% of the projects, but they generally infect a minority of a project's dependencies. Our observations show that the number of dependency smells tend to increase over time. Practitioners agree that dependency smells bring about many problems including security threats, bugs, dependency breakage, runtime errors, and other maintenance issues. These smells are generally introduced as developers react to dependency misbehaviour and the shortcomings of the npm ecosystem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑