[GRASS-QA] GRASS QA: hamish | ./grass6/lib/display/draw2.c |11 clones ( draw2.c )| 0 monsters | 1 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Thu Jun 14 06:42:23 EDT 2007



Hello hamish,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


lib/display/draw2.c functions


alloc_int (Begins at: 79 Ends at: 88)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

alloc_float (Begins at: 90 Ends at: 99)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

dealloc_float (Begins at: 101 Ends at: 116)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      16 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

do_convert (Begins at: 118 Ends at: 129)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      12 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

dist_plane (Begins at: 131 Ends at: 134)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interpolate (Begins at: 136 Ends at: 139)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

clip_plane (Begins at: 141 Ends at: 173)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      33 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

do_clip (Begins at: 175 Ends at: 198)
--------------+---------+-------+---------+
Complexity:   |       9 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      24 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

shift_count (Begins at: 200 Ends at: 203)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

shift_angle (Begins at: 205 Ends at: 208)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       4 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

coerce (Begins at: 210 Ends at: 216)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

euclidify (Begins at: 218 Ends at: 248)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      31 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

do_ll_wrap (Begins at: 250 Ends at: 281)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       7 |    ** | Warning |
CalledNBR:    |       5 |       |      OK |
LOC:          |      32 |       |      OK |
--------------+---------+-------+---------+
at least 1 values are close to an outlier please consider revising code

D_set_clip (Begins at: 283 Ends at: 311)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      29 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_set_clip_margin (Begins at: 313 Ends at: 326)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      14 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_clip_to_map (Begins at: 328 Ends at: 347)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      20 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_move_clip (Begins at: 349 Ends at: 368)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      20 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

line_clip (Begins at: 370 Ends at: 395)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      26 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

line_clip_ll (Begins at: 397 Ends at: 419)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_cont_clip (Begins at: 421 Ends at: 437)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polydots_clip (Begins at: 439 Ends at: 470)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      32 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

cull_polyline_plane (Begins at: 472 Ends at: 517)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      46 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

polyline_cull (Begins at: 519 Ends at: 546)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polyline_cull (Begins at: 548 Ends at: 560)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      13 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

polyline_clip (Begins at: 562 Ends at: 568)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polyline_clip (Begins at: 570 Ends at: 582)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      13 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

cull_polygon_plane (Begins at: 584 Ends at: 629)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      46 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

polygon_cull (Begins at: 631 Ends at: 658)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polygon_cull (Begins at: 660 Ends at: 669)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

clip_polygon_plane (Begins at: 671 Ends at: 711)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      41 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

polygon_clip (Begins at: 713 Ends at: 740)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polygon_clip (Begins at: 742 Ends at: 751)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

box_clip (Begins at: 753 Ends at: 769)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

box_clip_ll (Begins at: 771 Ends at: 784)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      14 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_box_clip (Begins at: 786 Ends at: 795)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_move (Begins at: 797 Ends at: 803)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_cont (Begins at: 805 Ends at: 811)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |       7 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polydots (Begins at: 813 Ends at: 817)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       5 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polyline (Begins at: 819 Ends at: 823)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       5 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_polygon (Begins at: 825 Ends at: 829)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |       5 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_box (Begins at: 831 Ends at: 843)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      13 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

D_line_width (Begins at: 845 Ends at: 863)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      19 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 11 potentially cloned functions:
  D_polyline_clip  D_polyline_cull  cull_polygon_plane  cull_polyline_plane  polygon_clip  polygon_cull  polyline_cull  D_polygon_clip  D_polygon_cull  D_cont  D_move

In lib/display/draw2.c clones of  D_polyline_cull are:
	lib/display/draw2.c  D_polyline_clip

In lib/display/draw2.c clones of  D_polyline_clip are:
	lib/display/draw2.c  D_polyline_cull

In lib/display/draw2.c clones of  D_move are:
	lib/display/draw2.c  D_cont

In lib/display/draw2.c clones of  D_cont are:
	lib/display/draw2.c  D_move

In lib/display/draw2.c clones of  polygon_cull are:
	lib/display/draw2.c  polygon_clip
	lib/display/draw2.c  polyline_cull

In lib/display/draw2.c clones of  D_polygon_clip are:
	lib/display/draw2.c  D_polygon_cull

In lib/display/draw2.c clones of  cull_polygon_plane are:
	lib/display/draw2.c  cull_polyline_plane

In lib/display/draw2.c clones of  cull_polyline_plane are:
	lib/display/draw2.c  cull_polygon_plane

In lib/display/draw2.c clones of  D_polygon_cull are:
	lib/display/draw2.c  D_polygon_clip

In lib/display/draw2.c clones of  polygon_clip are:
	lib/display/draw2.c  polygon_cull
	lib/display/draw2.c  polyline_cull

In lib/display/draw2.c clones of  polyline_cull are:
	lib/display/draw2.c  polygon_clip
	lib/display/draw2.c  polygon_cull


__________________________________________

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