[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:52:53 EST 2009


Hello mmetz,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/branches/develbranch_6/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: 613, Ends at:687)
--------------+---------+-------+--------------+-----------+
              |          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: 464, Ends at:541)
--------------+---------+-------+--------------+-----------+
              |          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:310)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |     * |      WARNING |         6 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      33 |       |           OK |        33 |
--------------+---------+-------+--------------+-----------+
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: 432, Ends at:446)
--------------+---------+-------+--------------+-----------+
              |          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: 330, Ends at:421)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |     * |      WARNING |        10 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      15 |     * |      WARNING |        15 |
LOC:          |      92 |    ** | BABY-MONSTER |        92 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


dig_isle_set_box(Begins at: 699, Ends at:713)
--------------+---------+-------+--------------+-----------+
              |          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: 557, Ends at:596)
--------------+---------+-------+--------------+-----------+
              |          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/branches/develbranch_6/lib/vector/diglib/plus_area.c clones of dig_area_set_box are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/vector/diglib/plus_area.c  dig_isle_set_box
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/vector/diglib/plus_line.c  dig_line_set_box
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/vector/diglib/plus_line.c  dig_line_get_box

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

____________________________________________


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