[GRASS-QA] GRASS QA: hamish |main.c support.c | 2 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Thu Apr 23 17:51:47 EDT 2009


Hello hamish,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/imagery/i.pca/main.c
*****************************************************************

          Function
calc_covariance(Begins at: 275, Ends at:342)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      33 |    ** | BABY-MONSTER |        33 |
LOC:          |      68 |     * |      WARNING |        68 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


calc_mu(Begins at: 224, Ends at:272)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |     * |      WARNING |         9 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      20 |     * |      WARNING |        20 |
LOC:          |      49 |     * |      WARNING |        49 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 4 values are close to an outlier please consider revising code!


dump_eigen(Begins at: 530, Ends at:547)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      18 |       |           OK |        18 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


main(Begins at: 45, Ends at:176)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      57 |   *** |      MONSTER |        57 |
LOC:          |     132 |    ** | BABY-MONSTER |       132 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


round_c(Begins at: 179, Ends at:191)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      13 |       |           OK |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


write_pca(Begins at: 345, Ends at:526)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      28 |   *** |      MONSTER |        28 |
ParamNBR:     |       7 |    ** | BABY-MONSTER |         7 |
CalledNBR:    |      52 |   *** |      MONSTER |        52 |
LOC:          |     182 |   *** |      MONSTER |       182 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file has 2 potentially cloned functions:
  ele_round

In /var/project-manager/grass/grassSVN/grass/trunk/imagery/i.pca/main.c clones of round_c are:
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/ram/init_vars.c  ele_round
          /var/project-manager/grass/grassSVN/grass/trunk/raster/r.watershed/seg/init_vars.c  ele_round

*****************************************************************
          File :grass/trunk/imagery/i.pca/support.c
*****************************************************************

          Function
write_history(Begins at: 33, Ends at:69)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      12 |     * |      WARNING |        12 |
LOC:          |      37 |       |           OK |        37 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


write_support(Begins at: 10, Ends at:30)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      10 |     * |      WARNING |        10 |
LOC:          |      21 |       |           OK |        21 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


Clone analysis:
This file does not contain cloned functions

____________________________________________


Threshold grass key metrics values at Thu Apr 23 18:02:55 EDT 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