Metrics for Change Size when using diff tools
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:
The number of changed/added/removed attributes;
The number of changed/added/removed operations;
The nunmber of changed class' "extends/implements";
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).
精彩评论