[GRASS-QA] GRASS QA: neteler |index.h renyi.c pielou.c | 9 clones | 6 monsters |3 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Mon Nov 29 22:35:36 EST 2010


Hello neteler,

here's a report on your recent grass-SVN change for the revision : 44428 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/raster/r.li/r.li.daemon/index.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :/raster/r.li/r.li.renyi/renyi.c
*****************************************************************

          Function
calculate(Begins at: 134, Ends at:328)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      32 |   *** |      MONSTER |        32 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      35 |     * |      WARNING |        35 |
LOC:          |     195 |    ** | BABY-MONSTER |       195 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


calculateD(Begins at: 331, Ends at:523)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      32 |   *** |      MONSTER |        32 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      35 |     * |      WARNING |        35 |
LOC:          |     193 |    ** | BABY-MONSTER |       193 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


calculateF(Begins at: 527, Ends at:726)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      32 |   *** |      MONSTER |        32 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      35 |     * |      WARNING |        35 |
LOC:          |     200 |    ** | BABY-MONSTER |       200 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


main(Begins at: 35, Ends at:88)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      24 |     * |      WARNING |        24 |
LOC:          |      54 |       |           OK |        54 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


renyi(Begins at: 90, Ends at:130)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file has 1 potentially cloned functions:


In /data/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.renyi/renyi.c clones of renyi are:
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.mps/mps.c  meanPatchSize

*****************************************************************
          File :/raster/r.li/r.li.pielou/pielou.c
*****************************************************************

          Function
calculate(Begins at: 126, Ends at:355)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      36 |   *** |      MONSTER |        36 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      36 |     * |      WARNING |        36 |
LOC:          |     230 |    ** | BABY-MONSTER |       230 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


calculateD(Begins at: 359, Ends at:584)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      35 |   *** |      MONSTER |        35 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      36 |     * |      WARNING |        36 |
LOC:          |     226 |    ** | BABY-MONSTER |       226 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


calculateF(Begins at: 587, Ends at:809)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      36 |   *** |      MONSTER |        36 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      36 |     * |      WARNING |        36 |
LOC:          |     223 |    ** | BABY-MONSTER |       223 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


cmp(Begins at: 36, Ends at:46)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      11 |       |           OK |        11 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


main(Begins at: 48, Ends at:81)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      16 |       |           OK |        16 |
LOC:          |      34 |       |           OK |        34 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


pielou(Begins at: 83, Ends at:123)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file has 8 potentially cloned functions:
  cmp_exist  cmp  cmp  srch  srch_cat  dominance  shannon

In /data/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.pielou/pielou.c clones of cmp are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/ascii.c  srch
          /data/project-manager/grass/grassSVN/grass/trunk/vector/v.distance/main.c  cmp_exist
          /data/project-manager/grass/grassSVN/grass/trunk/vector/v.extract/main.c  cmp
          /var/project-manager/grass/grassSVN/grass/trunk/vector/v.extract/main.c  cmp
          /var/project-manager/grass/grassSVN/grass/trunk/vector/v.to.3d/trans3.c  srch
          /var/project-manager/grass/grassSVN/grass/trunk/vector/v.what.rast/main.c  srch_cat

In /data/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.pielou/pielou.c clones of pielou are:
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.dominance/dominance.c  dominance
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.li/r.li.shannon/shannon.c  shannon

____________________________________________


Threshold grass key metrics values at Mon Nov 29 22:35:17 EST 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         9 |        19 |        30 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        18 |        43 |        69 |
LOC:                  |        68 |       153 |       239 |
----------------------+-----------+-----------+-----------+



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