[GRASS-QA] GRASS QA: mmetz |do_cum.c do_cum.c | 2 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Feb 4 11:47:57 EST 2009


Hello mmetz,

here's a report on your recent GRASS-SVN change : 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/raster/r.watershed/ram/do_cum.c
*****************************************************************

          Function
do_cum(Begins at: 6, Ends at:74)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      13 |   *** |      MONSTER |        13 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      19 |   *** |      MONSTER |        19 |
LOC:          |      69 |   *** |      MONSTER |        69 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


do_cum_mfd(Begins at: 98, Ends at:371)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      44 |       |           OK |        44 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      55 |       |           OK |        55 |
LOC:          |     274 |       |           OK |       274 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


mfd_pow(Begins at: 373, Ends at:386)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |    ** | BABY-MONSTER |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |     * |      WARNING |         0 |
LOC:          |      14 |     * |      WARNING |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file has 1 potentially cloned functions:


In /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/ram/do_cum.c clones of mfd_pow are:
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/seg/do_cum.c  mfd_pow

*****************************************************************
          File :grass/trunk/raster/r.watershed/seg/do_cum.c
*****************************************************************

          Function
do_cum(Begins at: 7, Ends at:78)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      13 |   *** |      MONSTER |        13 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      20 |   *** |      MONSTER |        20 |
LOC:          |      72 |   *** |      MONSTER |        72 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


do_cum_mfd(Begins at: 102, Ends at:393)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      46 |       |           OK |        46 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      58 |       |           OK |        58 |
LOC:          |     292 |       |           OK |       292 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


mfd_pow(Begins at: 395, Ends at:408)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |    ** | BABY-MONSTER |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |     * |      WARNING |         0 |
LOC:          |      14 |     * |      WARNING |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file has 1 potentially cloned functions:


In /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/seg/do_cum.c clones of mfd_pow are:
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/ram/do_cum.c  mfd_pow

____________________________________________


Threshold grass key metrics values at Wed Feb 04 12:11:44 EST 2009 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         6 |        13 |        21 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        10 |        23 |        37 |
LOC:                  |        42 |        91 |       141 |
----------------------+-----------+-----------+-----------+



Measures (see below Web page for details) :
    -Complexity (Cyclo): a complexity index 
    -ParamNBR: number of passed parameters 
    -CalledNBR: number of called functions 
    -LOC: Lines Of Code 
    -Global analysis: based on 21 metrics(the fourth preceding include)

Message interpretation :
    OK : Nothing to say at all
    *  : this is getting close to be out of range, consider revising the code
    ** : this is a baby monster, you should revise this function
    ***: this is a monster, definitely you should revise this function

Conclusion interpretation :
    CORRECT     : if all metrics are situated before warning limits
    WARNING     : if 1 to more metrics are between warning and middle limits
    BABY_MONSTER: if 1 to more metrics are between middle and extreme limits
    MONSTERS    : if 1 to more metrics are in the extreme limits


_______________________________________________
Brought to you by :
	SOftware Cost-effective Change and Evolution Research (SOCCER) laboratory 

Please visite our web site on your project at :
    http://web.soccerlab.polymtl.ca/project-manager/grass-website/index.html


More information about the grass-qa mailing list