使用差异工具时更改大小的指标 [英] Metrics for Change Size when using diff tools

查看:97
本文介绍了使用差异工具时更改大小的指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道任何比较工具,这些工具会为更改大小"计算一些指标.我正在寻找一个使用diff输出并报告类似以下内容的差异工具:

  1. 已更改/添加/已删除属性的数量;

  2. 已更改/添加/删除的操作数;

  3. 已更改类的扩展/实现"的数字;

  4. 更改的班级名称/包裹的数量

    ...

它当然应该是AST diff工具.一个简单的基于文本的差异工具将无法做到这一点.

该报告对于设计人员提供在两个版本的代码之间进行更改的维度非常有用.

解决方案

请参阅我们的 SD智能差异器,它计算基于AST的(树)差异,并报告在语法标记(终端和非终端)以及对其应用的操作(插入,删除,移动,复制,重命名标识符内部)方面所做的更改. /p>

它没有直接提供您想要的统计信息,但是您可以使用已识别的语法标记根据上面的类别对更改进行分类(您需要使用语法来完成;请使用Java参考手册中的语法) ).

Does anybody know any diff tool which counts some metrics for "Change Size". I'm searching for a diff tool that uses the diff output and reports something like:

  1. The number of changed/added/removed attributes;

  2. The number of changed/added/removed operations;

  3. The nunmber of changed class' "extends/implements";

  4. The nunmber of changed class' name/package

    ...

It should be, of course, an AST diff tool. A simple text-based diff tool won't be able to do that.

This report would be interesting to give the designer the dimension of a change between two versions of the code.

解决方案

See our SD Smart Differencer, which computes an AST-based (tree) difference and reports the changes made in terms of grammar tokens (terminals and nonterminals) and the actions applied to them (insert, delete, move, copy, rename-identifier-within).

It doesn't provide the statistics you want directly, but you could use the identified grammar tokens to classify the changes according to your categories above (you'd need the grammar to do that; use the one in the Java reference manual).

这篇关于使用差异工具时更改大小的指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