机构地区: 北京信息科技大学计算机学院
出 处: 《北京信息科技大学学报(自然科学版)》 2009年第3期44-49,共6页
摘 要: 针对Kontogiannis重复代码度量方法不能区分IF条件语句与循环语句的控制流复杂性,且未对两个比较函数的返回类型进行判断时而产生错误匹配的问题,通过引入两个新的度量变量对其进行改进,结果表明,改进的度量公式能提高重复代码检测的准确性并减少匹配错误,为自动重构定位提供更有效的技术。 Aiming at false matches of Kontogiannis metrics for the duplicated code produced on account of two reasons, the first of which is that the complexity of the control flow between if statement and loops statement cannot be distinguished by the metrics, the second is that this technique doesn' t make judgement of the types of the returns of the two compared methods, Kontogiannis metrics is improved by introducing two new variables so that the accuracy of detecting the duplicated code is improved and the false matches are reduced, which provides more effective technology for the localization of automatic refactoring.
领 域: [自动化与计算机技术] [自动化与计算机技术]