Hi everyone,
I am working on a project which requires me to find the cyclomatic complexity of Apache ant (Versions 1.1 through 1.6). I have been asked to use the jar files for this purpose. I used a couple of tools (Xdepend trial version and Cyvis ) to have a look at the results. Then i tried to validate the results with results from the source code of Ant Ver1.6. For analyzing the source i used a Netbeans plugin and also manaully found the CC of some methods.
What i found was that in many cases the CC from the jar files was almost the same, but in some there was much discrepancy. I examined one such method and i found that it contained quite few try and catch blocks. My questions are:
- Does the java compiler carry out optimisations (like say loop unwinding) which may majorly affect the CC value? Is it advisable to use jar files for such an analysis?
- Is there some specific problem with try and catch blocks, in which case i may consider other methods for analysis?
- Are there any better (more accurate) tools for such an analysis?
Kindly share your experience on this topic. Thanks in advance.
Cheers