[GRASS-QA] GRASS QA: mmetz |close.c intersect.c select.c build.c ...| 4 clones | 2 monsters |4 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Tue Jan 4 05:17:31 EST 2011


Hello mmetz,

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

ANALYSIS 

your changes to files/class/methods/functions : 

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

          Function
Vect_close(Begins at: 65, Ends at:157)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      37 |     * |      WARNING |        37 |
LOC:          |      93 |     * |      WARNING |        93 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 3 values are close to an outlier please consider revising code!


Clone analysis:
This file does not contain cloned functions

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

          Function
Vect_line_intersection(Begins at: 600, Ends at:1066)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      44 |   *** |      MONSTER |        44 |
ParamNBR:     |       7 |    ** | BABY-MONSTER |         7 |
CalledNBR:    |      48 |    ** | BABY-MONSTER |        48 |
LOC:          |     467 |   *** |      MONSTER |       467 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Vect_line_check_intersection(Begins at: 1130, Ends at:1290)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      23 |    ** | BABY-MONSTER |        23 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      19 |     * |      WARNING |        19 |
LOC:          |     161 |    ** | BABY-MONSTER |       161 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

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

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


Clone analysis:
This file does not contain cloned functions

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

          Function
Vect_save_sidx(Begins at: 517, Ends at:562)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      16 |       |           OK |        16 |
LOC:          |      46 |       |           OK |        46 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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_save_sidx are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/Vlib/build.c  Vect_save_sidx

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

          Function
Vect__open_old(Begins at: 152, Ends at:497)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      44 |   *** |      MONSTER |        44 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |     132 |   *** |      MONSTER |       132 |
LOC:          |     346 |   *** |      MONSTER |       346 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Vect_open_new(Begins at: 688, Ends at:817)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      13 |     * |      WARNING |        13 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      63 |    ** | BABY-MONSTER |        63 |
LOC:          |     130 |     * |      WARNING |       130 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Vect_open_sidx(Begins at: 1014, Ends at:1113)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      20 |     * |      WARNING |        20 |
LOC:          |     100 |     * |      WARNING |       100 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 3 values are close to an outlier please consider revising code!


Clone analysis:
This file has 3 potentially cloned functions:
  Vect_open_new  Vect_open_sidx

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

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

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

____________________________________________


Threshold grass key metrics values at Tue Jan 04 05:17:28 EST 2011 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         9 |        21 |        33 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        17 |        41 |        65 |
LOC:                  |        65 |       146 |       227 |
----------------------+-----------+-----------+-----------+



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