[GRASS-QA] GRASS QA: martinl |build_ogr.c build.c open.c | 5 clones | 0 monsters |3 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Fri Dec 24 10:14:26 EST 2010


Hello martinl,

here's a report on your recent grass-SVN change for the revision : 44712 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/lib/vector/Vlib/build_ogr.c
*****************************************************************

          Function
add_geometry(Begins at: 167, Ends at:329)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      20 |     * |      WARNING |        20 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |      62 |    ** | BABY-MONSTER |        62 |
LOC:          |     163 |    ** | BABY-MONSTER |       163 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


add_line(Begins at: 123, Ends at:162)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
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!


reset_parts(Begins at: 60, Ends at:63)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


add_part(Begins at: 77, Ends at:87)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      11 |       |           OK |        11 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


add_parts_to_offset(Begins at: 100, Ends at:118)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      19 |       |           OK |        19 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


free_parts(Begins at: 68, Ends at:72)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       5 |       |           OK |         5 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


del_part(Begins at: 92, Ends at:95)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 4 potentially cloned functions:
  add_line  add_part  add_parts_to_offset

In /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c clones of add_geometry are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c  add_geometry

In /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c clones of add_line are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c  add_line

In /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c clones of add_part are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c  add_part

In /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c clones of add_parts_to_offset are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build_ogr.c  add_parts_to_offset

*****************************************************************
          File :/lib/vector/Vlib/build.c
*****************************************************************

          Function
Vect_build(Begins at: 53, Ends at:56)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Vect_build_partial(Begins at: 109, Ends at:236)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      27 |    ** | BABY-MONSTER |        27 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      51 |    ** | BABY-MONSTER |        51 |
LOC:          |     128 |     * |      WARNING |       128 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file has 1 potentially cloned functions:


In /data/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build.c clones of Vect_build_partial are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build.c  Vect_build_partial

*****************************************************************
          File :/lib/vector/Vlib/open.c
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
____________________________________________


Threshold grass key metrics values at Fri Dec 24 10:14:18 EST 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |        10 |        22 |        34 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        18 |        43 |        69 |
LOC:                  |        68 |       153 |       239 |
----------------------+-----------+-----------+-----------+



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