[GRASS-QA] GRASS QA: mmetz |plus_area.c | 6 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Mar 4 10:50:26 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/lib/vector/diglib/plus_area.c
*****************************************************************

          Function
dig_add_area(Begins at: 161, Ends at:230)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      11 |     * |      WARNING |        11 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      20 |     * |      WARNING |        20 |
LOC:          |      70 |     * |      WARNING |        70 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 4 values are close to an outlier please consider revising code!


dig_add_isle(Begins at: 610, Ends at:684)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      11 |     * |      WARNING |        11 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      18 |     * |      WARNING |        18 |
LOC:          |      75 |     * |      WARNING |        75 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 4 values are close to an outlier please consider revising code!


dig_angle_next_line(Begins at: 461, Ends at:538)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |    ** | BABY-MONSTER |        14 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      11 |     * |      WARNING |        11 |
LOC:          |      78 |     * |      WARNING |        78 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


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


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


dig_build_area_with_line(Begins at: 48, Ends at:145)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      15 |    ** | BABY-MONSTER |        15 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      19 |     * |      WARNING |        19 |
LOC:          |      98 |    ** | BABY-MONSTER |        98 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


dig_del_isle(Begins at: 722, Ends at:762)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |     * |      WARNING |         6 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


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


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


Clone analysis:
This file has 6 potentially cloned functions:
  dig_line_set_box  dig_line_get_box  dig_area_set_box  dig_line_set_box  dig_line_get_box

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_area.c clones of dig_area_set_box are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_area.c  dig_isle_set_box
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_line.c  dig_line_set_box
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_line.c  dig_line_get_box

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_area.c clones of dig_isle_set_box are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_area.c  dig_area_set_box
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_line.c  dig_line_set_box
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus_line.c  dig_line_get_box

____________________________________________


Threshold grass key metrics values at Wed Mar 04 10:55:46 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