[GRASS-QA] GRASS QA: mmetz |portable.c | 10 clones | 0 monsters |0
warnings
soccerlab.info at gmail.com
soccerlab.info at gmail.com
Thu Jun 4 20:21:53 EDT 2009
Hello mmetz,
here's a report on your recent GRASS-SVN change :
ANALYSIS
your changes to files/class/methods/functions :
*****************************************************************
File :grass/trunk/lib/vector/diglib/portable.c
*****************************************************************
Function
buf_alloc(Begins at: 47, Ends at:61)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 3 | | OK | 3 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 2 | | OK | 2 |
LOC: | 15 | | OK | 15 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
dig__byte_order_out(Begins at: 652, Ends at:658)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 2 | | OK | 2 |
ParamNBR: | 0 | | OK | 0 |
CalledNBR: | 0 | | OK | 0 |
LOC: | 7 | | OK | 7 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
dig__fread_port_C(Begins at: 353, Ends at:361)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 2 | | OK | 2 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 1 | | OK | 1 |
LOC: | 9 | | OK | 9 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 1 values are close to an outlier please consider revising code!
dig__fread_port_D(Begins at: 75, Ends at:103)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 6 | * | WARNING | 6 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 3 | | OK | 3 |
LOC: | 29 | | OK | 29 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 2 values are close to an outlier please consider revising code!
dig__fread_port_F(Begins at: 106, Ends at:134)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 6 | * | WARNING | 6 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 3 | | OK | 3 |
LOC: | 29 | | OK | 29 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 2 values are close to an outlier please consider revising code!
dig__fread_port_I(Begins at: 209, Ends at:278)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 16 | ** | BABY-MONSTER | 16 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 14 | * | WARNING | 14 |
LOC: | 70 | * | WARNING | 70 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a BABY-MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
dig__fread_port_L(Begins at: 137, Ends at:206)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 16 | ** | BABY-MONSTER | 16 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 14 | * | WARNING | 14 |
LOC: | 70 | * | WARNING | 70 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a BABY-MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
dig__fread_port_P(Begins at: 365, Ends at:372)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 1 | | OK | 1 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 1 | | OK | 1 |
LOC: | 8 | | OK | 8 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 1 values are close to an outlier please consider revising code!
dig__fread_port_S(Begins at: 281, Ends at:350)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 17 | ** | BABY-MONSTER | 17 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 14 | * | WARNING | 14 |
LOC: | 70 | * | WARNING | 70 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a BABY-MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
dig__fwrite_port_C(Begins at: 564, Ends at:571)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 2 | | OK | 2 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 1 | | OK | 1 |
LOC: | 8 | | OK | 8 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 1 values are close to an outlier please consider revising code!
dig__fwrite_port_D(Begins at: 376, Ends at:400)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 6 | * | WARNING | 6 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 3 | | OK | 3 |
LOC: | 25 | | OK | 25 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 2 values are close to an outlier please consider revising code!
dig__fwrite_port_F(Begins at: 402, Ends at:426)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 6 | * | WARNING | 6 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 3 | | OK | 3 |
LOC: | 25 | | OK | 25 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 2 values are close to an outlier please consider revising code!
dig__fwrite_port_I(Begins at: 471, Ends at:512)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 10 | * | WARNING | 10 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 6 | | OK | 6 |
LOC: | 42 | * | WARNING | 42 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 3 values are close to an outlier please consider revising code!
dig__fwrite_port_L(Begins at: 428, Ends at:469)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 10 | * | WARNING | 10 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 6 | | OK | 6 |
LOC: | 42 | * | WARNING | 42 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 3 values are close to an outlier please consider revising code!
dig__fwrite_port_P(Begins at: 558, Ends at:562)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 1 | | OK | 1 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 1 | | OK | 1 |
LOC: | 5 | | OK | 5 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 1 values are close to an outlier please consider revising code!
dig__fwrite_port_S(Begins at: 514, Ends at:555)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 10 | * | WARNING | 10 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 6 | | OK | 6 |
LOC: | 42 | * | WARNING | 42 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 3 values are close to an outlier please consider revising code!
dig_init_portable(Begins at: 574, Ends at:643)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 16 | ** | BABY-MONSTER | 16 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 1 | | OK | 1 |
LOC: | 70 | * | WARNING | 70 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a BABY-MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
dig_set_cur_port(Begins at: 646, Ends at:650)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 1 | | OK | 1 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 0 | | OK | 0 |
LOC: | 5 | | OK | 5 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
Clone analysis:
This file has 10 potentially cloned functions:
dig__fread_port_D dig__fread_port_L dig__fread_port_I dig__fwrite_port_L dig__fwrite_port_S dig__fwrite_port_I dig__fwrite_port_S dig__fwrite_port_L dig__fwrite_port_I
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fread_port_D are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fread_port_F
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fread_port_F are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fread_port_D
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fread_port_I are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fread_port_L
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fread_port_L are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fread_port_I
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fwrite_port_I are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_L
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_S
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fwrite_port_L are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_I
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_S
In /var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c clones of dig__fwrite_port_S are:
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_L
/var/project-manager/grass/grassSVN/grass/trunk/lib/vector/diglib/portable.c dig__fwrite_port_I
____________________________________________
Threshold grass key metrics values at Thu Jun 04 20:19:22 EDT 2009 are:
----------------------+-----------+-----------+-----------+
| warning | middle | extrem |
| limits | limits | limits |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo): | 6 | 13 | 21 |
ParamNBR: | 3 | 6 | 9 |
CalledNBR: | 10 | 23 | 37 |
LOC: | 42 | 91 | 141 |
----------------------+-----------+-----------+-----------+
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
-Global analysis: based on 21 metrics(the fourth preceding include)
Message interpretation :
OK : Nothing to say at all
* : this is getting close to be out of range, consider revising the code
** : this is a baby monster, you should revise this function
***: this is a monster, definitely you should revise this function
Conclusion interpretation :
CORRECT : if all metrics are situated before warning limits
WARNING : if 1 to more metrics are between warning and middle limits
BABY_MONSTER: if 1 to more metrics are between middle and extreme limits
MONSTERS : if 1 to more metrics are in the extreme limits
_______________________________________________
Brought to you by :
SOftware Cost-effective Change and Evolution Research (SOCCER) laboratory
Please visite our web site on your project at :
http://web.soccerlab.polymtl.ca/project-manager/grass-website/index.html
More information about the grass-qa
mailing list