[GRASS-QA] SOCCER LAB GRASS QA: 2 clones ( dbfopen.c ) 0 monsters
and 1 warnings
cvs at proxy.soccerlab.polymtl.ca
cvs at proxy.soccerlab.polymtl.ca
Sat Jun 17 16:17:05 EDT 2006
Hello markus,
here a report on your recent GRASS-CVS change:
ANALYSIS
your changes to files/functions:
lib/external/shapelib/dbfopen.c functions
cvsid_aw (Begins at: 105 Ends at: 117)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 0 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 13 | | OK |
--------------+---------+-------+---------+
metrics are OK
SfRealloc (Begins at: 119 Ends at: 135)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 2 | | OK |
LOC: | 17 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteHeader (Begins at: 137 Ends at: 187)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 51 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFFlushRecord (Begins at: 195 Ends at: 224)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 30 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFLoadRecord (Begins at: 230 Ends at: 273)
--------------+---------+-------+---------+
Complexity: | 5 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 5 | | OK |
LOC: | 44 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFUpdateHeader (Begins at: 280 Ends at: 302)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 23 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFOpen (Begins at: 311 Ends at: 450)
--------------+---------+-------+---------+
Complexity: | 11 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 37 | * | |
LOC: | 140 | * | |
--------------+---------+-------+---------+
metrics are OK
DBFClose (Begins at: 457 Ends at: 494)
--------------+---------+-------+---------+
Complexity: | 5 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 12 | | OK |
LOC: | 38 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFCreate (Begins at: 503 Ends at: 576)
--------------+---------+-------+---------+
Complexity: | 4 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 14 | | OK |
LOC: | 74 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFAddField (Begins at: 579 Ends at: 601)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 1 | | OK |
LOC: | 23 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFAddNativeFieldType (Begins at: 604 Ends at: 691)
--------------+---------+-------+---------+
Complexity: | 7 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 10 | | OK |
LOC: | 88 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadAttribute (Begins at: 699 Ends at: 780)
--------------+---------+-------+---------+
Complexity: | 10 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 5 | | OK |
LOC: | 82 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadIntegerAttribute (Begins at: 789 Ends at: 800)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 12 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadDoubleAttribute (Begins at: 809 Ends at: 820)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 12 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadStringAttribute (Begins at: 829 Ends at: 833)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadLogicalAttribute (Begins at: 842 Ends at: 854)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 13 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFIsAttributeNULL (Begins at: 857 Ends at: 899)
--------------+---------+-------+---------+
Complexity: | 10 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 43 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldCount (Begins at: 908 Ends at: 912)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetRecordCount (Begins at: 921 Ends at: 925)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldInfo (Begins at: 934 Ends at: 973)
--------------+---------+-------+---------+
Complexity: | 8 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 1 | | OK |
LOC: | 40 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteAttribute (Begins at: 981 Ends at: 1141)
--------------+---------+-------+---------+
Complexity: | 26 | ** | Warning |
ParamNBR: | 4 | | OK |
CalledNBR: | 21 | | OK |
LOC: | 161 | * | |
--------------+---------+-------+---------+
at least 1 values are close to an outlier please consider revising code
DBFWriteAttributeDirectly (Begins at: 1144 Ends at: 1203)
--------------+---------+-------+---------+
Complexity: | 7 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 60 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteDoubleAttribute (Begins at: 1212 Ends at: 1217)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteIntegerAttribute (Begins at: 1226 Ends at: 1233)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 8 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteStringAttribute (Begins at: 1242 Ends at: 1247)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteNULLAttribute (Begins at: 1256 Ends at: 1260)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteLogicalAttribute (Begins at: 1269 Ends at: 1274)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteTuple (Begins at: 1283 Ends at: 1328)
--------------+---------+-------+---------+
Complexity: | 6 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 46 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadTuple (Begins at: 1337 Ends at: 1364)
--------------+---------+-------+---------+
Complexity: | 4 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 28 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFCloneEmpty (Begins at: 1373 Ends at: 1416)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 14 | | OK |
LOC: | 44 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetNativeFieldType (Begins at: 1419 Ends at: 1426)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 8 | | OK |
--------------+---------+-------+---------+
metrics are OK
str_to_upper (Begins at: 1432 Ends at: 1450)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 19 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldIndex (Begins at: 1453 Ends at: 1480)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 28 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFIsRecordDeleted (Begins at: 1482 Ends at: 1501)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 20 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFMarkRecordDeleted (Begins at: 1507 Ends at: 1542)
--------------+---------+-------+---------+
Complexity: | 5 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 36 | | OK |
--------------+---------+-------+---------+
metrics are OK
Clone analysis:
This file has 2 potentially cloned functions:
DBFReadDoubleAttribute DBFReadIntegerAttribute
In lib/external/shapelib/dbfopen.c clones of DBFReadDoubleAttribute are:
lib/external/shapelib/dbfopen.c DBFReadIntegerAttribute
In lib/external/shapelib/dbfopen.c clones of DBFReadIntegerAttribute are:
lib/external/shapelib/dbfopen.c DBFReadDoubleAttribute
__________________________________________
Threshold GRASS6 key metrics values at 2006-06-17 are:
---------------------------+-----------+---------+
median | upper | outlier |
| quartile | limit |
---------------------------+-----------+---------+
Complexity (Cyclo): 5 | 25 | 37 |
ParamNBR: 2 | 6 | 8 |
CalledNBR: 9 | 55 | 79 |
LOC: 40 | 180 | 252 |
---------------------------+-----------+---------+
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