[GRASS-QA] GRASS QA: glynn |Graph.c Graph_set.c Graph_set.c | 7 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Fri Sep 5 15:00:28 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 |    ** | BABY-MONSTER |        20 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      25 |    ** | BABY-MONSTER |        25 |
LOC:          |      94 |    ** | BABY-MONSTER |        94 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


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


map_file(Begins at: 307, Ends at:333)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      27 |       |           OK |        27 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
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/Graph_set.c
*****************************************************************

          Function
map_file(Begins at: 41, Ends at:64)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       5 |       |           OK |         5 |
LOC:          |      24 |       |           OK |        24 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


PNG_Graph_set(Begins at: 66, Ends at:156)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      12 |     * |      WARNING |        12 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      31 |    ** | BABY-MONSTER |        31 |
LOC:          |      91 |    ** | BABY-MONSTER |        91 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/lib/psdriver/Graph_set.c
*****************************************************************

          Class
paper(Begins at: 33, Ends at:38)
             +--------+--------+--------+--------+--------+--------+
             |    DIT |    NOC |    WMC |    RFC |    CBO |   LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------+



          Function
get_paper(Begins at: 127, Ends at:170)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       7 |     * |      WARNING |         7 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      13 |     * |      WARNING |        13 |
LOC:          |      44 |     * |      WARNING |        44 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


in2pt(Begins at: 114, Ends at:117)
--------------+---------+-------+--------------+-----------+
              |          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


output(Begins at: 224, Ends at:231)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |       8 |       |           OK |         8 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


PS_Graph_set(Begins at: 172, Ends at:222)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      21 |     * |      WARNING |        21 |
LOC:          |      51 |     * |      WARNING |        51 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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


write_prolog(Begins at: 53, Ends at:95)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       5 |       |           OK |         5 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |      25 |    ** | BABY-MONSTER |        25 |
LOC:          |      43 |     * |      WARNING |        43 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


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


Clone analysis:
This file has 3 potentially cloned functions:
  write_prolog  write_setup

In /var/project-manager/grass/grassSVN/grass/trunk/lib/psdriver/Graph_set.c clones of get_paper are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/psdriver/Graph_set.c  get_paper

In /var/project-manager/grass/grassSVN/grass/trunk/lib/psdriver/Graph_set.c clones of write_prolog are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/psdriver/Graph_set.c  write_prolog

In /var/project-manager/grass/grassSVN/grass/trunk/lib/psdriver/Graph_set.c clones of write_setup are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/psdriver/Graph_set.c  write_setup

____________________________________________


Threshold GRASS6 key metrics values at Fri Sep 05 15:05:51 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