[GRASS-QA] GRASS QA: martinl |parser.c | 2 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Sep 10 12:31:21 EDT 2008


Hello martinl,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/lib/gis/parser.c
*****************************************************************

          Class
Item(Begins at: 109, Ends at:114)
             +--------+--------+--------+--------+--------+--------+
             |    DIT |    NOC |    WMC |    RFC |    CBO |   LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------+



          Function
check_an_opt(Begins at: 2201, Ends at:2243)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |   *** |      MONSTER |        10 |
ParamNBR:     |       4 |   *** |      MONSTER |         4 |
CalledNBR:    |      13 |   *** |      MONSTER |        13 |
LOC:          |      43 |   *** |      MONSTER |        43 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_double(Begins at: 2309, Ends at:2345)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |   *** |      MONSTER |        14 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       6 |   *** |      MONSTER |         6 |
LOC:          |      37 |   *** |      MONSTER |        37 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_int(Begins at: 2245, Ends at:2281)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |   *** |      MONSTER |        14 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       6 |   *** |      MONSTER |         6 |
LOC:          |      37 |   *** |      MONSTER |        37 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_multiple_opts(Begins at: 2457, Ends at:2492)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |   *** |      MONSTER |         8 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       5 |   *** |      MONSTER |         5 |
LOC:          |      36 |   *** |      MONSTER |        36 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_opts(Begins at: 2165, Ends at:2199)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |   *** |      MONSTER |         7 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       3 |   *** |      MONSTER |         3 |
LOC:          |      35 |   *** |      MONSTER |        35 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_overwrite(Begins at: 2495, Ends at:2560)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |   *** |      MONSTER |        12 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      16 |   *** |      MONSTER |        16 |
LOC:          |      66 |   *** |      MONSTER |        66 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_required(Begins at: 2373, Ends at:2395)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |   *** |      MONSTER |         4 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       2 |   *** |      MONSTER |         2 |
LOC:          |      23 |   *** |      MONSTER |        23 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


check_string(Begins at: 2347, Ends at:2371)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |   *** |      MONSTER |         9 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       6 |   *** |      MONSTER |         6 |
LOC:          |      25 |   *** |      MONSTER |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


contains(Begins at: 2083, Ends at:2091)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       0 |   *** |      MONSTER |         0 |
LOC:          |       9 |   *** |      MONSTER |         9 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


generate_tcl(Begins at: 1815, Ends at:1913)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |   *** |      MONSTER |        12 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      34 |   *** |      MONSTER |        34 |
LOC:          |      99 |   *** |      MONSTER |        99 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_define_flag(Begins at: 176, Ends at:213)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       4 |   *** |      MONSTER |         4 |
LOC:          |      38 |   *** |      MONSTER |        38 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_define_module(Begins at: 649, Ends at:662)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |   *** |      MONSTER |         1 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       0 |   *** |      MONSTER |         0 |
LOC:          |      14 |   *** |      MONSTER |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_define_option(Begins at: 232, Ends at:283)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       4 |   *** |      MONSTER |         4 |
LOC:          |      52 |   *** |      MONSTER |        52 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_define_standard_option(Begins at: 312, Ends at:640)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      38 |   *** |      MONSTER |        38 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      43 |   *** |      MONSTER |        43 |
LOC:          |     329 |   *** |      MONSTER |       329 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_disable_interactive(Begins at: 155, Ends at:160)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |   *** |      MONSTER |         1 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       0 |   *** |      MONSTER |         0 |
LOC:          |       6 |   *** |      MONSTER |         6 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_gui(Begins at: 1973, Ends at:1988)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       5 |   *** |      MONSTER |         5 |
LOC:          |      16 |   *** |      MONSTER |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_gui_tcltk(Begins at: 1918, Ends at:1947)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |   *** |      MONSTER |         6 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      12 |   *** |      MONSTER |        12 |
LOC:          |      30 |   *** |      MONSTER |        30 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_gui_wx(Begins at: 1952, Ends at:1964)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       6 |   *** |      MONSTER |         6 |
LOC:          |      13 |   *** |      MONSTER |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_parser(Begins at: 701, Ends at:955)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      41 |   *** |      MONSTER |        41 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |      83 |   *** |      MONSTER |        83 |
LOC:          |     255 |   *** |      MONSTER |       255 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_recreate_command(Begins at: 2600, Ends at:2699)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |   *** |      MONSTER |        14 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      26 |   *** |      MONSTER |        26 |
LOC:          |     100 |   *** |      MONSTER |       100 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_script(Begins at: 1696, Ends at:1808)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      24 |   *** |      MONSTER |        24 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      46 |   *** |      MONSTER |        46 |
LOC:          |     113 |   *** |      MONSTER |       113 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_tcltk(Begins at: 1993, Ends at:2001)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       2 |   *** |      MONSTER |         2 |
LOC:          |       9 |   *** |      MONSTER |         9 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_usage(Begins at: 1008, Ends at:1179)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      34 |   *** |      MONSTER |        34 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      53 |   *** |      MONSTER |        53 |
LOC:          |     172 |   *** |      MONSTER |       172 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_usage_html(Begins at: 1472, Ends at:1691)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      42 |   *** |      MONSTER |        42 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      85 |   *** |      MONSTER |        85 |
LOC:          |     220 |   *** |      MONSTER |       220 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


