[GRASS-QA] GRASS QA: huhabla |main.c input.c | 4 clones | 1 monsters |5 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Tue Mar 15 17:50:44 EDT 2011


Hello huhabla,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/raster/simwe/r.sim.water/main.c
*****************************************************************

          Function
main(Begins at: 99, Ends at:480)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      19 |     * |      WARNING |        19 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |     118 |   *** |      MONSTER |       118 |
LOC:          |     382 |   *** |      MONSTER |       382 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/raster/simwe/simlib/input.c
*****************************************************************

          Function
read_double_raster_map(Begins at: 458, Ends at:497)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       8 |       |           OK |         8 |
LOC:          |      40 |       |           OK |        40 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


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


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


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


read_float_raster_map(Begins at: 415, Ends at:454)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       8 |       |           OK |         8 |
LOC:          |      40 |       |           OK |        40 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file has 4 potentially cloned functions:
  create_float_matrix  create_double_matrix  read_double_raster_map

In /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c clones of read_double_raster_map are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c  read_float_raster_map

In /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c clones of create_double_matrix are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c  create_float_matrix

In /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c clones of create_float_matrix are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c  create_double_matrix

In /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c clones of read_float_raster_map are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/simwe/simlib/input.c  read_double_raster_map

____________________________________________


Threshold grass key metrics values at Tue Mar 15 17:50:31 EDT 2011 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         9 |        21 |        33 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        16 |        38 |        61 |
LOC:                  |        64 |       145 |       226 |
----------------------+-----------+-----------+-----------+



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