[GRASS-QA] GRASS QA: glynn | ./grass6/lib/datetime/values.c |4 clones ( tz1.c values.c )| 0 monsters | 0 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Thu Apr 19 19:33:40 EDT 2007



Hello glynn,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


lib/datetime/values.c functions


have (Begins at: 10 Ends at: 27)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      18 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_year (Begins at: 29 Ends at: 53)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_month (Begins at: 55 Ends at: 90)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       7 |       |      OK |
LOC:          |      36 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_day (Begins at: 92 Ends at: 127)
--------------+---------+-------+---------+
Complexity:   |       7 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       9 |       |      OK |
LOC:          |      36 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_hour (Begins at: 129 Ends at: 153)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_minute (Begins at: 155 Ends at: 179)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_second (Begins at: 181 Ends at: 205)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_check_fracsec (Begins at: 207 Ends at: 225)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      19 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_year (Begins at: 227 Ends at: 249)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_year (Begins at: 251 Ends at: 275)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_month (Begins at: 277 Ends at: 299)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      23 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_month (Begins at: 301 Ends at: 325)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      25 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_day (Begins at: 327 Ends at: 354)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_day (Begins at: 356 Ends at: 376)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_hour (Begins at: 378 Ends at: 398)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_hour (Begins at: 400 Ends at: 420)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_minute (Begins at: 422 Ends at: 442)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_minute (Begins at: 444 Ends at: 464)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_second (Begins at: 466 Ends at: 486)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_second (Begins at: 488 Ends at: 508)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_get_fracsec (Begins at: 510 Ends at: 530)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      21 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

datetime_set_fracsec (Begins at: 532 Ends at: 541)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file has 4 potentially cloned functions:
  datetime_check_minute  datetime_check_hour  datetime_set_month  datetime_set_year

In lib/datetime/values.c clones of  datetime_check_minute are:
	lib/datetime/values.c  datetime_check_hour

In lib/datetime/values.c clones of  datetime_set_year are:
	lib/datetime/values.c  datetime_set_month

In lib/datetime/values.c clones of  datetime_set_month are:
	lib/datetime/values.c  datetime_set_year

In lib/datetime/values.c clones of  datetime_check_hour are:
	lib/datetime/values.c  datetime_check_minute


__________________________________________

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