[GRASS-QA] GRASS QA: glynn |main.c parser.c parser_script.c gis.h
...| no clones | 3 monsters |3 warnings
soccerlab.info at gmail.com
soccerlab.info at gmail.com
Mon Nov 29 22:15:45 EST 2010
Hello glynn,
here's a report on your recent grass-SVN change for the revision : 44421
ANALYSIS
your changes to files/class/methods/functions :
*****************************************************************
File :/general/g.parser/main.c
*****************************************************************
Class
context(Begins at: 36, Ends at:46)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Function
parse_type(Begins at: 188, Ends at:202)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 4 | | OK | 4 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 4 | | OK | 4 |
LOC: | 15 | | OK | 15 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
parse_flag(Begins at: 146, Ends at:186)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 8 | | OK | 8 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 16 | | OK | 16 |
LOC: | 41 | | OK | 41 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 1 values are close to an outlier please consider revising code!
translate(Begins at: 52, Ends at:74)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 4 | | OK | 4 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 7 | | OK | 7 |
LOC: | 23 | | OK | 23 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
parse_toplevel(Begins at: 90, Ends at:115)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 6 | | OK | 6 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 7 | | OK | 7 |
LOC: | 26 | | OK | 26 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
parse_boolean(Begins at: 76, Ends at:88)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 3 | | OK | 3 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 3 | | OK | 3 |
LOC: | 13 | | OK | 13 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
parse_option(Begins at: 204, Ends at:280)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 15 | * | WARNING | 15 |
ParamNBR: | 3 | * | WARNING | 3 |
CalledNBR: | 33 | * | WARNING | 33 |
LOC: | 77 | * | WARNING | 77 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a WARNING |
-----------------------------------------------------------+
at least 4 values are close to an outlier please consider revising code!
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/lib/gis/parser.c
*****************************************************************
Function
G_parser(Begins at: 310, Ends at:571)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 43 | *** | MONSTER | 43 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 86 | *** | MONSTER | 86 |
LOC: | 262 | *** | MONSTER | 262 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
set_flag(Begins at: 786, Ends at:812)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 5 | | OK | 5 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 4 | | OK | 4 |
LOC: | 27 | | OK | 27 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a OK |
-----------------------------------------------------------+
metrics are OK
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/lib/gis/parser_script.c
*****************************************************************
Function
G__script(Begins at: 21, Ends at:129)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 26 | ** | BABY-MONSTER | 26 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 48 | ** | BABY-MONSTER | 48 |
LOC: | 109 | * | WARNING | 109 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a BABY-MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/include/gis.h
*****************************************************************
Class
Cell_head(Begins at: 255, Ends at:277)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
Counter(Begins at: 375, Ends at:377)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
Flag(Begins at: 348, Ends at:357)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
GModule(Begins at: 359, Ends at:367)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
G_3dview(Begins at: 282, Ends at:307)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
Key_Value(Begins at: 309, Ends at:315)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
Option(Begins at: 317, Ends at:346)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 1 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
Popen(Begins at: 379, Ends at:382)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
TimeStamp(Begins at: 369, Ends at:373)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/general/g.mapset/main.c
*****************************************************************
Function
main(Begins at: 28, Ends at:216)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 19 | ** | BABY-MONSTER | 19 |
ParamNBR: | 2 | | OK | 2 |
CalledNBR: | 86 | *** | MONSTER | 86 |
LOC: | 189 | ** | BABY-MONSTER | 189 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/lib/gis/parser_local_proto.h
*****************************************************************
Class
Item(Begins at: 7, Ends at:12)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Class
state(Begins at: 14, Ends at:39)
+--------+--------+--------+--------+--------+--------+
| DIT | NOC | WMC | RFC | CBO | LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics | 1 | 0 | 0 | 0 | 0 | 0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics | | | | | | |
+------------+--------+--------+--------+--------+--------+--------+
Clone analysis:
This file does not contain cloned functions
*****************************************************************
File :/lib/gis/parser_interface.c
*****************************************************************
Function
G__usage_xml(Begins at: 103, Ends at:349)
--------------+---------+-------+--------------+-----------+
| New Metrics |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity: | 33 | *** | MONSTER | 33 |
ParamNBR: | 1 | | OK | 1 |
CalledNBR: | 97 | *** | MONSTER | 97 |
LOC: | 247 | *** | MONSTER | 247 |
--------------+---------+-------+--------------+-----------+
Conclusion: | this function is a MONSTER |
-----------------------------------------------------------+
metric are OUT OF RANGE!
Clone analysis:
This file does not contain cloned functions
____________________________________________
Threshold grass key metrics values at Mon Nov 29 22:15:27 EST 2010 are:
----------------------+-----------+-----------+-----------+
| warning | middle | extrem |
| limits | limits | limits |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo): | 9 | 19 | 30 |
ParamNBR: | 3 | 6 | 9 |
CalledNBR: | 18 | 43 | 69 |
LOC: | 68 | 153 | 239 |
----------------------+-----------+-----------+-----------+
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