cccmt – Coverity code complexity metrics tool

cccmt is used to parse the METRICS.errors.xml generated by cov-analyze of Coverity to produce a Code Complexity Metrics (CCM) report of different functions. SAX is used to parse XML file instead of DOM as the XML file may be very large. Unfortunately, original METRICS.errors.xml is not well formatted. To make the parsing smoothly, we need to add <daveti> and </daveti> at the very beginning and ending in the XML file as the only root element. The other point is cccmt.jar is compiled via JDK 1.6 – may report error if it is run via JDK 1.5 and lower version.

Project Name: cccmt
Destination: Coverity Code Complexity Metrics Tool
Language: Java
IDE: NetBeans 7.1
Project Web: http://github.com/daveti/cccmt
Git Read Only: https://github.com/daveti/cccmt.git

/* Example METRICS.errors.xml */
/home/daveti/cccmt: cat abcde.xml
<daveti>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/src/BSPlinux/sharedIP.c</file>
<fnmet>task_dup_chk;4;92;63;287;64;20;35;43314.7;0.952626;;;2130</fnmet>
</fnmetric>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/src/BSPlinux/sharedIP.c</file>
<fnmet>check_ip_plumbing;4;63;46;193;70;19;23;46117.5;1.02191;;;1309</fnmet>
</fnmetric>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/src/BSPlinux/sharedIP.c</file>
<fnmet>check_ip_tentative;3;68;47;217;82;23;26;52530;1.08282;;;1565</fnmet>
</fnmetric>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/src/BSPlinux/sharedIP.c</file>
<fnmet>audit_IP_plumbing;1;14;12;30;9;6;5;471.803;0.0288859;;;1518</fnmet>
</fnmetric>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/msi/BSPlinux/sharedIP.c</file>
<fnmet>audit_IPV6_duplicate_ip;2;30;22;196;26;17;12;8491.05;0.230687;;;1799</fnmet>
</fnmetric>
<fnmetric>
<file>/home_nbu/daveti/R2608/ipm_cov_off_bsub/glob/cdma/BSPlinux/sharedIP.c</file>
<fnmet>set_shared_ip_state_up;1;26;19;102;40;19;10;11946.4;0.309893;;;339</fnmet>
</fnmetric>
<fnmetric>
<file>/usr/include/sys/stat.h</file>
<fnmet>set_shared_ip_state_up;1;26;19;102;40;19;10;11946.4;0.309893;;;339</fnmet>
</fnmetric>
</daveti>
/home/daveti/cccmt:

Unknown's avatar

About daveti

Interested in kernel hacking, compilers, machine learning and guitars.
This entry was posted in Dave's Tools, Programming, Static Code Analysis and tagged , , , , , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.