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

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Sat Apr 14 18:31:48 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: 325)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      57 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

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

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

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

get_map_row (Begins at: 535 Ends at: 567)
--------------+---------+-------+---------+
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: 569 Ends at: 577)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

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

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

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

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

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

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

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

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

Clone analysis:

This file has 5 potentially cloned functions:
  init_cats  translate_from_colors  copy_cats  translate_from_cats  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  translate_from_colors are:
	raster/r.mapcalc/map.c  translate_from_colors


__________________________________________

Threshold GRASS6 key metrics values at 2007-04-14 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