[GRASS-QA] GRASS QA: pkelly |input.c local_proto.h main.c output.c | 20 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Thu Sep 4 15:17:43 EDT 2008


Hello pkelly,

here's a report on your recent GRASS-SVN change : 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/general/g.proj/input.c
*****************************************************************

          Function
input_currloc(Begins at: 42, Ends at:51)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      10 |       |           OK |        10 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


input_epsg(Begins at: 162, Ends at:181)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       8 |       |           OK |         8 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


input_georef(Begins at: 202, Ends at:256)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      25 |    ** | BABY-MONSTER |        25 |
LOC:          |      55 |     * |      WARNING |        55 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


input_proj4(Begins at: 113, Ends at:145)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      14 |     * |      WARNING |        14 |
LOC:          |      33 |       |           OK |        33 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


input_wkt(Begins at: 68, Ends at:95)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      13 |     * |      WARNING |        13 |
LOC:          |      28 |       |           OK |        28 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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


set_gdal_region(Begins at: 293, Ends at:333)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


Clone analysis:
This file has 16 potentially cloned functions:
  input_currloc  input_epsg  input_epsg  input_georef  input_georef  input_proj4  input_proj4  input_wkt  input_wkt  set_default_region  set_default_region  set_gdal_region  set_gdal_region  set_ogr_region  set_ogr_region

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of input_currloc are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  input_currloc
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  input_currloc

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of input_epsg are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  input_epsg
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  input_epsg

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of input_georef are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  input_georef
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  input_georef

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of input_proj4 are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  input_proj4
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  input_proj4

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of input_wkt are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  input_wkt
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  input_wkt

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of set_default_region are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  set_default_region
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  set_default_region

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of set_gdal_region are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  set_gdal_region
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  set_gdal_region

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/input.c clones of set_ogr_region are:
          /tmp/grassSVN/grass/trunk/general/g.proj/input.c  set_ogr_region
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/input.c  set_ogr_region

*****************************************************************
          File :grass/trunk/general/g.proj/local_proto.h
*****************************************************************

The system don't find class, method and function
 in this file during analysis!
*****************************************************************
          File :grass/trunk/general/g.proj/main.c
*****************************************************************

          Function
main(Begins at: 27, Ends at:241)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      16 |    ** | BABY-MONSTER |        16 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      55 |   *** |      MONSTER |        55 |
LOC:          |     215 |   *** |      MONSTER |       215 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/general/g.proj/output.c
*****************************************************************

          Function
check_xy(Begins at: 221, Ends at:229)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       9 |       |           OK |         9 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


create_location(Begins at: 146, Ends at:219)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      32 |    ** | BABY-MONSTER |        32 |
LOC:          |      74 |     * |      WARNING |        74 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


print_datuminfo(Begins at: 49, Ends at:91)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       8 |     * |      WARNING |         8 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      12 |     * |      WARNING |        12 |
LOC:          |      43 |     * |      WARNING |        43 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


print_proj4(Begins at: 93, Ends at:125)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |     * |      WARNING |         6 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      33 |       |           OK |        33 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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


print_wkt(Begins at: 127, Ends at:144)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      18 |       |           OK |        18 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 4 potentially cloned functions:
  print_proj4  print_projinfo  print_wkt

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/output.c clones of print_datuminfo are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/output.c  print_datuminfo

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/output.c clones of print_proj4 are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/output.c  print_proj4

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/output.c clones of print_projinfo are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/output.c  print_projinfo

In /var/project-manager/grass/grassSVN/grass/trunk/general/g.proj/output.c clones of print_wkt are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/general/g.proj/output.c  print_wkt

____________________________________________


Threshold GRASS6 key metrics values at Thu Sep 04 15:29:55 EDT 2008 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |         6 |        13 |        21 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        10 |        23 |        37 |
LOC:                  |        42 |        91 |       141 |
----------------------+-----------+-----------+-----------+



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 
    http://web.soccerlab.polymtl.ca/grass-evolution/grass-browsers/grass-index-en.html 



More information about the grass-qa mailing list