摘要
克隆代码是软件中彼此相似的代码片段。传统观点认为克隆代码是有害的,会降低软件质量,但最近研究发现克隆代码不一定是有害的。如何评估克隆代码的有害性是一个值得研究的问题。本文提出了一种基于支持向量机的克隆代码有害性评价方法,可以以较高的准确性和查准率评价其有害性。为验证方法有效性,本文在6个系统上进行实验,结果表明本文方法可以有效地评价克隆代码的有害性,并且所提出的静态度量和演化度量对评价克隆代码有效性具有积极意义。
Code clone( also known as duplicated code) has always been a popular research field in software engineering. Traditional view is that code clone is harmful,because clone can decrease the quality of software. However,considering the clone evolution,some studies find that not all the clones are harmful. So how to evaluate the clone harmfulness is a problem. This paper proposes a method which can evaluate the clone harmfulness based on support vectors machine,and makes several experiments on six open-source software systems which were written in three kinds of programming languages. The results show that the proposed method has an applicability and higher accuracy. It is a meaningful attempt to evaluate the clone harmfulness.
出处
《智能计算机与应用》
2016年第4期112-115,118,共5页
Intelligent Computer and Applications
基金
国家自然科学基金(61173021)