Clone detection, management and understanding are significant researches in software engineering. They have wide requirements and applications in many fields, such as software maintenance, complexity, architecture, reuse, evolution, licensing, anti-plagiarism and so on. Based on available results, the focus of research is mainly on the complexity of clone detection, the mapping of clone groups between the two successive versions, the recognition of topics in the set of lineage clone group, and the prediction of harmfulness for clones. By choosing the proper granularity and type of clones with an optimized algorithm based on suffix array to detect code clones for all source code versions of a software system, we use a technique combining Token with AST to establish the mapping relations of clone groups between adjacent versions of software, extract the clone genealogy, and use LDA model to identify topics of set of lineage clone group, get evolving information of context of clones, and use Bayes model to predict the harmful degree of clones. At last, an experimental system is obtained, which is portable, language-independent, and visual, for automatically predicting the harmfulness of code clones. The achievements will provide reference of the harmfulness of clones for software development and maintenance, reduce the cost of software upgrading and maintenance, and also support the evaluation of software quality and credibility.
克隆代码检测、管理和理解是软件工程的重要研究内容,其在软件维护、复杂性、架构、复用、进化,及软件授权、反剽窃等众多领域有广泛的需求与应用。本项目基于既有研究成果,围绕"克隆检测时空复杂度"、"连续版本间克隆群映射"、"直系克隆群集主题识别"、"克隆有害性预测"等四个核心问题深入开展具体研究。通过选取适当克隆代码粒度与类型特征,使用基于优化后缀数组的改进算法检测软件各版本中克隆代码;采用Token串与AST相结合的技术,建立克隆群的映射关系,提取对应克隆家系;利用LDA模型识别直系克隆群集主题,获取克隆代码上下文进化信息;进而运用Bayes模型预测克隆代码有害程度。最终实现一个与程序设计语言无关、可移植、可视化的克隆代码有害性自动预测实验系统。预期成果将为软件系统的开发维护提供有价值的克隆代码有害性参考,从而以更低经济成本进行升级与维护,并为评估软件质量和可信性提供有力支持。
克隆代码在软件系统中普遍存在,与软件质量、进化、复用、授权、反剽窃等众多软件工程领域内的问题有密切关系,克隆代码的检测、分析、评价和管理对软件系统具有重要意义。本项目主要从克隆检测与克隆有害性预测两个方面进行研究,针对克隆检测时空复杂度高、克隆群映射关系模糊、直系克隆群识别困难和缺乏有效的克隆代码有害性预测方法等问题,提出解决方案并实现克隆代码有害性自动预测系统。主要包括如下内容:分别提出基于优化后缀数组和基于Token编辑距离的两种克隆检测方法,降低检测的时空复杂度,扩展了检测的范围;采用主题建模技术识别直系克隆群,准确构造相邻版本克隆群映射关系;分别基于LDA和贝叶斯网络构造克隆代码有害性预测模型,运用多种特征选择方法优化了有害性特征,解决了特征的分类不平衡问题,实现了克隆代码有害性的精确预测。.除了克隆检测与有害性预测方面的研究以外,项目组还分析了开发过程中产生的Bugs数据,开展了克隆代码稳定性方面的研究,并对克隆代码质量和维护推荐也做了初步的探索。.围绕本项目研究内容,项目组成员发表论文10篇,其中国内期刊论文9篇,国际会议论文1篇,实现克隆代码有害性预测系统一个,完成了项目书中预订的各项任务。项目的完成对有克隆代码重要理论意义,对提高克隆代码检测的效率和有害克隆代码的预测与推荐等领域的应用有重要现实意义。
{{i.achievement_title}}
数据更新时间:2023-05-31
玉米叶向值的全基因组关联分析
监管的非对称性、盈余管理模式选择与证监会执法效率?
基于LASSO-SVMR模型城市生活需水量的预测
宁南山区植被恢复模式对土壤主要酶活性、微生物多样性及土壤养分的影响
针灸治疗胃食管反流病的研究进展
无定型克隆代码的检测及重构方法
面向多应用领域的程序代码克隆检测的理论、方法和实验研究
基于演化特征的代码性能分析、预测与优化方案推荐
基于免疫理论的恶意代码检测与防御方法研究