[GRASS-QA] GRASS QA: mmetz |perform.c readcell.c cubic_f.c main.c ...| 4 clones | 1 monsters |9 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Wed Nov 3 03:58:45 EDT 2010


Hello mmetz,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/imagery/i.rectify/perform.c
*****************************************************************

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

          Function
get_block(Begins at: 109, Ends at:132)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      11 |       |           OK |        11 |
LOC:          |      24 |       |           OK |        24 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


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

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.rectify/readcell.c clones of get_block are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/r.proj/readcell.c  get_block

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.rectify/readcell.c clones of readcell are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/r.proj/readcell.c  readcell

*****************************************************************
          File :/imagery/i.rectify/cubic_f.c
*****************************************************************

          Function
p_cubic_f(Begins at: 17, Ends at:54)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |      11 |       |           OK |        11 |
LOC:          |      38 |       |           OK |        38 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.rectify/main.c
*****************************************************************

          Function
err_exit(Begins at: 282, Ends at:294)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      13 |       |           OK |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


main(Begins at: 74, Ends at:279)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      26 |    ** | BABY-MONSTER |        26 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      72 |   *** |      MONSTER |        72 |
LOC:          |     206 |    ** | BABY-MONSTER |       206 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


make_ipol_list(Begins at: 296, Ends at:315)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.rectify/main.c clones of err_exit are:
          /var/project-manager/grass/grassSVN/grass/trunk/imagery/i.rectify/main.c  err_exit

In /data/project-manager/grass/grassSVN/grass/trunk/imagery/i.rectify/main.c clones of make_ipol_list are:
          /data/project-manager/grass/grassSVN/grass/trunk/raster/r.proj/main.c  make_ipol_list

*****************************************************************
          File :/imagery/i.rectify/exec.c
*****************************************************************

          Function
exec_rectify(Begins at: 23, Ends at:97)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      30 |     * |      WARNING |        30 |
LOC:          |      75 |     * |      WARNING |        75 |
--------------+---------+-------+--------------+-----------+
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 :/imagery/i.rectify/rowcol.h
*****************************************************************

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

          Class
cache(Begins at: 19, Ends at:27)
             +--------+--------+--------+--------+--------+--------+
             |    DIT |    NOC |    WMC |    RFC |    CBO |   LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics |        |        |        |        |        |        |
+------------+--------+--------+--------+--------+--------+--------+



          Class
menu(Begins at: 43, Ends at:48)
             +--------+--------+--------+--------+--------+--------+
             |    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.rectify/cubic.c
*****************************************************************

          Function
p_cubic(Begins at: 20, Ends at:73)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |       |           OK |         8 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      54 |       |           OK |        54 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.rectify/bilinear.c
*****************************************************************

          Function
p_bilinear(Begins at: 18, Ends at:68)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |      14 |       |           OK |        14 |
LOC:          |      51 |       |           OK |        51 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.rectify/matrix.c
*****************************************************************

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

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

          Function
p_nearest(Begins at: 12, Ends at:41)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      30 |       |           OK |        30 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.rectify/rectify.c
*****************************************************************

          Function
rectify(Begins at: 16, Ends at:120)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
CalledNBR:    |      38 |     * |      WARNING |        38 |
LOC:          |     105 |     * |      WARNING |       105 |
--------------+---------+-------+--------------+-----------+
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 :/imagery/i.rectify/bilinear_f.c
*****************************************************************

          Function
p_bilinear_f(Begins at: 16, Ends at:49)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      34 |       |           OK |        34 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/imagery/i.rectify/report.c
*****************************************************************

          Function
report(Begins at: 4, Ends at:50)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |      12 |       |           OK |        12 |
LOC:          |      47 |       |           OK |        47 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

____________________________________________


Threshold grass key metrics values at Wed Nov 03 03:58:29 EDT 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