Open-source software (OSS) is widely reused as it provides convenience and efficiency in software development. Despite evident benefits, unmanaged OSS components can introduce threats, such as vulnerability propagation and license violation. Unfortunately, however, identifying reused OSS components is a challenge as the reused OSS is predominantly modified and nested. In this paper, we propose CENTRIS, a precise and scalable approach for identifying modified OSS reuse. By segmenting an OSS code base and detecting the reuse of a unique part of the OSS only, CENTRIS is capable of precisely identifying modified OSS reuse in the presence of nested OSS components. For scalability, CENTRIS eliminates redundant code comparisons and accelerates the search using hash functions. When we applied CENTRIS on 10,241 widely-employed GitHub projects, comprising 229,326 versions and 80 billion lines of code, we observed that modified OSS reuse is a norm in software development, occurring 20 times more frequently than exact reuse. Nonetheless, CENTRIS identified reused OSS components with 91% precision and 94% recall in less than a minute per application on average, whereas a recent clone detection technique, which does not take into account modified and nested OSS reuse, hardly reached 10% precision and 40% recall.
翻译:开放源码软件(OSS)被广泛重新利用,因为它为软件开发提供了方便和效率。尽管有明显的好处,但未经管理的OSS组件可能带来威胁,如脆弱性传播和违反许可证规定等。但不幸的是,确定再利用的OSS组件是一个挑战,因为再利用的OSS主要是改造和嵌套。在本文件中,我们提议CENTRIS, 一种精确和可扩缩的方法,用以识别经修改的OSS再利用,因为它为软件开发提供了方便和效率。通过分割开放源码软件代码库,并探测只有开放源码软件独特部分的再利用,CENTRIS能够精确地识别经修改的OSS再利用,但对于可扩展性而言,CENTRIS消除了多余的代码比较,并加快了使用Hash功能的搜索。当我们在10,241个被广泛雇用的GitHub项目(由229,326版本和800亿行代码组成)上,我们发现,经修改的OSS再利用是软件开发的规范,比精确度高出20倍。然而,CENRIS发现再利用的开放源码软件组件的精确度为91%和94%,每分钟回回回回回回回回回回回回回时间不到一分钟,在平均40 %。