[GRASS-QA] GRASS QA: martinl | ./grass6/lib/gis/strings.c |2 clones ( strings.c )| 0 monsters | 0 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Mon Mar 12 06:58:52 EDT 2007



Hello martinl,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


lib/gis/strings.c functions


G_strend (Begins at: 88 Ends at: 105)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      18 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strcpy (Begins at: 107 Ends at: 129)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_chrcpy (Begins at: 131 Ends at: 155)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strncpy (Begins at: 157 Ends at: 176)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      20 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strmov (Begins at: 178 Ends at: 200)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_chrmov (Begins at: 202 Ends at: 224)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strcat (Begins at: 226 Ends at: 247)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      22 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_chrcat (Begins at: 249 Ends at: 267)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      19 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strcasecmp (Begins at: 269 Ends at: 304)
--------------+---------+-------+---------+
Complexity:   |      10 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      36 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strstr (Begins at: 306 Ends at: 340)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      35 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strdup (Begins at: 342 Ends at: 364)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strchg (Begins at: 366 Ends at: 394)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      29 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_str_replace (Begins at: 396 Ends at: 470)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       3 |       |      OK |
CalledNBR:    |      14 |       |      OK |
LOC:          |      75 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_strip (Begins at: 472 Ends at: 515)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      44 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_chop (Begins at: 517 Ends at: 549)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      33 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_str_to_upper (Begins at: 551 Ends at: 569)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      19 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_str_to_lower (Begins at: 571 Ends at: 591)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_str_to_sql (Begins at: 593 Ends at: 621)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      29 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 2 potentially cloned functions:
  G_strncpy  G_chrcpy

In lib/gis/strings.c clones of  G_chrcpy are:
	lib/gis/strings.c  G_strncpy

In lib/gis/strings.c clones of  G_strncpy are:
	lib/gis/strings.c  G_chrcpy


__________________________________________

Threshold GRASS6 key metrics values at 2007-03-12 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      37 |
ParamNBR:                2 |         6 |       9 |
CalledNBR:              10 |        60 |      86 |
LOC:                    43 |       195 |     271 |
---------------------------+-----------+---------+

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