[GRASS-QA] GRASS QA: martinl |lights.c change_view.c map_obj.c position.c ...| 4 clones | 0 monsters |10 warnings

soccerlab.info at gmail.com soccerlab.info at gmail.com
Tue Jun 8 15:09:23 EDT 2010


Hello martinl,

here's a report on your recent grass-SVN change for the revision : 42519 

ANALYSIS 

your changes to files/class/methods/functions : 

*****************************************************************
          File :/lib/nviz/lights.c
*****************************************************************

          Function
Nviz_set_light_bright(Begins at: 62, Ends at:78)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      17 |       |           OK |        17 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Nviz_set_light_ambient(Begins at: 115, Ends at:128)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      14 |       |           OK |        14 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Nviz_set_light_color(Begins at: 87, Ends at:106)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       1 |       |           OK |         1 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
CalledNBR:    |       2 |       |           OK |         2 |
LOC:          |      20 |       |           OK |        20 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Nviz_init_light(Begins at: 136, Ends at:157)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      22 |       |           OK |        22 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Nviz_new_light(Begins at: 167, Ends at:181)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       1 |       |           OK |         1 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


Nviz_set_light_position(Begins at: 27, Ends at:53)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       2 |       |           OK |         2 |
ParamNBR:     |       6 |    ** | BABY-MONSTER |         6 |
CalledNBR:    |       3 |       |           OK |         3 |
LOC:          |      27 |       |           OK |        27 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a  BABY-MONSTER           |
-----------------------------------------------------------+
 metric are OUT OF RANGE!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/lib/nviz/change_view.c
*****************************************************************

          Function
Nviz_set_viewpoint_position(Begins at: 93, Ends at:125)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       3 |     * |      WARNING |         3 |
CalledNBR:    |       4 |       |           OK |         4 |
LOC:          |      33 |       |           OK |        33 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file does not contain cloned functions

*****************************************************************
          File :/lib/nviz/map_obj.c
*****************************************************************

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

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

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

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

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

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

          Function
GS_switchlight(Begins at: 460, Ends at:471)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       2 |       |           OK |         2 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      12 |       |           OK |        12 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a            OK           |
-----------------------------------------------------------+
metrics are OK


GS_getlight_position(Begins at: 322, Ends at:337)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       5 |     * |      WARNING |         5 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      16 |       |           OK |        16 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


GS_getlight_ambient(Begins at: 411, Ends at:423)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      13 |       |           OK |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


GS_setlight_ambient(Begins at: 389, Ends at:403)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


GS_getlight_color(Begins at: 367, Ends at:379)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       0 |       |           OK |         0 |
LOC:          |      13 |       |           OK |        13 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


GS_setlight_color(Begins at: 345, Ends at:359)
--------------+---------+-------+--------------+-----------+
              |          New Metrics           |Old Metrics|
--------------+---------+-------+--------------+-----------+
Complexity:   |       3 |       |           OK |         3 |
ParamNBR:     |       4 |     * |      WARNING |         4 |
CalledNBR:    |       1 |       |           OK |         1 |
LOC:          |      15 |       |           OK |        15 |
--------------+---------+-------+--------------+-----------+
Conclusion:   | this function is a       WARNING           |
-----------------------------------------------------------+
 at least 1 values are close to an outlier please consider revising code!


Clone analysis:
This file has 4 potentially cloned functions:
  GS_setlight_color  GS_getlight_ambient  GS_setlight_ambient

In /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c clones of GS_getlight_ambient are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c  GS_getlight_color

In /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c clones of GS_setlight_ambient are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c  GS_setlight_color

In /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c clones of GS_getlight_color are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c  GS_getlight_ambient

In /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c clones of GS_setlight_color are:
          /data/project-manager/grass/grassSVN/grass/trunk/lib/ogsf/GS2.c  GS_setlight_ambient

*****************************************************************
          File :/lib/nviz/render.c
*****************************************************************

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


Threshold grass key metrics values at Tue Jun 08 15:09:11 EDT 2010 are:
----------------------+-----------+-----------+-----------+
                      | warning   | middle    | extrem    |
                      | limits    | limits    | limits    |
----------------------+-----------+-----------+-----------+
Complexity (Cyclo):   |        11 |        24 |        38 |
ParamNBR:             |         3 |         6 |         9 |
CalledNBR:            |        21 |        49 |        78 |
LOC:                  |        79 |       181 |       283 |
----------------------+-----------+-----------+-----------+



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 

Please visite our web site on your project at :
    http://web.soccerlab.polymtl.ca/project-manager/grass-website/index.html


More information about the grass-qa mailing list