SOCCER LAB GRASS QA: 1 clones ( parser.c ) 2 monsters and 4 warnings

cvs at proxy.soccerlab.polymtl.ca cvs at proxy.soccerlab.polymtl.ca
Sun Apr 16 17:10:55 EDT 2006


Hello cedric,

here a report on your recent GRASS-CVS change:

Threshold GRASS6 key metrics values at 2006-04-16 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      36 |
ParamNBR:                2 |         6 |       8 |
CalledNBR:               9 |        55 |      78 |
LOC:                    40 |       182 |     256 |
---------------------------+-----------+---------+

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

Message interpretation:
 OK : Nothing to say at all
 *  : above 75 % of value warning
 ** : this is getting close to be out of range, consider revising the code
 ***: this is a monster, definitely you should revise this function

ANALYSIS

your changes to files/functions:


./grass6/lib/gis/parser.c functions


G_disable_interactive (Begins at: 182 Ends at: 198)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_flag (Begins at: 201 Ends at: 249)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      49 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_option (Begins at: 252 Ends at: 305)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      54 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_standard_option (Begins at: 308 Ends at: 430)
--------------+---------+-------+---------+
Complexity:   |      16 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      16 |       |      OK |
LOC:          |     123 |     * |         |
--------------+---------+-------+---------+
metrics are OK

G_define_module (Begins at: 433 Ends at: 467)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      35 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_parser (Begins at: 469 Ends at: 727)
--------------+---------+-------+---------+
Complexity:   |      34 |    ** | Warning |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      56 |    ** | Warning |
LOC:          |     259 |   *** | MONSTER |
--------------+---------+-------+---------+
1 metric are OUT OF RANGE!

G_usage (Begins at: 729 Ends at: 875)
--------------+---------+-------+---------+
Complexity:   |      28 |    ** | Warning |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      37 |     * |         |
LOC:          |     147 |     * |         |
--------------+---------+-------+---------+
at least 1 values are close to an outlier please consider revising code

print_escaped_for_xml (Begins at: 877 Ends at: 893)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_usage_xml (Begins at: 895 Ends at: 1093)
--------------+---------+-------+---------+
Complexity:   |      25 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      62 |    ** | Warning |
LOC:          |     199 |    ** | Warning |
--------------+---------+-------+---------+
at least 3 values are close to an outlier please consider revising code

G_usage_html (Begins at: 1095 Ends at: 1298)
--------------+---------+-------+---------+
Complexity:   |      38 |   *** | MONSTER |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      67 |    ** | Warning |
LOC:          |     204 |    ** | Warning |
--------------+---------+-------+---------+
1 metric are OUT OF RANGE!

generate_tcl (Begins at: 1300 Ends at: 1371)
--------------+---------+-------+---------+
Complexity:   |       9 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      24 |       |      OK |
LOC:          |      72 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_gui (Begins at: 1374 Ends at: 1396)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       8 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_tcltk (Begins at: 1399 Ends at: 1414)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      16 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

show_options (Begins at: 1416 Ends at: 1445)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      10 |       |      OK |
LOC:          |      30 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

show (Begins at: 1447 Ends at: 1460)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      14 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

set_flag (Begins at: 1462 Ends at: 1489)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

contains (Begins at: 1494 Ends at: 1503)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

set_option (Begins at: 1505 Ends at: 1565)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      13 |       |      OK |
LOC:          |      61 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_opts (Begins at: 1567 Ends at: 1604)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      38 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_an_opt (Begins at: 1606 Ends at: 1648)
--------------+---------+-------+---------+
Complexity:   |      10 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      13 |       |      OK |
LOC:          |      43 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_int (Begins at: 1650 Ends at: 1716)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      67 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_double (Begins at: 1718 Ends at: 1758)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      41 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_string (Begins at: 1760 Ends at: 1787)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_required (Begins at: 1789 Ends at: 1812)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      24 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

split_opts (Begins at: 1814 Ends at: 1877)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      64 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_multiple_opts (Begins at: 1879 Ends at: 1917)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      39 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_overwrite (Begins at: 1920 Ends at: 1977)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       7 |       |      OK |
LOC:          |      58 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive (Begins at: 1979 Ends at: 2007)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      29 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive_flag (Begins at: 2009 Ends at: 2017)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive_option (Begins at: 2019 Ends at: 2109)
--------------+---------+-------+---------+
Complexity:   |      23 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      41 |     * |         |
LOC:          |      91 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

gis_prompt (Begins at: 2111 Ends at: 2177)
--------------+---------+-------+---------+
Complexity:   |      14 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      19 |       |      OK |
LOC:          |      67 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_recreate_command (Begins at: 2179 Ends at: 2279)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      25 |       |      OK |
LOC:          |     101 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 1 potentially cloned functions:
  interactive_flag

__________________________________________

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