[GRASS-QA] GRASS QA: hamish |main.c | 7 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Aug 26 18:01:00 EDT 2009


Hello hamish,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/db/db.select/main.c
*****************************************************************

          Function
get_stmt(Begins at: 269, Ends at:288)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


main(Begins at: 38, Ends at:91)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |     * |      WARNING |         9 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      24 |    ** | BABY-MONSTER |        24 |
LOC:          |      54 |     * |      WARNING |        54 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


parse_command_line(Begins at: 165, Ends at:266)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |     * |      WARNING |         8 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      38 |   *** |      MONSTER |        38 |
LOC:          |     102 |    ** | BABY-MONSTER |       102 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


sel(Begins at: 94, Ends at:162)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      18 |    ** | BABY-MONSTER |        18 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      25 |    ** | BABY-MONSTER |        25 |
LOC:          |      69 |     * |      WARNING |        69 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


Clone analysis:
This file has 7 potentially cloned functions:
  get_stmt  main  main  parse_command_line  sel  sel

In /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/main.c clones of get_stmt are:
          /var/project-manager/grass/grassSVN/grass/trunk/db/base/select.c  get_stmt
          /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/select.c  get_stmt

In /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/main.c clones of main are:
          /var/project-manager/grass/grassSVN/grass/trunk/db/base/select.c  main
          /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/select.c  main

In /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/main.c clones of parse_command_line are:
          /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/select.c  parse_command_line

In /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/main.c clones of sel are:
          /var/project-manager/grass/grassSVN/grass/trunk/db/base/select.c  sel
          /var/project-manager/grass/grassSVN/grass/trunk/db/db.select/select.c  sel

____________________________________________


Threshold grass key metrics values at Wed Aug 26 17:39:32 EDT 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