[GRASS-QA] GRASS QA: martinl |rasterdefs.h open.c closecell.c close.c ...| 14 clones | 0 monsters |7 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Fri Dec 24 11:54:04 EST 2010


Hello martinl,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/include/rasterdefs.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :/lib/raster/open.c
*****************************************************************

          Function
Rast__check_fp_type(Begins at: 821, Ends at:864)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |       |           OK |         8 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      23 |     * |      WARNING |        23 |
LOC:          |      44 |       |           OK |        44 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Rast__open_old(Begins at: 146, Ends at:342)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      25 |    ** | BABY-MONSTER |        25 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      56 |    ** | BABY-MONSTER |        56 |
LOC:          |     197 |    ** | BABY-MONSTER |       197 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


Rast_get_map_type(Begins at: 806, Ends at:811)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       6 |       |           OK |         6 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_map_is_fp(Begins at: 735, Ends at:754)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       8 |       |           OK |         8 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_map_type(Begins at: 768, Ends at:793)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      10 |       |           OK |        10 |
LOC:          |      26 |       |           OK |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_open_c_new(Begins at: 371, Ends at:374)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_open_c_new_uncompressed(Begins at: 386, Ends at:389)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_open_fp_new(Begins at: 460, Ends at:463)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_open_fp_new_uncompressed(Begins at: 474, Ends at:477)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_open_new(Begins at: 885, Ends at:888)
--------------+---------+-------+--------------+-----------+
              |          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


Rast_open_new_uncompressed(Begins at: 900, Ends at:903)
--------------+---------+-------+--------------+-----------+
              |          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


Rast_open_old(Begins at: 106, Ends at:121)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_set_cell_format(Begins at: 416, Ends at:424)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |       9 |       |           OK |         9 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_set_fp_type(Begins at: 708, Ends at:721)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      14 |       |           OK |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_set_quant_rules(Begins at: 919, Ends at:944)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      26 |       |           OK |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


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


open_raster_new(Begins at: 542, Ends at:693)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      17 |     * |      WARNING |        17 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      51 |    ** | BABY-MONSTER |        51 |
LOC:          |     152 |     * |      WARNING |       152 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


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


Clone analysis:
This file has 8 potentially cloned functions:
  Rast_map_is_fp  Rast_map_type  Rast_open_old  Rast_set_fp_type  Rast_set_quant_rules  new_fileinfo  open_raster_new_gdal

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_get_cell_format are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_get_cell_format

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_map_is_fp are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_map_is_fp

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_map_type are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_map_type

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_open_old are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_open_old

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_set_fp_type are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_set_fp_type

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of Rast_set_quant_rules are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  Rast_set_quant_rules

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of new_fileinfo are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  new_fileinfo

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/open.c clones of open_raster_new_gdal are:
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/opencell.c  open_raster_new_gdal

*****************************************************************
          File :/lib/raster/closecell.c
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :/lib/raster/close.c
*****************************************************************

          Function
Rast__unopen_all(Begins at: 126, Ends at:137)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      12 |       |           OK |        12 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_close(Begins at: 69, Ends at:80)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      12 |       |           OK |        12 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Rast_unopen(Begins at: 102, Ends at:113)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      12 |       |           OK |        12 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


close_new(Begins at: 334, Ends at:467)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      20 |     * |      WARNING |        20 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      44 |    ** | BABY-MONSTER |        44 |
LOC:          |     134 |     * |      WARNING |       134 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


close_new_gdal(Begins at: 255, Ends at:332)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |       |           OK |         9 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      30 |     * |      WARNING |        30 |
LOC:          |      78 |     * |      WARNING |        78 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


close_old(Begins at: 139, Ends at:176)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      12 |       |           OK |        12 |
LOC:          |      38 |       |           OK |        38 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


write_fp_format(Begins at: 470, Ends at:496)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      11 |       |           OK |        11 |
LOC:          |      27 |       |           OK |        27 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


write_support_files(Begins at: 178, Ends at:253)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |       |           OK |         6 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      20 |     * |      WARNING |        20 |
LOC:          |      76 |     * |      WARNING |        76 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 2 values are close to an outlier please consider revising code!


Clone analysis:
This file has 6 potentially cloned functions:
  Rast_close  Rast_unopen  Rast_close  Rast_close  Rast_unopen

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/close.c clones of Rast_close are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/close.c  Rast_unopen
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/closecell.c  Rast_close
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/closecell.c  Rast_unopen

In /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/close.c clones of Rast_unopen are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/raster/close.c  Rast_close
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/closecell.c  Rast_close
          /var/project-manager/grass/grassSVN/grass/trunk/lib/raster/closecell.c  Rast_unopen

*****************************************************************
          File :/lib/raster/opencell.c
*****************************************************************

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


Threshold grass key metrics values at Fri Dec 24 11:53:54 EST 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |        10 |        22 |        34 |
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