G_usage_xml(Begins at: 1234, Ends at:1467)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      31 |   *** |      MONSTER |        31 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      87 |   *** |      MONSTER |        87 |
LOC:          |     234 |   *** |      MONSTER |       234 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


is_option(Begins at: 2093, Ends at:2106)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |   *** |      MONSTER |         4 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       2 |   *** |      MONSTER |         2 |
LOC:          |      14 |   *** |      MONSTER |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


print_escaped_for_html(Begins at: 1213, Ends at:1227)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |   *** |      MONSTER |         4 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       5 |   *** |      MONSTER |         5 |
LOC:          |      15 |   *** |      MONSTER |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


print_escaped_for_xml(Begins at: 1189, Ends at:1206)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |   *** |      MONSTER |         7 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       4 |   *** |      MONSTER |         4 |
LOC:          |      18 |   *** |      MONSTER |        18 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


set_flag(Begins at: 2054, Ends at:2078)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |   *** |      MONSTER |         4 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       4 |   *** |      MONSTER |         4 |
LOC:          |      25 |   *** |      MONSTER |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


set_option(Begins at: 2108, Ends at:2163)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |   *** |      MONSTER |         8 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |      13 |   *** |      MONSTER |        13 |
LOC:          |      56 |   *** |      MONSTER |        56 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


show(Begins at: 2040, Ends at:2052)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |   *** |      MONSTER |         3 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |       3 |   *** |      MONSTER |         3 |
LOC:          |      13 |   *** |      MONSTER |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


show_options(Begins at: 2010, Ends at:2038)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |   *** |      MONSTER |         4 |
ParamNBR:     |       2 |   *** |      MONSTER |         2 |
CalledNBR:    |      11 |   *** |      MONSTER |        11 |
LOC:          |      29 |   *** |      MONSTER |        29 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


split_gisprompt(Begins at: 2562, Ends at:2590)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |   *** |      MONSTER |         7 |
ParamNBR:     |       4 |   *** |      MONSTER |         4 |
CalledNBR:    |       0 |   *** |      MONSTER |         0 |
LOC:          |      29 |   *** |      MONSTER |        29 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


split_opts(Begins at: 2397, Ends at:2455)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |   *** |      MONSTER |        10 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       6 |   *** |      MONSTER |         6 |
LOC:          |      59 |   *** |      MONSTER |        59 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


uses_new_gisprompt(Begins at: 958, Ends at:983)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |   *** |      MONSTER |         6 |
ParamNBR:     |       1 |   *** |      MONSTER |         1 |
CalledNBR:    |       2 |   *** |      MONSTER |         2 |
LOC:          |      26 |   *** |      MONSTER |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 2 potentially cloned functions:
  check_double

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/parser.c clones of check_double are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/parser.c  check_int

In /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/parser.c clones of check_int are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/gis/parser.c  check_double

____________________________________________


Threshold GRASS6 key metrics values at Wed Sep 10 12:37:48 EDT 2008 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         0 |         0 |         0 |
ParamNBR:             |         0 |         0 |         0 |
CalledNBR:            |         0 |         0 |         0 |
LOC:                  |         0 |         0 |         0 |
----------------------+-----------+-----------+-----------+



Please visite our web site on your project at :http://web.soccerlab.polymtl.ca/project-manager/index.html
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 
    http://web.soccerlab.polymtl.ca/grass-evolution/grass-browsers/grass-index-en.html 



More information about the grass-qa mailing list