[GRASS-QA] GRASS QA: glynn |Graph.c Draw_line.c Polygon.c | 5 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Thu Sep 4 14:41:55 EDT 2008


Hello glynn,

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

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :grass/trunk/lib/cairodriver/Graph.c
*****************************************************************

          Function
Cairo_Graph_close(Begins at: 236, Ends at:250)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Cairo_Graph_set(Begins at: 195, Ends at:234)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      16 |     * |      WARNING |        16 |
LOC:          |      40 |       |           OK |        40 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


ends_with(Begins at: 298, Ends at:305)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |       8 |       |           OK |         8 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


init_cairo(Begins at: 252, Ends at:295)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      10 |     * |      WARNING |        10 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      44 |     * |      WARNING |        44 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


init_file(Begins at: 100, Ends at:193)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      20 |     * |      WARNING |        20 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      25 |     * |      WARNING |        25 |
LOC:          |      94 |     * |      WARNING |        94 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


init_xlib(Begins at: 45, Ends at:97)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |       |           OK |         7 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      16 |       |           OK |        16 |
LOC:          |      53 |       |           OK |        53 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


map_file(Begins at: 307, Ends at:333)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |    ** | BABY-MONSTER |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       7 |    ** | BABY-MONSTER |         7 |
LOC:          |      27 |    ** | BABY-MONSTER |        27 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 4 potentially cloned functions:
  init_file  init_xlib  map_file

In /var/project-manager/grass/grassSVN/grass/trunk/lib/cairodriver/Graph.c clones of Cairo_Graph_close are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/cairodriver/Graph.c  Cairo_Graph_close

In /var/project-manager/grass/grassSVN/grass/trunk/lib/cairodriver/Graph.c clones of init_file are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/cairodriver/Graph.c  init_file

In /var/project-manager/grass/grassSVN/grass/trunk/lib/cairodriver/Graph.c clones of init_xlib are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/cairodriver/Graph.c  init_xlib

In /var/project-manager/grass/grassSVN/grass/trunk/lib/cairodriver/Graph.c clones of map_file are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/cairodriver/Graph.c  map_file

*****************************************************************
          File :grass/trunk/lib/pngdriver/Draw_line.c
*****************************************************************

          Function
draw_line(Begins at: 22, Ends at:100)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       9 |     * |      WARNING |         9 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      79 |     * |      WARNING |        79 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


PNG_draw_line(Begins at: 102, Ends at:130)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       9 |       |           OK |         9 |
LOC:          |      29 |       |           OK |        29 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


store_xy(Begins at: 14, Ends at:20)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |       7 |       |           OK |         7 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 1 potentially cloned functions:


In /var/project-manager/grass/grassSVN/grass/trunk/lib/pngdriver/Draw_line.c clones of draw_line are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/pngdriver/Draw_line.c  draw_line

*****************************************************************
          File :grass/trunk/lib/pngdriver/Polygon.c
*****************************************************************

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


Threshold GRASS6 key metrics values at Thu Sep 04 14:54:07 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