[GRASS-QA] GRASS QA: glynn |main.c main.c display.c main.c ...| 7 clones | 0 monsters |0 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Fri Sep 5 11:20:45 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/display/d.his/main.c
*****************************************************************

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


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/display/d.profile/main.c
*****************************************************************

          Function
main(Begins at: 51, Ends at:425)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      36 |   *** |      MONSTER |        36 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |     176 |   *** |      MONSTER |       176 |
LOC:          |     375 |   *** |      MONSTER |       375 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


myDcell(Begins at: 427, Ends at:467)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       6 |     * |      WARNING |         6 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |      20 |     * |      WARNING |        20 |
LOC:          |      41 |       |           OK |        41 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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

In /var/project-manager/grass/grassSVN/grass/trunk/display/d.profile/main.c clones of main are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/display/d.profile/main.c  main

In /var/project-manager/grass/grassSVN/grass/trunk/display/d.profile/main.c clones of myDcell are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/display/d.profile/main.c  myDcell

*****************************************************************
          File :grass/trunk/display/d.rast/display.c
*****************************************************************

          Function
cell_draw(Begins at: 46, Ends at:92)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |      20 |       |           OK |        20 |
LOC:          |      47 |       |           OK |        47 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


display(Begins at: 12, Ends at:44)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       6 |     * |      WARNING |         6 |
CalledNBR:    |       8 |       |           OK |         8 |
LOC:          |      33 |       |           OK |        33 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


mask_raster_array(Begins at: 94, Ends at:103)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |    ** | BABY-MONSTER |         4 |
CalledNBR:    |       2 |     * |      WARNING |         2 |
LOC:          |      10 |     * |      WARNING |        10 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
metrics are OK


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

In /var/project-manager/grass/grassSVN/grass/trunk/display/d.rast/display.c clones of cell_draw are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/display/d.rast/display.c  cell_draw

In /var/project-manager/grass/grassSVN/grass/trunk/display/d.rast/display.c clones of mask_raster_array are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/display/d.rast/display.c  mask_raster_array

*****************************************************************
          File :grass/trunk/display/d.rgb/main.c
*****************************************************************

          Class
band(Begins at: 28, Ends at:35)
             +--------+--------+--------+--------+--------+--------+
             |    DIT |    NOC |    WMC |    RFC |    CBO |   LCOM |
+------------+--------+--------+--------+--------+--------+--------|
|NEW Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------|
|OLD Metrics |      1 |      0 |      0 |      0 |      0 |      0 |
+------------+--------+--------+--------+--------+--------+--------+



          Function
main(Begins at: 39, Ends at:143)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |      14 |    ** | BABY-MONSTER |        14 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |      41 |   *** |      MONSTER |        41 |
LOC:          |     105 |    ** | BABY-MONSTER |       105 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :grass/trunk/include/display.h
*****************************************************************

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

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


D_cell_draw_end(Begins at: 203, Ends at:206)
--------------+---------+-------+--------------+-----------+
              |          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


D_cell_draw_setup(Begins at: 133, Ends at:149)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       7 |       |           OK |         7 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


D_draw_cell(Begins at: 78, Ends at:81)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


D_draw_c_raster(Begins at: 56, Ends at:59)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


D_draw_d_raster(Begins at: 46, Ends at:49)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       4 |       |           OK |         4 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


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


D_draw_raster(Begins at: 39, Ends at:44)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |       6 |       |           OK |         6 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
metrics are OK


D_draw_raster_RGB(Begins at: 151, Ends at:201)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       4 |       |           OK |         4 |
ParamNBR:     |      10 |   *** |      MONSTER |        10 |
CalledNBR:    |      17 |     * |      WARNING |        17 |
LOC:          |      51 |     * |      WARNING |        51 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       MONSTER           |
-----------------------------------------------------------+
metrics are OK


Clone analysis:
This file has 3 potentially cloned functions:
  D_cell_draw_setup  D_draw_raster_RGB

In /var/project-manager/grass/grassSVN/grass/trunk/lib/display/raster.c clones of draw_cell are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/display/raster.c  draw_cell

In /var/project-manager/grass/grassSVN/grass/trunk/lib/display/raster.c clones of D_cell_draw_setup are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/display/raster.c  D_cell_draw_setup

In /var/project-manager/grass/grassSVN/grass/trunk/lib/display/raster.c clones of D_draw_raster_RGB are:
          /var/project-manager/grass/grassSVN/grass/branches/develbranch_6/lib/display/raster.c  D_draw_raster_RGB

____________________________________________


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