LiDetector:开源软件的许可证不兼容性检测
LiDetector: License Incompatibility Detection for Open Source Software
摘要:
开源软件(OSS)许可证规定了重用、分发和修改软件应遵循的条件。除了广泛使用的许可证,如MIT许可证,开发人员还可以自定义自己的许可证(称为自定义许可证),其描述更加灵活。这些不同许可证的存在给理解许可证及其兼容性带来了挑战。为了避免财务和法律风险,在集成第三方软件包或重用附带许可证的代码时,必须确保许可证兼容性。在这项工作中,我们提出了LiDetector,一个有效的工具,提取和解释OSS许可证(包括官方许可证和自定义许可证),并检测这些许可证之间的许可证不兼容。具体而言,LiDetector引入了一种基于学习的方法来自动识别有意义的许可条款从任意许可证,并采用概率上下文无关文法(PCFG)推断不兼容检测的权利和义务。实验结果表明,LiDetector的术语识别准确率为93.28%,正确和义务推理准确率为91.09%,能够有效地检测不兼容性,FP率为10.06%,FN率为2.56%.此外,使用LiDetector,我们对1,846个项目进行的大规模实证研究显示,72.91%的项目存在许可证不兼容问题,其中包括MIT许可证和Apache许可证等流行许可证。我们强调了从不同利益攸关方的角度吸取的经验教训,并公布了所有相关数据和复制包,以便利后续研究。
英文摘要:
Open-source software (OSS) licenses dictate the conditions which should be followed to reuse, distribute, and modify the software. Apart from widely-used licenses such as the MIT License, developers are also allowed to customize their own licenses (called custom licenses), whose descriptions are more flexible. The presence of such various licenses imposes challenges to understanding licenses and their compatibility. To avoid financial and legal risks, it is essential to ensure license compatibility when integrating third-party packages or reusing code accompanied with licenses. In this work, we propose LiDetector, an effective tool that extracts and interprets OSS licenses (including both official licenses and custom licenses), and detects license incompatibility among these licenses. Specifically, LiDetector introduces a learning-based method to automatically identify meaningful license terms from an arbitrary license and employs Probabilistic Context-Free Grammar (PCFG) to infer rights and obligations for incompatibility detection. Experiments demonstrate that LiDetector outperforms existing methods with 93.28% precision for term identification, and 91.09% accuracy for right and obligation inference, and can effectively detect incompatibility with a 10.06% FP rate and 2.56% FN rate. Furthermore, with LiDetector, our large-scale empirical study on 1,846 projects reveals that 72.91% of the projects are suffering from license incompatibility, including popular ones such as the MIT License and the Apache License. We highlighted lessons learned from the perspectives of different stakeholders and made all related data and the replication package publicly available to facilitate follow-up research.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。