[GRASS-QA] GRASS QA: glynn |put_cellhd.c quant_rw.c range.c | 4 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Thu Apr 30 12:51:57 EDT 2009


Hello glynn,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/lib/gis/put_cellhd.c
*****************************************************************

          Function
G_put_cellhd(Begins at: 19, Ends at:35)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       6 |       |           OK |         6 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/lib/gis/quant_rw.c
*****************************************************************

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


G_quantize_fp_map_range(Begins at: 159, Ends at:176)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      18 |       |           OK |        18 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


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


G_truncate_fp_map(Begins at: 64, Ends at:79)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G_write_quant(Begins at: 198, Ends at:221)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      24 |       |           OK |        24 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/lib/gis/range.c
*****************************************************************

          Function
G__remove_fp_range(Begins at: 95, Ends at:100)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       6 |       |           OK |         6 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G__row_update_range(Begins at: 498, Ends at:520)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      23 |       |           OK |        23 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


G_construct_default_range(Begins at: 112, Ends at:118)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |     * |      WARNING |         1 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |       7 |       |           OK |         7 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


G_get_fp_range_min_max(Begins at: 667, Ends at:687)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       3 |       |           OK |         3 |
CalledNBR:    |       6 |       |           OK |         6 |
LOC:          |      21 |       |           OK |        21 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G_get_range_min_max(Begins at: 608, Ends at:627)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       3 |       |           OK |         3 |
CalledNBR:    |       6 |       |           OK |         6 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G_init_fp_range(Begins at: 642, Ends at:649)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |     * |      WARNING |         1 |
ParamNBR:     |       1 |     * |      WARNING |         1 |
CalledNBR:    |       2 |     * |      WARNING |         2 |
LOC:          |       8 |     * |      WARNING |         8 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 4 values are close to an outlier please consider revising code!


G_init_range(Begins at: 579, Ends at:586)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |    ** | BABY-MONSTER |         1 |
ParamNBR:     |       1 |     * |      WARNING |         1 |
CalledNBR:    |       2 |    ** | BABY-MONSTER |         2 |
LOC:          |       8 |     * |      WARNING |         8 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


G_read_fp_range(Begins at: 139, Ends at:195)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |     * |      WARNING |         9 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      18 |       |           OK |        18 |
LOC:          |      57 |       |           OK |        57 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


G_read_range(Begins at: 226, Ends at:311)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      15 |       |           OK |        15 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      23 |       |           OK |        23 |
LOC:          |      86 |       |           OK |        86 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


G_row_update_fp_range(Begins at: 524, Ends at:562)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |       |           OK |        10 |
ParamNBR:     |       4 |       |           OK |         4 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      39 |       |           OK |        39 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G_row_update_range(Begins at: 489, Ends at:494)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       3 |       |           OK |         3 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       6 |       |           OK |         6 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


G_update_fp_range(Begins at: 456, Ends at:471)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       1 |     * |      WARNING |         1 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


G_update_range(Begins at: 436, Ends at:452)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       1 |     * |      WARNING |         1 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


G_write_fp_range(Begins at: 380, Ends at:416)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      13 |       |           OK |        13 |
LOC:          |      37 |       |           OK |        37 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


Clone analysis:
This file has 4 potentially cloned functions:
  G_get_fp_range_min_max  G_update_range  G_update_fp_range

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c clones of G_get_fp_range_min_max are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c  G_get_range_min_max

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c clones of G_get_range_min_max are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c  G_get_fp_range_min_max

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c clones of G_update_fp_range are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c  G_update_range

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c clones of G_update_range are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/range.c  G_update_fp_range

____________________________________________


Threshold grass key metrics values at Thu Apr 30 13:04:32 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