[GRASS-QA] GRASS QA: martinl |args.c local_proto.h surface.c vector.c | 5 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Tue Sep 9 10:16:52 EDT 2008


Hello martinl,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/branches/develbranch_6/visualization/nviz2/cmd/args.c
*****************************************************************

          Function
check_parameters(Begins at: 495, Ends at:632)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |       |           OK |        14 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      50 |   *** |      MONSTER |        50 |
LOC:          |     138 |   *** |      MONSTER |       138 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


opt_get_num_answers(Begins at: 475, Ends at:488)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       0 |     * |      WARNING |         0 |
LOC:          |      14 |     * |      WARNING |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


parse_command(Begins at: 43, Ends at:109)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       3 |       |           OK |         3 |
CalledNBR:    |      18 |     * |      WARNING |        18 |
LOC:          |      67 |     * |      WARNING |        67 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/branches/develbranch_6/visualization/nviz2/cmd/local_proto.h
*****************************************************************

          Class
GParams(Begins at: 7, Ends at:26)
             +--------+--------+--------+--------+--------+--------+
             |    DIT |    NOC |    WMC |    RFC |    CBO |   LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------+



Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c
*****************************************************************

          Function
load_rasters(Begins at: 30, Ends at:175)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      17 |    ** | BABY-MONSTER |        17 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      58 |   *** |      MONSTER |        58 |
LOC:          |     146 |   *** |      MONSTER |       146 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


surface_set_draw_mode(Begins at: 182, Ends at:257)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |     * |      WARNING |        10 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      18 |     * |      WARNING |        18 |
LOC:          |      76 |     * |      WARNING |        76 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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

In /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c clones of load_rasters are:
          /var/project-manager/grass/grassSVN/grass/trunk/visualization/nviz2/cmd/surface.c  load_rasters

In /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c clones of surface_set_draw_mode are:
          /var/project-manager/grass/grassSVN/grass/trunk/visualization/nviz2/cmd/surface.c  surface_set_draw_mode

*****************************************************************
          File :grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c
*****************************************************************

          Function
load_vectors(Begins at: 55, Ends at:88)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      34 |       |           OK |        34 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


load_vector_lines(Begins at: 35, Ends at:39)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       5 |       |           OK |         5 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


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


vlines_set_attrb(Begins at: 98, Ends at:123)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      26 |       |           OK |        26 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


vpoints_set_attrb(Begins at: 133, Ends at:173)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |     * |      WARNING |        10 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      15 |     * |      WARNING |        15 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 3 potentially cloned functions:
  vlines_set_attrb  vpoints_set_attrb

In /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c clones of load_vectors are:
          /var/project-manager/grass/grassSVN/grass/trunk/visualization/nviz2/cmd/vector.c  load_vectors

In /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c clones of vlines_set_attrb are:
          /var/project-manager/grass/grassSVN/grass/trunk/visualization/nviz2/cmd/vector.c  vlines_set_attrb

In /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c clones of vpoints_set_attrb are:
          /var/project-manager/grass/grassSVN/grass/trunk/visualization/nviz2/cmd/vector.c  vpoints_set_attrb

____________________________________________


Threshold GRASS6 key metrics values at Tue Sep 09 10:23:05 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