[GRASS-QA] GRASS QA: glynn | ./grass6/display/drivers/XDRIVER/Color_table.c |6 clones ( Color_table.c )| 0 monsters | 0 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Sun Feb 11 15:37:16 EST 2007



Hello glynn,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


display/drivers/XDRIVER/Color_table.c functions


get_shifts (Begins at: 15 Ends at: 30)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      16 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

get_rgb_shifts (Begins at: 32 Ends at: 39)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

find_color_gray (Begins at: 41 Ends at: 46)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       6 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

find_color_indexed (Begins at: 48 Ends at: 51)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

find_color_rgb (Begins at: 53 Ends at: 60)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       8 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

find_color (Begins at: 62 Ends at: 80)
--------------+---------+-------+---------+
Complexity:   |       9 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      19 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

get_max_levels (Begins at: 82 Ends at: 102)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

get_fewer_levels (Begins at: 104 Ends at: 125)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      22 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

try_get_colors (Begins at: 127 Ends at: 160)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      34 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

try_get_grays (Begins at: 162 Ends at: 189)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

ramp_colormap (Begins at: 191 Ends at: 214)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      24 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

init_color_table (Begins at: 216 Ends at: 309)
--------------+---------+-------+---------+
Complexity:   |      21 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      15 |       |      OK |
LOC:          |      94 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

XD_lookup_color (Begins at: 312 Ends at: 336)
--------------+---------+-------+---------+
Complexity:   |       9 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 6 potentially cloned functions:
  try_get_colors  get_fewer_levels  find_color_rgb  get_max_levels  ramp_colormap  get_shifts

In display/drivers/XDRIVER/Color_table.c clones of  ramp_colormap are:
	visualization/xganim/Clr_table.c  ramp_colormap

In display/drivers/XDRIVER/Color_table.c clones of  get_max_levels are:
	visualization/xganim/Clr_table.c  get_max_levels

In display/drivers/XDRIVER/Color_table.c clones of  get_fewer_levels are:
	visualization/xganim/Clr_table.c  get_fewer_levels

In display/drivers/XDRIVER/Color_table.c clones of  find_color_rgb are:
	visualization/xganim/Clr_table.c  find_color_rgb

In display/drivers/XDRIVER/Color_table.c clones of  get_shifts are:
	visualization/xganim/Clr_table.c  get_shifts

In display/drivers/XDRIVER/Color_table.c clones of  try_get_colors are:
	visualization/xganim/Clr_table.c  try_get_colors


__________________________________________

Threshold GRASS6 key metrics values at 2007-02-11 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      37 |
ParamNBR:                2 |         6 |       8 |
CalledNBR:              10 |        60 |      86 |
LOC:                    42 |       190 |     265 |
---------------------------+-----------+---------+

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