[GRASS-QA] GRASS QA: martinl |main.c landsat.c landsat_met.c landsat_set.c | 5 clones | 1 monsters |4 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Nov 3 08:06:20 EDT 2010


Hello martinl,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/imagery/i.landsat.toar/main.c
*****************************************************************

          Function
main(Begins at: 29, Ends at:632)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      66 |   *** |      MONSTER |        66 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |     219 |   *** |      MONSTER |       219 |
LOC:          |     604 |   *** |      MONSTER |       604 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.landsat.toar/landsat.c
*****************************************************************

          Function
lsat_bandctes(Begins at: 51, Ends at:168)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      11 |     * |      WARNING |        11 |
ParamNBR:     |       7 |    ** | BABY-MONSTER |         7 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |     118 |     * |      WARNING |       118 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file has 1 potentially cloned functions:


In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.landsat.toar/landsat.c clones of lsat_bandctes are:
          /data/project-manager/grass/grassSVN/grass-addons/imagery/i.landsat.toar/landsat.c  lsat_bandctes

*****************************************************************
          File :/imagery/i.landsat.toar/landsat_met.c
*****************************************************************

          Function
mtl_TM5(Begins at: 224, Ends at:285)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      29 |     * |      WARNING |        29 |
LOC:          |      62 |       |           OK |        62 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


met_TM5(Begins at: 137, Ends at:207)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |     * |      WARNING |        14 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      28 |     * |      WARNING |        28 |
LOC:          |      71 |     * |      WARNING |        71 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 3 values are close to an outlier please consider revising code!


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


Clone analysis:
This file has 2 potentially cloned functions:
  get_value_met7

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.landsat.toar/landsat_met.c clones of met_TM5 are:
          /data/project-manager/grass/grassSVN/grass-addons/imagery/i.landsat.toar/landsat_met.c  met_TM5

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.landsat.toar/landsat_met.c clones of get_value_met7 are:
          /data/project-manager/grass/grassSVN/grass-addons/imagery/i.landsat.toar/landsat_met.c  get_value_met7

*****************************************************************
          File :/imagery/i.landsat.toar/landsat_set.c
*****************************************************************

          Function
sensor_TM(Begins at: 38, Ends at:62)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      25 |       |           OK |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 2 potentially cloned functions:
  sensor_TM

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.landsat.toar/landsat_set.c clones of sensor_TM are:
          /data/project-manager/grass/grassSVN/grass-addons/grass7/imagery/i.landsat.toar/landsat_set.c  sensor_TM
          /data/project-manager/grass/grassSVN/grass-addons/imagery/i.landsat.toar/landsat_set.c  sensor_TM

____________________________________________


Threshold grass key metrics values at Wed Nov 03 08:06:15 EDT 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         9 |        19 |        30 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        18 |        43 |        69 |
LOC:                  |        67 |       151 |       235 |
----------------------+-----------+-----------+-----------+



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