[GRASS-QA] GRASS QA: mmetz |main.c order.c io.c global.h | no clones | 1 monsters |6 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Thu Jun 3 07:45:02 EDT 2010


Hello mmetz,

here's a report on your recent grass-SVN change for the revision : 42459 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/raster/r.stream.order/main.c
*****************************************************************

          Function
main(Begins at: 24, Ends at:203)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      17 |     * |      WARNING |        17 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      47 |     * |      WARNING |        47 |
LOC:          |     180 |     * |      WARNING |       180 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 3 values are close to an outlier please consider revising code!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/raster/r.stream.order/order.c
*****************************************************************

          Function
horton(Begins at: 355, Ends at:436)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      11 |     * |      WARNING |        11 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      82 |     * |      WARNING |        82 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


hack(Begins at: 438, Ends at:516)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |       |           OK |         9 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      79 |       |           OK |        79 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


trib_nums(Begins at: 6, Ends at:29)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      24 |       |           OK |        24 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


shreeve(Begins at: 307, Ends at:353)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      47 |       |           OK |        47 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


do_cum_length(Begins at: 149, Ends at:242)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |       |           OK |         9 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       6 |       |           OK |         6 |
LOC:          |      94 |     * |      WARNING |        94 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


init_streams(Begins at: 31, Ends at:57)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      27 |       |           OK |        27 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


find_nodes(Begins at: 59, Ends at:147)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      18 |     * |      WARNING |        18 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      17 |       |           OK |        17 |
LOC:          |      89 |     * |      WARNING |        89 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


strahler(Begins at: 253, Ends at:305)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |       |           OK |         8 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      53 |       |           OK |        53 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/raster/r.stream.order/io.c
*****************************************************************

          Function
open_raster(Begins at: 4, Ends at:31)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      14 |       |           OK |        14 |
LOC:          |      28 |       |           OK |        28 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


create_table(Begins at: 275, Ends at:459)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      22 |     * |      WARNING |        22 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      37 |     * |      WARNING |        37 |
LOC:          |     185 |    ** | BABY-MONSTER |       185 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


create_base_maps(Begins at: 34, Ends at:115)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      15 |     * |      WARNING |        15 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      44 |     * |      WARNING |        44 |
LOC:          |      82 |     * |      WARNING |        82 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 3 values are close to an outlier please consider revising code!


write_maps(Begins at: 133, Ends at:273)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      41 |   *** |      MONSTER |        41 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      64 |    ** | BABY-MONSTER |        64 |
LOC:          |     141 |     * |      WARNING |       141 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


stream_number(Begins at: 117, Ends at:131)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/raster/r.stream.order/global.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
____________________________________________


Threshold grass key metrics values at Thu Jun 03 07:44:57 EDT 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |        11 |        24 |        38 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        21 |        49 |        78 |
LOC:                  |        80 |       183 |       287 |
----------------------+-----------+-----------+-----------+



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