[GRASS-QA] GRASS QA: martinl | ./grass6/raster/r.mapcalc/expression.c |3 clones ( evaluate.c expression.c )| 0 monsters | 0 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Thu Jul 19 09:47:47 EDT 2007



Hello martinl,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


raster/r.mapcalc/expression.c functions


find_func (Begins at: 18 Ends at: 27)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

find_variable (Begins at: 29 Ends at: 36)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

allocate (Begins at: 38 Ends at: 45)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

to_int (Begins at: 49 Ends at: 69)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

to_float (Begins at: 71 Ends at: 91)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

to_double (Begins at: 93 Ends at: 113)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

is_var (Begins at: 117 Ends at: 120)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

define_variable (Begins at: 124 Ends at: 127)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

composite (Begins at: 129 Ends at: 136)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

list (Begins at: 138 Ends at: 144)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

list_length (Begins at: 146 Ends at: 152)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

singleton (Begins at: 154 Ends at: 157)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

pair (Begins at: 159 Ends at: 162)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

triple (Begins at: 164 Ends at: 167)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

constant_int (Begins at: 169 Ends at: 174)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

constant_float (Begins at: 176 Ends at: 181)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

constant_double (Begins at: 183 Ends at: 188)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

variable (Begins at: 190 Ends at: 202)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      13 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

mapname (Begins at: 204 Ends at: 219)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |       4 |       |      OK |
LOC:          |      16 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

binding (Begins at: 221 Ends at: 228)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

operator (Begins at: 230 Ends at: 295)
--------------+---------+-------+---------+
Complexity:   |      12 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      20 |       |      OK |
LOC:          |      66 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

function (Begins at: 297 Ends at: 300)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_constant (Begins at: 308 Ends at: 318)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      11 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_variable (Begins at: 320 Ends at: 323)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_map (Begins at: 325 Ends at: 357)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      33 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_function (Begins at: 359 Ends at: 393)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      35 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_operator (Begins at: 395 Ends at: 441)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      29 |       |      OK |
LOC:          |      47 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_func_op (Begins at: 443 Ends at: 448)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_binding (Begins at: 450 Ends at: 466)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_expression_prec (Begins at: 468 Ends at: 482)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       8 |       |      OK |
LOC:          |      15 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

format_expression (Begins at: 484 Ends at: 487)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 3 potentially cloned functions:
  to_double  to_float  to_int

In raster/r.mapcalc/expression.c clones of  to_double are:
	raster/r.mapcalc/expression.c  to_float
	raster/r.mapcalc/expression.c  to_int

In raster/r.mapcalc/expression.c clones of  to_int are:
	raster/r.mapcalc/expression.c  to_double
	raster/r.mapcalc/expression.c  to_float

In raster/r.mapcalc/expression.c clones of  to_float are:
	raster/r.mapcalc/expression.c  to_double
	raster/r.mapcalc/expression.c  to_int


__________________________________________

Threshold GRASS6 key metrics values at 2007-07-19 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      37 |
ParamNBR:                2 |         6 |       9 |
CalledNBR:              10 |        60 |      87 |
LOC:                    43 |       195 |     272 |
---------------------------+-----------+---------+

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


__________________________________________
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