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

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Sat Apr 21 16:56:31 EDT 2007



Hello glynn,

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: 19 Ends at: 27)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

write_row (Begins at: 119 Ends at: 168)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |      12 |       |      OK |
LOC:          |      50 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

init_cats (Begins at: 191 Ends at: 202)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      12 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

translate_from_colors (Begins at: 204 Ends at: 267)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       5 |     * |         |
CalledNBR:    |       2 |       |      OK |
LOC:          |      64 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

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

map_type (Begins at: 399 Ends at: 438)
--------------+---------+-------+---------+
Complexity:   |      12 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       8 |       |      OK |
LOC:          |      40 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

open_map (Begins at: 440 Ends at: 529)
--------------+---------+-------+---------+
Complexity:   |      25 |     * |         |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      14 |       |      OK |
LOC:          |      90 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

open_output_map (Begins at: 585 Ends at: 602)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      18 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

close_output_map (Begins at: 611 Ends at: 617)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

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

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

Clone analysis:

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

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_cats are:
	raster/r.mapcalc/map.c  init_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-04-21 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      37 |
ParamNBR:                2 |         6 |       9 |
CalledNBR:              10 |        60 |      87 |
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