[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 09:04:45 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: 96 Ends at: 108)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 0 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 13 | | OK |
--------------+---------+-------+---------+
metrics are OK
SfRealloc (Begins at: 110 Ends at: 126)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 2 | | OK |
LOC: | 17 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteHeader (Begins at: 128 Ends at: 178)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 51 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFFlushRecord (Begins at: 186 Ends at: 215)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 30 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFLoadRecord (Begins at: 221 Ends at: 264)
--------------+---------+-------+---------+
Complexity: | 5 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 5 | | OK |
LOC: | 44 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFUpdateHeader (Begins at: 271 Ends at: 293)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 23 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFOpen (Begins at: 302 Ends at: 439)
--------------+---------+-------+---------+
Complexity: | 11 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 37 | * | |
LOC: | 138 | * | |
--------------+---------+-------+---------+
metrics are OK
DBFClose (Begins at: 446 Ends at: 483)
--------------+---------+-------+---------+
Complexity: | 5 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 12 | | OK |
LOC: | 38 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFCreate (Begins at: 492 Ends at: 565)
--------------+---------+-------+---------+
Complexity: | 4 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 14 | | OK |
LOC: | 74 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFAddField (Begins at: 568 Ends at: 590)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 1 | | OK |
LOC: | 23 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFAddNativeFieldType (Begins at: 593 Ends at: 677)
--------------+---------+-------+---------+
Complexity: | 6 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 10 | | OK |
LOC: | 85 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadAttribute (Begins at: 685 Ends at: 766)
--------------+---------+-------+---------+
Complexity: | 10 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 5 | | OK |
LOC: | 82 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadIntegerAttribute (Begins at: 775 Ends at: 786)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 12 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadDoubleAttribute (Begins at: 795 Ends at: 806)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 12 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadStringAttribute (Begins at: 815 Ends at: 819)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadLogicalAttribute (Begins at: 828 Ends at: 840)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 13 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFIsAttributeNULL (Begins at: 843 Ends at: 885)
--------------+---------+-------+---------+
Complexity: | 10 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 43 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldCount (Begins at: 894 Ends at: 898)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetRecordCount (Begins at: 907 Ends at: 911)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldInfo (Begins at: 920 Ends at: 959)
--------------+---------+-------+---------+
Complexity: | 8 | | OK |
ParamNBR: | 5 | * | |
CalledNBR: | 1 | | OK |
LOC: | 40 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteAttribute (Begins at: 967 Ends at: 1127)
--------------+---------+-------+---------+
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: 1130 Ends at: 1189)
--------------+---------+-------+---------+
Complexity: | 7 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 60 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteDoubleAttribute (Begins at: 1198 Ends at: 1203)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteIntegerAttribute (Begins at: 1212 Ends at: 1219)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 8 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteStringAttribute (Begins at: 1228 Ends at: 1233)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteNULLAttribute (Begins at: 1242 Ends at: 1246)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 5 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteLogicalAttribute (Begins at: 1255 Ends at: 1260)
--------------+---------+-------+---------+
Complexity: | 1 | | OK |
ParamNBR: | 4 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 6 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFWriteTuple (Begins at: 1269 Ends at: 1314)
--------------+---------+-------+---------+
Complexity: | 6 | | OK |
ParamNBR: | 3 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 46 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFReadTuple (Begins at: 1323 Ends at: 1350)
--------------+---------+-------+---------+
Complexity: | 4 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 3 | | OK |
LOC: | 28 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFCloneEmpty (Begins at: 1359 Ends at: 1402)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 14 | | OK |
LOC: | 44 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetNativeFieldType (Begins at: 1405 Ends at: 1412)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 0 | | OK |
LOC: | 8 | | OK |
--------------+---------+-------+---------+
metrics are OK
str_to_upper (Begins at: 1418 Ends at: 1436)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 1 | | OK |
CalledNBR: | 4 | | OK |
LOC: | 19 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFGetFieldIndex (Begins at: 1439 Ends at: 1466)
--------------+---------+-------+---------+
Complexity: | 2 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 7 | | OK |
LOC: | 28 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFIsRecordDeleted (Begins at: 1468 Ends at: 1487)
--------------+---------+-------+---------+
Complexity: | 3 | | OK |
ParamNBR: | 2 | | OK |
CalledNBR: | 1 | | OK |
LOC: | 20 | | OK |
--------------+---------+-------+---------+
metrics are OK
DBFMarkRecordDeleted (Begins at: 1493 Ends at: 1528)
--------------+---------+-------+---------+
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