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

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



Hello martinl,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


raster/r.mapcalc/map3.c functions


setup_region (Begins at: 20 Ends at: 28)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

handle_to_fd (Begins at: 62 Ends at: 65)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

fd_to_handle (Begins at: 67 Ends at: 70)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

read_row (Begins at: 72 Ends at: 118)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |       9 |       |      OK |
LOC:          |      47 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

write_row (Begins at: 120 Ends at: 169)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |      14 |       |      OK |
LOC:          |      50 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

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

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

setup_map (Begins at: 332 Ends at: 334)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       3 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

read_map (Begins at: 336 Ends at: 373)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       6 |     * |         |
CalledNBR:    |       7 |       |      OK |
LOC:          |      38 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

close_map (Begins at: 375 Ends at: 396)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      22 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

map_type (Begins at: 400 Ends at: 439)
--------------+---------+-------+---------+
Complexity:   |      12 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      40 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

open_map (Begins at: 441 Ends at: 530)
--------------+---------+-------+---------+
Complexity:   |      25 |     * |         |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      16 |       |      OK |
LOC:          |      90 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

open_output_map (Begins at: 586 Ends at: 603)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      18 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

put_map_row (Begins at: 605 Ends at: 610)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

close_output_map (Begins at: 612 Ends at: 618)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

copy_history (Begins at: 651 Ends at: 653)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       3 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

create_history (Begins at: 655 Ends at: 657)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       3 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

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

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

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

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

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

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

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


__________________________________________

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