[GRASS-QA] GRASS QA: carlos | ./grass6/raster/r.mapcalc/map.c |5 clones ( map3.c map.c )| 0 monsters | 1 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Wed Nov 28 13:37:02 EST 2007



Hello carlos,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


raster/r.mapcalc/map.c functions


setup_region (Begins at: 20 Ends at: 27)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

compare_ints (Begins at: 66 Ends at: 69)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

init_colors (Begins at: 71 Ends at: 83)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       7 |       |      OK |
LOC:          |      13 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

init_cats (Begins at: 85 Ends at: 96)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      12 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

translate_from_colors (Begins at: 98 Ends at: 161)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |       3 |       |      OK |
LOC:          |      64 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

translate_from_cats (Begins at: 163 Ends at: 223)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      61 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

set_read_row_type (Begins at: 225 Ends at: 228)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

read_row (Begins at: 230 Ends at: 236)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

setup_map (Begins at: 238 Ends at: 254)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

read_map (Begins at: 256 Ends at: 304)
--------------+---------+-------+---------+
Complexity:   |      10 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |      13 |       |      OK |
LOC:          |      49 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

close_map (Begins at: 306 Ends at: 333)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       7 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

map_type (Begins at: 337 Ends at: 363)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      27 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

open_map (Begins at: 365 Ends at: 450)
--------------+---------+-------+---------+
Complexity:   |      25 |     * |         |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      15 |       |      OK |
LOC:          |      86 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

setup_maps (Begins at: 452 Ends at: 458)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

get_map_row (Begins at: 460 Ends at: 493)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       7 |    ** | Warning |
CalledNBR:    |       9 |       |      OK |
LOC:          |      34 |       |      OK |
--------------+---------+-------+---------+
at least 1 values are close to an outlier please consider revising code

close_maps (Begins at: 495 Ends at: 503)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

open_output_map (Begins at: 507 Ends at: 516)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

put_map_row (Begins at: 518 Ends at: 522)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       5 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

close_output_map (Begins at: 524 Ends at: 528)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       5 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

unopen_output_map (Begins at: 530 Ends at: 533)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

copy_cats (Begins at: 537 Ends at: 547)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      11 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

copy_colors (Begins at: 549 Ends at: 559)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      11 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

copy_history (Begins at: 561 Ends at: 570)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

create_history (Begins at: 572 Ends at: 615)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      44 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 5 potentially cloned functions:
  translate_from_colors  init_colors  translate_from_cats  copy_cats  copy_colors

In raster/r.mapcalc/map.c clones of  copy_cats are:
	raster/r.mapcalc/map3.c  copy_cats

In raster/r.mapcalc/map.c clones of  translate_from_cats are:
	raster/r.mapcalc/map3.c  translate_from_cats

In raster/r.mapcalc/map.c clones of  init_colors are:
	raster/r.mapcalc/map3.c  init_colors

In raster/r.mapcalc/map.c clones of  copy_colors are:
	raster/r.mapcalc/map3.c  copy_colors

In raster/r.mapcalc/map.c clones of  translate_from_colors are:
	raster/r.mapcalc/map3.c  translate_from_colors


__________________________________________

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

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