[GRASS-QA] GRASS QA: ychemin |main.c landsat.h local_proto.h landsat_met.c ...| 23 clones | 1 monsters |10 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Nov 3 06:02:11 EDT 2010


Hello ychemin,

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

ANALYSIS 

your changes to files/class/methods/functions : 

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

          Function
main(Begins at: 29, Ends at:615)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      68 |   *** |      MONSTER |        68 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |     190 |   *** |      MONSTER |       190 |
LOC:          |     587 |   *** |      MONSTER |       587 |
--------------+---------+-------+--------------+-----------+
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.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :/imagery/i.landsat.toar/local_proto.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :/imagery/i.landsat.toar/landsat_met.c
*****************************************************************

          Function
chrncpy(Begins at: 15, Ends at:22)
--------------+---------+-------+--------------+-----------+
              |          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!


get_value_met(Begins at: 113, Ends at:135)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      23 |       |           OK |        23 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 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!


met_ETM(Begins at: 43, Ends at:108)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      26 |     * |      WARNING |        26 |
LOC:          |      66 |       |           OK |        66 |
--------------+---------+-------+--------------+-----------+
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!


mtl_TM5(Begins at: 224, Ends at:280)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      27 |     * |      WARNING |        27 |
LOC:          |      57 |       |           OK |        57 |
--------------+---------+-------+--------------+-----------+
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:
  get_value_met7  met_ETM  met_TM5

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

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

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

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

*****************************************************************
          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!


lsat_qcal2rad(Begins at: 15, Ends at:18)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


lsat_rad2ref(Begins at: 23, Ends at:26)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


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/earth_sun.h
*****************************************************************

          Class
ln_vsop(Begins at: 11, Ends at:16)
             +--------+--------+--------+--------+--------+--------+
             |    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 :/imagery/i.landsat.toar/landsat_set.c
*****************************************************************

          Function
sensor_ETM(Begins at: 63, Ends at:87)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      25 |       |           OK |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


sensor_MSS(Begins at: 12, Ends at:36)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      25 |       |           OK |        25 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


set_ETM(Begins at: 455, Ends at:520)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      66 |       |           OK |        66 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_MSS1(Begins at: 102, Ends at:128)
--------------+---------+-------+--------------+-----------+
              |          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


set_MSS2(Begins at: 134, Ends at:175)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      42 |       |           OK |        42 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_MSS3(Begins at: 183, Ends at:222)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      40 |       |           OK |        40 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_MSS4(Begins at: 228, Ends at:273)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      46 |       |           OK |        46 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_MSS5(Begins at: 334, Ends at:378)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      45 |       |           OK |        45 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_TM4(Begins at: 275, Ends at:327)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      53 |       |           OK |        53 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


set_TM5(Begins at: 380, Ends at:448)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |     * |      WARNING |         9 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      10 |       |           OK |        10 |
LOC:          |      69 |     * |      WARNING |        69 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


Clone analysis:
This file has 14 potentially cloned functions:
  sensor_ETM  sensor_MSS  sensor_MSS  sensor_TM  sensor_TM  set_ETM  set_MSS1  set_MSS1  set_MSS2  set_MSS3  set_MSS4  set_MSS5  set_TM4

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

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

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

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

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

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

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

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

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

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

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

          Function
earth_sun(Begins at: 1085, Ends at:1101)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


julian_char(Begins at: 1073, Ends at:1082)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      10 |       |           OK |        10 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


julian_int(Begins at: 1051, Ends at:1070)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


ln_calc_series(Begins at: 1037, Ends at:1048)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      12 |       |           OK |        12 |
--------------+---------+-------+--------------+-----------+
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:
  julian_char  julian_int  ln_calc_series

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

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

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

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

____________________________________________


Threshold grass key metrics values at Wed Nov 03 06:02:07 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