[GRASS-QA] GRASS QA: mmetz |plus.c struct_alloc.c | 28 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Fri Mar 27 10:30:38 EDT 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.c
*****************************************************************

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


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


dig_free_plus_isles(Begins at: 207, Ends at:232)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      26 |       |           OK |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_free_plus_lines(Begins at: 137, Ends at:166)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      30 |       |           OK |        30 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_free_plus_nodes(Begins at: 105, Ends at:130)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      26 |       |           OK |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


dig_load_plus(Begins at: 262, Ends at:327)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      15 |    ** | BABY-MONSTER |        15 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      32 |    ** | BABY-MONSTER |        32 |
LOC:          |      66 |     * |      WARNING |        66 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


dig_write_areas(Begins at: 437, Ends at:451)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_write_isles(Begins at: 462, Ends at:476)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_write_lines(Begins at: 412, Ends at:426)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_write_nodes(Begins at: 388, Ends at:401)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      14 |       |           OK |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


Clone analysis:
This file has 12 potentially cloned functions:
  dig_write_lines  dig_write_isles  dig_write_nodes  dig_write_lines  dig_write_areas  dig_write_nodes  dig_write_areas  dig_write_isles  dig_write_lines  dig_write_areas  dig_write_isles

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c clones of dig_write_areas are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_isles

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c clones of dig_write_isles are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_areas

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c clones of dig_write_lines are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_areas
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_isles

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c clones of dig_write_nodes are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_areas
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/plus.c  dig_write_isles

*****************************************************************
          File :grass/trunk/lib/vector/diglib/struct_alloc.c
*****************************************************************

          Function
dig_alloc_area(Begins at: 189, Ends at:208)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       0 |       |           OK |         0 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_areas(Begins at: 149, Ends at:163)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_cats(Begins at: 272, Ends at:296)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       6 |       |           OK |         6 |
LOC:          |      25 |       |           OK |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_isle(Begins at: 211, Ends at:226)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       0 |       |           OK |         0 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_isles(Begins at: 171, Ends at:186)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_line(Begins at: 110, Ends at:119)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       0 |       |           OK |         0 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      10 |       |           OK |        10 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_lines(Begins at: 127, Ends at:141)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_node(Begins at: 40, Ends at:54)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       0 |       |           OK |         0 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_nodes(Begins at: 93, Ends at:107)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_alloc_points(Begins at: 232, Ends at:266)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      35 |       |           OK |        35 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_area_alloc_isle(Begins at: 325, Ends at:340)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_area_alloc_line(Begins at: 303, Ends at:318)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_isle_alloc_line(Begins at: 348, Ends at:364)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_node_alloc_line(Begins at: 63, Ends at:84)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      22 |       |           OK |        22 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


dig_out_of_memory(Begins at: 369, Ends at:373)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       0 |       |           OK |         0 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       5 |       |           OK |         5 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 16 potentially cloned functions:
  dig_alloc_lines  dig_area_alloc_line  dig_alloc_node  dig_isle_alloc_line  dig_alloc_nodes  dig_alloc_areas  dig_area_alloc_line  dig_alloc_isle  dig_alloc_lines  dig_alloc_areas  dig_area_alloc_line  dig_alloc_nodes  dig_alloc_lines  dig_alloc_areas  dig_alloc_isles

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_areas are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_area_alloc_line

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_isle are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_node

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_isles are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_isle_alloc_line

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_lines are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_areas
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_area_alloc_line

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_node are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_isle

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_alloc_nodes are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_areas
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_area_alloc_line

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_area_alloc_line are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_nodes
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_lines
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_areas

In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c clones of dig_isle_alloc_line are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/struct_alloc.c  dig_alloc_isles

____________________________________________


Threshold grass key metrics values at Fri Mar 27 09:36:33 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