Code Smell 检测工具调研

前一阵试用了一下AI Reviewer,但是在Windows上和linux上都没有成功...不断重新配置都成功不了就放弃了。

目前code smell的检测工具还挺多的,论文FERNANDES E, OLIVEIRA J, VALE G等. A review-based comparative study of bad smell detection tools[J]. ACM International Conference Proceeding Series, 2016, 01-03-June-2016(Dcc). DOI:10.1145/2915970.2915984.

 另一篇论文总结道LACERDA G, PETRILLO F, PIMENTA M等. Code smells and refactoring: A tertiary systematic review of challenges and observations[J]. Journal of Systems and Software, 2020, 167. DOI:10.1016/j.jss.2020.110610.:


一点额外记录:

Data Clumps: AI Reviewer (C++), inCode(C,  C++,  JAVA), Stench Blossm(JAVA, a visualization tool with no listing feature)

Shotgun Surgery: Infusion(AI Reviewer: C++), iPlasma(JAVA, C++), JcodeOdor(http://essere.disco.unimib.it/wiki/jcodeodor), Décor(JAVA), inCode(JAVA, C++, C), HIST, SCOOP

Divergent Change:HIST, Décor(JAVA), SCOOP

AI Reviewer是Infusion的商业版本,Infusion现在页面已经不存在了,AI Reviewer检测data clumps时,检测规则是至少查找 3 个不相关的函数(不属于同一方法层次结构的全局函数或方法),至少有 5 个共享形参声明(形参声明具有相同的形参名称和类型) 此缺陷的严重程度取决于受影响函数的数量和共享形式参数声明的数量。

HIST工具发表于2015年的TSE,使用关联规则挖掘,检测Shotgun Surgery(一个类中存在至少一个函数与其他类中的函数共同修改),Divergent Change(检测同一个类中经常共同修改的方法子集,应该extract class)

Moha et al., [9] propose DECOR as a method and tool for smell detection, which is based on rule cards describing symptoms characterizing smells, analyze metrics, structural relationships, lexical and structural properties.

The SonarQube “Antipatterns-CodeSmell” plugin is a code smell detection tool that integrates DECOR (Defect dEtection for CORrec- tion) ( Moha et al., 2010 ) into SonarQube, detecting the 19 code smells reported in Section 3.1 . DECOR can be applied to any object- oriented language; however, the SonarQube plugin is only configured to detect code smells in Java. Moreover, SonarQube also calculates several other static code metrics such as the number of lines of code and cyclomatic complexity, but also reports code violations.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值