面向开源代码复用的程序比对分析方法  被引量:2

Program Comparison Analysis Method for Open Source Code Reuse

在线阅读下载全文

作  者:许福[1] 郝亮 陈飞翔[1] 李冬梅[1] 崔晓晖[1] XU Fu;HAO Liang;CHEN Feixiang;LI Dongmei;CUI Xiaohui(School of Information Science and Technology,Beijing Forestry University,Beijing 100083,China)

机构地区:[1]北京林业大学信息学院

出  处:《计算机工程》2020年第1期222-228,242,共8页Computer Engineering

基  金:国家自然科学基金(61772078);北京市重点研发计划(D171100001817003)

摘  要:开源代码复用是重要的软件开发模式,但开源许可证侵权与代码同步更新是当前开源代码复用中的2个主要问题。利用代码快照间的高度相似性特点,设计一种代码仓库的高效增量分析方法,在此基础上,利用Simhash算法将函数代码映射成函数指纹,提出以函数为基本分析单元的工程相似度计算方法,从而降低分析结果的存储空间并提高代码比对速度。设计3组实验分别从代码分析效率、工程相似度判定和函数更新检测方面进行评估,结果表明,该方法能满足开源代码复用中相似度检测和代码溯源的需求,且能够有效缩短总体分析时间。As an important software development mode,open source code reuse suffers from two major problems:open source license infringement and synchronous update of code.So this paper designs an efficient incremental analysis method of code warehouse by utilizing the high similarities between code snapshots.On this basis,the Simhash algorithm is used to map the function code into the function fingerprint.Then,the engineering similarity calculation method that takes function as the basic analysis unit is proposed,so as to reduce the storage space of analysis results and improve the speed of code comparison.Three groups of experiments are designed to evaluate the effectiveness of the proposed method from the aspects of code analysis efficiency,engineering similarity determination and function update detection respectively.Results show that the proposed method can meet the needs of similarity detection and code traceability in open source code reuse,as well as effectively reducing the overall analysis time.

关 键 词:开源软件 代码复用 增量分析 程序比对 代码溯源 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象