首页> 中文期刊>计算机科学 >基于潜在语义分析的Large Class检测

基于潜在语义分析的Large Class检测

     

摘要

Large Class(上帝类)是面向对象设计中的一种设计瑕疵.为了弥补传统Large Class检测中使用面向代码结构度量的不足,提出基于潜在语义分析的平均概念相似性度量.根据源代码中提取的标识符和注释形成词-文档矩阵,在潜在语义空间下计算方法间的相似度,进而得到类的平均概念相似性;并将概念性度量与代码圈复杂度结合以对Large Class进行识别.在开源的Code Smell检测数据集Landfill上进行实验,结果表明,与传统上使用结构信息对Large Class进行检测相比,使用该方法时检测的准确率和召回率均得到了一定提升.%Large Class is a kind of object-oriented design flaws.In order to overcome the insufficience of the traditional Large Class detecting which only considers the metrics of source code structure,this paper proposesd the mean concept similarity metric based on latent semantic analysis.A term-document matrix is formed from the identifiers and comments extracted from source code firstly.The similarity between methods and the mean concept similarity of a class are computed in the space of LSA.The conceptual measure is combined with the cyclomatic complexity of the source code to identify large classes.Experiments on the open source Landfill data set show that the detection accuracy and recall rate of this method all increase comparing to the traditional approaches through structure information of Large Class testing.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号