Dependency Graph

Online documentation:

Dependency Matrix

Online documentation:

Visualizing Code Metrics through Treemaping

With the Online documentation, understand how Treemaping can help you see patterns in your code base, that would be hard to spot with other ways.

Abstractness versus Instability Diagram

The Abstractness versus Instability Diagram helps to detect which Projects are potentially painful to maintain (i.e concrete and stable) and which Projects are potentially useless (i.e abstract and instable).

Online documentation:

For beginners: Where to start

Code queries and rules results are truncated to list a maximum of 100 code elements in this report

Does this report gets too large?

The list contains only code elements refactored or added since the baseline for comparison.

The setting Recent Violations Only is enabled

Why should I enable the setting Recent Violations Only ?

Quick Tips

Main
Main \ Rules
Main \ Rules \ Project Rules
Main \ Rules \ Project Rules \ Code Quality
Main \ Rules \ Project Rules \ Object Oriented Design
Main \ Rules \ Project Rules \ Design
Main \ Rules \ Project Rules \ Architecture and Layering
Main \ Rules \ Project Rules \ Diagnostics Queries
Main \ Rules \ Project Rules \ Dead Code
Main \ Rules \ Project Rules \ Visibility
Main \ Rules \ Project Rules \ Purity - Immutability - Constness
Main \ Rules \ Project Rules \ Naming Conventions
Main \ Rules \ Project Rules \ Source Files Organization
Main \ Group of Queries \ Object Oriented Design
Main \ Group of Queries \ API Breaking Changes
Main \ Group of Queries \ Code Diff Summary
Main \ Group of Queries \ Test and Code Coverage
Main \ Group of Queries \ Dead Code
Main \ Metrics \ Application Statistics
Main \ Metrics \ Projects Metrics
Main \ Metrics \ Namespaces Metrics
Main \ Metrics \ Types Metrics
Main \ Projects Dependencies
Main \ Namespaces Dependencies
Main \ Types Dependencies
Main \ Build Order
Main \ Analysis Log
Main \ Trend Charts
cppdepend report summary application nameCoco2DX (v1.0.0.0)report build date07/10/2015 12:34:08analysis duration21:25cppdepend version 6.0.0.8890baseline for comparison Not Defined. To define a Baseline for Comparison, please read this online documentation.
Get started.Quick tips.Back to CppDepend. The present HTML report is a summary of data gathered by the analysis.
It is recommended to use the CppDepend interactive UI capabilities
to make the most of CppDepend by mastering all aspects of your code.

Diagrams

C/C++ Projects Dependency Graph
Dependency Graph
View as ?fullscaled
C/C++ Projects Dependency Matrix
Dependency Matrix
View as ?fullscaled
Treemap View
Treemap Metric View
View as ?fullscaled
Abstractness versus Instability
Abstractness vs. Instability
View as ?fullscaled

Application Metrics

Note: Further Application Statistics are available.
# Lines of Code
241 479      
0 (NotMyCode)
# Types
3 122      
9   Projects      
47   Namespaces      
25 972   Methods      
8 535   Fields      
1 746   Source Files      
Comment
18.36%      
54 333   Lines of Comment      
Method Complexity
141   Max      
2.15   Average      
Code Coverage by TestsN/A because no coverage data specified
Third-Party Usage
2   Projects used      
11   Namespaces used      
289   Types used      
1 603   Methods used      
439   Fields used      

Rules summary

31520This section lists all Rules violated, and Rules or Queries with Error
  • Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
  • Number of Rules violated: 55

Summary of Rules violated

graphHelp Rules can be checked live at
development-time, from within Visual
Studio. Online documentation.
graphHelp CppDepend rules report too many flaws
on existing code base? Use the option
Recent Violations Only!
warningCritical Some Critical Rules are violated. Critical Rules
can be used to break the build process if
violated. Online documentation.
Name # Matches Elements Group
warningCritical   Types too big - critical
20 typesCode Quality
warningCritical   Methods too complex - critical
46 methodsCode Quality
warningCritical   Methods with too many parameters - critical
11 methodsCode Quality
warning   Quick summary of methods to refactor
1907 methodsCode Quality
warning   Methods too big
1304 methodsCode Quality
warning   Methods too complex
269 methodsCode Quality
warning   Methods potentially poorly commented
4445 methodsCode Quality
warning   Methods with too many parameters
161 methodsCode Quality
warning   Methods with too many local variables
388 methodsCode Quality
warning   Methods with too many overloads
59 methodsCode Quality
warning   Types with too many methods
173 typesCode Quality
warning   Types with too many fields
45 typesCode Quality
warning   Types with poor cohesion
88 typesCode Quality
warning   Base class should not use derivatives
11 typesObject Oriented Design
warning   Class shouldn't be too deep in inheritance tree
1003 typesObject Oriented Design
warning   Constructor should not call a virtual methods
352 methodsObject Oriented Design
warning   Avoid the Singleton pattern
1 typesObject Oriented Design
warning   Don't assign static fields from instance methods
51 fieldsObject Oriented Design
warning   Avoid Abstract Classes with too many methods
29 typesObject Oriented Design
warning   Type should not have too many responsibilities
1 typesDesign
warning   Nested types should not be visible
231 typesDesign
warning   Avoid namespaces mutually dependent
8 namespacesArchitecture and Layering
warning   Avoid namespaces dependency cycles
2 namespacesArchitecture and Layering
warning   Projects with poor cohesion (RelationalCohesion)
2 projectsArchitecture and Layering
warning   Projects that don't satisfy the Abstractness/Instability principle
2 projectsArchitecture and Layering
warning   All diagnostics
46880 fieldsDiagnostics Queries
warning   Preprocessor issues
22 fieldsDiagnostics Queries
warning   Cast issues
12443 fieldsDiagnostics Queries
warning   Conversion Issues
36 fieldsDiagnostics Queries
warning   Deprecated Usage
504 fieldsDiagnostics Queries
warning   Unused Symbols
1658 fieldsDiagnostics Queries
warning   Switch Issues
121 fieldsDiagnostics Queries
warning   Delete Issues
4 fieldsDiagnostics Queries
warning   Enum Issues
2819 fieldsDiagnostics Queries
warning   Template Issues
139 fieldsDiagnostics Queries
warning   Comparison Issues
72 fieldsDiagnostics Queries
warning   Potentially dead Types
134 typesDead Code
warning   Potentially dead Methods
586 methodsDead Code
warning   Potentially dead Fields
60 fieldsDead Code
warning   Fields should be declared as private
7410 fieldsVisibility
warning   Constructors of abstract classes should be declared as protected or private
74 typesVisibility
warning   Structures should be immutable
374 typesPurity - Immutability - Constness
warning   Avoid static fields with a mutable field type
265 fieldsPurity - Immutability - Constness
warning   Use const_cast carrefully
10 methodsPurity - Immutability - Constness
warning   Instance fields should be prefixed with a 'm_'
10 fieldsNaming Conventions
warning   Static fields should be prefixed with a 's_'
10 fieldsNaming Conventions
warning   Types name should begin with an Upper character
10 typesNaming Conventions
warning   Avoid types with name too long
40 typesNaming Conventions
warning   Avoid methods with name too long
3266 methodsNaming Conventions
warning   Avoid fields with name too long
49 fieldsNaming Conventions
warning   Namespace name should correspond to file location
285 typesNaming Conventions
warning   Avoid defining multiple types in a source file
364 typesSource Files Organization
warning   Namespace name should correspond to file location
256 typesSource Files Organization
warning   Types with source files stored in the same directory, should be declared in the same namespace
18 namespacesSource Files Organization
warning   Types declared in the same namespace, should have their source files stored in the same directory
16 namespacesSource Files Organization

Application Statistics

Stat # Occurences Avg StdDev Max
Public properties on classes 2,411 Classes 0.185.83215 public properties on __Globals
Public methods on classes 2,411 classes 12.62104.475096 public methods on __Globals
Arguments on public methods on classes 30,425 methods 0.850.9316 arguments on cocos2d.Mat4.Mat4(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)
Cyclomatic complexity on non abstract Methods 35,027 Methods 0.612.17 CC = 130 for RootTests.RootTests()

Projects Metrics

If you wish to define thresholds on Projects' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Projects # lines of code # Types # Abstract Types # lines of comment% CommentAfferent CouplingEfferent CouplingRelational CohesionInstabilityAbstractnessDistance
libcocos2d v1.0.0.081055135651424473413372646.570.160.040.56
libSpine v1.0.0.0311965033096572.490.900.07
libbox2d v1.0.0.06977133621232363125.10.160.050.56
cpp-tests v1.0.0.03702515051559751306472.5610.010.01
libluacocos2d v1.0.0.01127815203288246422.190.9900
lua-tests v1.0.0.04435077140620.86100
cpp-empty-test v1.0.0.0544065540261.33100
lua-empty-test v1.0.0.0252028520100.75100
External v1.0.0.000000000000

Types Metrics : Code Quality

For a particular Code Metric defined for types, values in red represent the 15% highest values.
If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
If the code base analyzed has too many types, CppDepend doesn't list Types Metrics to avoid a too big report. The section Types Metrics can be activated by unchecking the option:
CppDepend Project Properties > Report > Avoid too big report for large code base > Hide section Types Metrics if...
It is recommended to use the CppDepend interactive UI capabilities to browse large applications.

Types Metrics : Code Members and Inheritance

Type Name # Instance Methods Nb Static Methods # Fields# Children ClassesDepth Of Inheritance Tree Type Namespace

Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes

Namespaces Metrics

If you wish to define thresholds on namespaces' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Namespaces # lines of code # Types # lines of comment% CommentAfferent CouplingEfferent Coupling
libcocos2d::GlobalNamespace199325002010
libcocos2d::cocos2d44902840002924
libcocos2d::cocos2d.extension3401520039
libcocos2d::cocos2d.StringUtils6010074
libcocos2d::cocos2d.tweenfunc24420031
libcocos2d::cocos2d.GL6220095
libcocos2d::cocos2d.experimental15651300210
libcocos2d::cocos2d.ui6990820078
libcocos2d::cocos2d.allocator16580003
libcocos2d::cocos2d.utils7510055
libcocos2d::cocos2d.network817190029
libcocos2d::cocos2d.DrawPrimitives22610055
libcocos2d::cocos2d .anonymous_namespace{ccphysicsbody.cpp}010011
libcocos2d::cocos2d .anonymous_namespace{ccphysicsworld.cpp}030012
libcocos2d::cocos2d .anonymous_namespace{ccglview.cpp}2110013
libcocos2d::cocos2d .anonymous_namespace{ccimage.cpp}94200014
libcocos2d::cocos2d .anonymous_namespace{ccglstatecache.cpp}010011
libcocos2d::cocos2d .anonymous_namespace{cctexture2d.cpp}010002
libcocos2d::rapidjson992290073
libcocos2d::rapidjson.internal4320012
libcocos2d::llvm7310013
libcocos2d::flatbuffers1726300066
libcocos2d::flatbuffers.cpp25910013
libcocos2d::flatbuffers.go32710013
libcocos2d::p2t769120013
libcocos2d::tinyxml21180290033
libcocos2d::CocosDenshion18130064
libcocos2d::anonymous_namespace{cceventd ispatcher.cpp}310011
libcocos2d::cocosbuilder2030450029
libcocos2d::cocostudio1175610600616
libcocos2d::cocostudio.timeline1101230049
libSpine::GlobalNamespace2749600035
libSpine::spine37050029
libbox2d::GlobalNamespace69771330013
cpp-tests::GlobalNamespace36823149700030
cpp-tests::anonymous_namespace{allocator test.cpp}220012
cpp-tests::cocos2d9620016
cpp-tests::anonymous_namespace{newaudioe nginetest.cpp}10230015
cpp-tests::anonymous_namespace{physicste st.cpp}210012
libluacocos2d::GlobalNamespace1113893700424
libluacocos2d::cocos2d1292130047
libluacocos2d::anonymous_namespace{cclua stack.cpp}6010013
libluacocos2d::cocostudio4010017
lua-tests::GlobalNamespace33320009
lua-tests::cocos2d11030017
cpp-empty-test::GlobalNamespace5440005
lua-empty-test::GlobalNamespace2520006

151540
Project Rules  

  • 151 validated Rule(s)
  • 54 Rule(s) violated
  • 0 Rules or Queries with Error (syntax error, exception thrown, time-out)

3100
Code Quality  

warningCritical    Critical Rule warning: Types too big - critical
• Rule Description:

This rule matches types with more than 500 lines of code.

Types where NbLinesOfCode > 500 are extremely complex to develop and maintain. See the definition of the NbLinesOfCode metric here http://www.cppdepend.com/Metrics.aspx#NbLinesOfCode

Maybe you are facing the God Class phenomenon: A God Class is a class that controls way too many other classes in the system and has grown beyond all logic to become The Class That Does Everything.


• How to Fix Violations:

Types with many lines of code should be split in a group of smaller types.

To refactor a God Class you'll need patience, and you might even need to recreate everything from scratch. Here are a few advices:

• Think before pulling out methods: on what data does this method operate? What responsibility does it have?

• Try to maintain the interface of the god class at first and delegate calls to the new extracted classes. In the end the god class should be a pure facade without own logic. Then you can keep it for convenience or throw it away and start to use the new classes only.

• Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.

20 types matched

types# lines of code (LOC)# Methods# FieldsFull Name
DataReaderHelper1 2384614cocostudio.DataReaderHelper
Bundle3D1 1334810cocos2d.Bundle3D
ScrollView93610135cocos2d.ui.ScrollView
Layout9299350cocos2d.ui.Layout
Image8864612cocos2d.Image
Node88423373cocos2d.Node
Label7289655cocos2d.Label
Parser7013018flatbuffers.Parser
Scale9Sprite6538433cocos2d.ui.Scale9Sprite
b2World6195018b2World
FlatBuffersSerialize606306cocostudio.FlatBuffersSerialize
PUParticleSystem3D5977832cocos2d.PUParticleSystem3D
LuaEngine591532cocos2d.LuaEngine
CSLoader576458cocos2d.CSLoader
Widget56513538cocos2d.ui.Widget
Texture2D5577612cocos2d.Texture2D
Director5468444cocos2d.Director
NodeLoader546651cocosbuilder.NodeLoader
ParticleSystem53811843cocos2d.ParticleSystem
EventDispatcher5113511cocos2d.EventDispatcher

Statistics

Stat   # lines of code (LOC)   # Methods   # Fields
Sum:14 3401 546515
Average:71777.325.75
Minimum:511301
Maximum:1 23823373
Standard deviation:206.4145.8719.52
Variance:42 6032 104380.89
warningCritical    Critical Rule warning: Methods too complex - critical
• Rule Description:

This rule matches methods where CyclomaticComplexity > 30 or ILCyclomaticComplexity > 60 or ILNestingDepth > 6. Such method is typically hard to understand and maintain.

Maybe you are facing the God Method phenomenon. A "God Method" is a method that does way too many processes in the system and has grown beyond all logic to become The Method That Does Everything. When need for new processes increases suddenly some programmers realize: why should I create a new method for each processe if I can only add an if.

See the definition of the CyclomaticComplexity metric here: http://www.cppdepend.com/Metrics.aspx#CC

See the definition of the NestingDepth metric here http://www.cppdepend.com/Metrics.aspx#NestingDepth


• How to Fix Violations:

A large and complex method should be split in smaller methods, or even one or several classes can be created for that.

During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es).

Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests.

Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.

46 methods matched

methodsCyclomatic Complexity (CC)NestingDepthFull Name
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)1419cocos2d.PURendererTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)1237cocos2d.PUEmitterTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
_spSkeletonJson_readAnimation(spSkeletonJson*,Json*,spSkeletonData*)8011__Globals._spSkeletonJson_readAnimation(spSkeletonJson*,Json* ,spSkeletonData*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)667cocostudio.WidgetReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
parseProperties(cocos2d::Node*,cocos2d::Node*,cocosbuilder::CCBReader* )666cocosbuilder.NodeLoader.parseProperties(cocos2d::Node*,cocos2d::Node* ,cocosbuilder::CCBReader*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)647cocostudio.NodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
Next()607flatbuffers.Parser.Next()
spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)569__Globals.spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)5522cocos2d.PUMaterialPassTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)5513cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)528flatbuffers.__Globals.GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)4813cocos2d.PUTechniqueTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
startElement(void*,constchar*,constchar**)4810cocos2d.TMXMapInfo.startElement(void*,constchar*,constchar**)
SolveTOI(constb2TimeStep&)486b2World.SolveTOI(constb2TimeStep&)
parse(PUConcreteNodeList&,constPUScriptTokenList&)476cocos2d.PUScriptParser.parse(PUConcreteNodeList& ,constPUScriptTokenList&)
serialize(void*)4216cocostudio.ComRender.serialize(void*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)428cocos2d.PUDynamicAttributeTranslator.translate (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)416cocostudio.CheckBoxReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)416cocostudio.SliderReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
dispatchTouchEvent(cocos2d::EventTouch*)367cocos2d.EventDispatcher.dispatchTouchEvent(cocos2d::EventTouch*)
GenTable(constflatbuffers::Parser&,flatbuffers::StructDef& ,constflatbuffers::GeneratorOptions&,std::string*)367flatbuffers.cpp.__Globals.GenTable(constflatbuffers::Parser& ,flatbuffers::StructDef&,constflatbuffers::GeneratorOptions& ,std::string*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)366cocostudio.ButtonReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
readDataTask()356cocos2d.experimental.AudioCache.readDataTask()
buildJson(rapidjson::Document&,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)3212cocostudio.TriggerMng.buildJson(rapidjson::Document& ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
decodeFrame(tinyxml2::XMLElement*,tinyxml2::XMLElement* ,cocostudio::BoneData*,DataInfo*)3210cocostudio.DataReaderHelper.decodeFrame(tinyxml2::XMLElement* ,tinyxml2::XMLElement*,cocostudio::BoneData*,DataInfo*)
rotateBufferThread(int)326cocos2d.experimental.AudioPlayer.rotateBufferThread(int)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)317cocos2d.PUAffectorTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
readNodeGraph(cocos2d::Node*)317cocosbuilder.CCBReader.readNodeGraph(cocos2d::Node*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)298cocos2d.PUObserverTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
loadAnimationDataBinary(conststd::string&,cocos2d::Animation3DData*)276cocos2d.Bundle3D.loadAnimationDataBinary(conststd::string& ,cocos2d::Animation3DData*)
spAtlas_create(constchar*,int,constchar*,void*)276__Globals.spAtlas_create(constchar*,int,constchar*,void*)
onSocketCallback(structlibwebsocket_context*,structlibwebsocket*,int ,void*,void*,ssize_t)2610cocos2d.network.WebSocket.onSocketCallback(structlibwebsocket_context* ,structlibwebsocket*,int,void*,void*,ssize_t)
main(int,constchar**)266__Globals.main(int,constchar**)
addDataFromBinaryCache(constchar*,DataInfo*)257cocostudio.DataReaderHelper.addDataFromBinaryCache(constchar* ,DataInfo*)
decodeFrame(cocostudio::CocoLoader*,cocostudio::stExpCocoNode* ,DataInfo*)256cocostudio.DataReaderHelper.decodeFrame(cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*,DataInfo*)
lua_cocos2dx_RenderTexture_saveToFile(lua_State*)256__Globals.lua_cocos2dx_RenderTexture_saveToFile(lua_State*)
easeValue(float)246cocostudio.ActionFrameEasing.easeValue(float)
handle(cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)238cocos2d.PUDoEnableComponentEventHandler.handle (cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)
findNextFocusedWidget(cocos2d::ui::Widget::FocusDirection ,cocos2d::ui::Widget*)237cocos2d.ui.Layout.findNextFocusedWidget (cocos2d::ui::Widget::FocusDirection,cocos2d::ui::Widget*)
initWithDictionary(ValueMap&,conststd::string&)236cocos2d.ParticleSystem.initWithDictionary(ValueMap&,conststd::string&)
parseNodesRecursivelyBinary(bool&,bool)226cocos2d.Bundle3D.parseNodesRecursivelyBinary(bool&,bool)
generateTestFunctions()2129TouchEventDispatchingPerfTest.generateTestFunctions()
decodeBoneDisplay(cocostudio::CocoLoader*,cocostudio::stExpCocoNode* ,DataInfo*)218cocostudio.DataReaderHelper.decodeBoneDisplay(cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*,DataInfo*)
addDataFromJsonCache(conststd::string&,DataInfo*)216cocostudio.DataReaderHelper.addDataFromJsonCache(conststd::string& ,DataInfo*)
DrawDebugData()216b2World.DrawDebugData()
updateCamera(float)216Camera3DTestDemo.updateCamera(float)

Statistics

Stat   Cyclomatic Complexity (CC)   NestingDepth
Sum:1 906388
Average:41.438.43
Minimum:216
Maximum:14129
Standard deviation:24.334.34
Variance:591.9418.85
warningCritical    Critical Rule warning: Methods with too many parameters - critical
• Rule Description:

This rule matches methods with more than 8 parameters. Such method is painful to call and might degrade performance. See the definition of the NbParameters metric here: http://www.cppdepend.com/Metrics.aspx#NbParameters


• How to Fix Violations:

More properties/fields can be added to the declaring type to handle numerous states. An alternative is to provide a class or a structure dedicated to handle arguments passing.

11 methods matched

methods# ParametersFull Name
Mat4(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)16cocos2d.Mat4.Mat4(float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float,float)
set(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)16cocos2d.Mat4.set(float,float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float)
slerp(float,float,float,float,float,float,float,float,float,float* ,float*,float*,float*)13cocos2d.Quaternion.slerp(float,float,float,float,float,float,float ,float,float,float*,float*,float*,float*)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc,GLuint ,GLuint,GLenum,GLenum,ssize_t,constcocos2d::Mat4&,uint32_t)11cocos2d.MeshCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,GLuint,GLuint,GLenum,GLenum,ssize_t ,constcocos2d::Mat4&,uint32_t)
createLookAt(float,float,float,float,float,float,float,float,float ,cocos2d::Mat4*)10cocos2d.Mat4.createLookAt(float,float,float,float,float,float,float ,float,float,cocos2d::Mat4*)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc,GLuint ,GLuint,GLenum,GLenum,ssize_t,constcocos2d::Mat4&)10cocos2d.MeshCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,GLuint,GLuint,GLenum,GLenum,ssize_t ,constcocos2d::Mat4&)
distaa3(double*,double*,double*,int,int,int,int,int,int)9__Globals.distaa3(double*,double*,double*,int,int,int,int,int,int)
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)9cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
ccVertexLineIntersect(float,float,float,float,float,float,float,float ,float*)9cocos2d.__Globals.ccVertexLineIntersect(float,float,float,float,float ,float,float,float,float*)
TerrainData(constchar*,constchar*,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Size&,float,float)9cocos2d.Terrain+TerrainData.TerrainData(constchar*,constchar* ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Size&,float,float)
EventAssetsManagerEx(conststd::string& ,cocos2d::extension::AssetsManagerEx* ,constcocos2d::extension::EventAssetsManagerEx::EventCode&,float,float ,conststd::string&,conststd::string&,int,int)9cocos2d.extension.EventAssetsManagerEx.EventAssetsManagerEx (conststd::string&,cocos2d::extension::AssetsManagerEx* ,constcocos2d::extension::EventAssetsManagerEx::EventCode&,float,float ,conststd::string&,conststd::string&,int,int)

Statistics

Stat   # Parameters
Sum:121
Average:11
Minimum:9
Maximum:16
Standard deviation:2.63
Variance:6.91
warningCritical    Rule warning: Quick summary of methods to refactor
• Rule Description:

Methods matched by this rule somehow violate one or several basic quality principles, whether it is too large (too many lines of code), too complex (too many if, switch case, loops…) has too many variables, too many parameters or has too many overloads.


• How to Fix Violations:

To refactor such method and increase code quality and maintainability, certainly you'll have to split the method into several smaller methods or even create one or several classes to implement the logic.

During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es).

Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests.

Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.

1,907 methods matched

methods# lines of code (LOC)MaxNestedLoopCyclomatic Complexity (CC)NestingDepth# Parameters# Variables# OverloadsFull Name
ConvertUTF8toUTF16(constUTF8**,constUTF8*,UTF16**,UTF16* ,ConversionFlags)631175551__Globals.ConvertUTF8toUTF16(constUTF8**,constUTF8*,UTF16**,UTF16* ,ConversionFlags)
ConvertUTF8toUTF32(constUTF8**,constUTF8*,UTF32**,UTF32* ,ConversionFlags)511144551__Globals.ConvertUTF8toUTF32(constUTF8**,constUTF8*,UTF32**,UTF32* ,ConversionFlags)
ConvertUTF16toUTF8(constUTF16**,constUTF16*,UTF8**,UTF8* ,ConversionFlags)621173591__Globals.ConvertUTF16toUTF8(constUTF16**,constUTF16*,UTF8**,UTF8* ,ConversionFlags)
ConvertUTF32toUTF8(constUTF32**,constUTF32*,UTF8**,UTF8* ,ConversionFlags)481133571__Globals.ConvertUTF32toUTF8(constUTF32**,constUTF32*,UTF8**,UTF8* ,ConversionFlags)
ConvertUTF16toUTF32(constUTF16**,constUTF16*,UTF32**,UTF32* ,ConversionFlags)34193561__Globals.ConvertUTF16toUTF32(constUTF16**,constUTF16*,UTF32**,UTF32* ,ConversionFlags)
ConvertUTF32toUTF16(constUTF32**,constUTF32*,UTF16**,UTF16* ,ConversionFlags)35195541__Globals.ConvertUTF32toUTF16(constUTF32**,constUTF32*,UTF16**,UTF16* ,ConversionFlags)
isLegalUTF8(constUTF8*,int)400213221__Globals.isLegalUTF8(constUTF8*,int)
distaa3(double*,double*,double*,int,int,int,int,int,int)20052981__Globals.distaa3(double*,double*,double*,int,int,int,int,int,int)
edtaa3(double*,double*,double*,int,int,short*,short*,double*)29024258201__Globals.edtaa3(double*,double*,double*,int,int,short*,short*,double* )
main(int,constchar**)7922662201__Globals.main(int,constchar**)
XXH32_endian_align(constvoid*,int,U32,XXH_endianess,XXH_alignment)45144581__Globals.XXH32_endian_align(constvoid*,int,U32,XXH_endianess ,XXH_alignment)
XXH32_update_endian(void*,constvoid*,int,XXH_endianess)61053491__Globals.XXH32_update_endian(void*,constvoid*,int,XXH_endianess)
atitc_decode_block(uint8_t**,uint32_t*,unsignedint,bool,uint64_t ,ATITCDecodeFlag)672946191__Globals.atitc_decode_block(uint8_t**,uint32_t*,unsignedint,bool ,uint64_t,ATITCDecodeFlag)
etc1_decode_block(constetc1_byte*,etc1_byte*)270222161__Globals.etc1_decode_block(constetc1_byte*,etc1_byte*)
etc1_encode_image(constetc1_byte*,etc1_uint32,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_byte*)344966171__Globals.etc1_encode_image(constetc1_byte*,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_uint32,etc1_byte*)
etc1_decode_image(constetc1_byte*,etc1_byte*,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_uint32)294966151__Globals.etc1_decode_image(constetc1_byte*,etc1_byte*,etc1_uint32 ,etc1_uint32,etc1_uint32,etc1_uint32)
decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32,bool,bool )22153891__Globals.decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32 ,bool,bool)
etc_average_colors_subblock(constetc1_byte*,etc1_uint32,etc1_byte* ,bool,bool)3221055151__Globals.etc_average_colors_subblock(constetc1_byte*,etc1_uint32 ,etc1_byte*,bool,bool)
chooseModifier(constetc1_byte*,constetc1_byte*,etc1_uint32*,int ,constint*)261735151__Globals.chooseModifier(constetc1_byte*,constetc1_byte*,etc1_uint32* ,int,constint*)
etc_encode_subblock_helper(constetc1_byte*,etc1_uint32,etc_compressed* ,bool,bool,constetc1_byte*,constint*)2221057111__Globals.etc_encode_subblock_helper(constetc1_byte*,etc1_uint32 ,etc_compressed*,bool,bool,constetc1_byte*,constint*)
etc_encodeBaseColors(etc1_byte*,constetc1_byte*,etc_compressed*)400333221__Globals.etc_encodeBaseColors(etc1_byte*,constetc1_byte* ,etc_compressed*)
PVRDecompress(AMTC_BLOCK_STRUCT*,constbool,constint,constint,constint ,unsignedchar*)5941066251__Globals.PVRDecompress(AMTC_BLOCK_STRUCT*,constbool,constint,constint ,constint,unsignedchar*)
UnpackModulations(constAMTC_BLOCK_STRUCT*,constint,int(*)[16],int(* )[16],int,int)282115641__Globals.UnpackModulations(constAMTC_BLOCK_STRUCT*,constint,int(* )[16],int(*)[16],int,int)
InterpolateColours(constint*,constint*,constint*,constint*,constint ,constint,constint,int*)4021138101__Globals.InterpolateColours(constint*,constint*,constint*,constint* ,constint,constint,constint,int*)
GetModulationValue(int,int,constint,constint(*)[16],constint(*)[16] ,int*,int*)24073731__Globals.GetModulationValue(int,int,constint,constint(*)[16],constint (*)[16],int*,int*)
TwiddleUV(U32,U32,U32,U32)33163461__Globals.TwiddleUV(U32,U32,U32,U32)
s3tc_decode_block(uint8_t**,uint32_t*,unsignedint,bool,uint64_t ,S3TCDecodeFlag)622946181__Globals.s3tc_decode_block(uint8_t**,uint32_t*,unsignedint,bool ,uint64_t,S3TCDecodeFlag)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)3421252141ArmatureNodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)25043291ArmatureNodeReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
DlgProc(HWND,UINT,WPARAM,LPARAM)35210104131CWin32InputBox.DlgProc(HWND,UINT,WPARAM,LPARAM)
InitDialog()28143091CWin32InputBox.InitDialog()
InputBoxEx(WIN32INPUTBOX_PARAM*)410142171CWin32InputBox.InputBoxEx(WIN32INPUTBOX_PARAM*)
InputBox(LPCSTR,LPCSTR,std::string*,DWORD,bool,HWND)8011611CWin32InputBox.InputBox(LPCSTR,LPCSTR,std::string*,DWORD,bool,HWND)
ccpLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)1011601cocos2d.__Globals.ccpLineIntersect(constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,constcocos2d::Vec2&,float* ,float*)
CCAffineTransformMake(float,float,float,float,float,float)1011601cocos2d.__Globals.CCAffineTransformMake(float,float,float,float,float ,float)
unzGetCurrentFileInfo64(unzFile,unz_file_info64*,char*,uLong,void* ,uLong,char*,uLong)1011801cocos2d.__Globals.unzGetCurrentFileInfo64(unzFile,unz_file_info64* ,char*,uLong,void*,uLong,char*,uLong)
unzGetCurrentFileInfo(unzFile,unz_file_info*,char*,uLong,void*,uLong ,char*,uLong)19022821cocos2d.__Globals.unzGetCurrentFileInfo(unzFile,unz_file_info*,char* ,uLong,void*,uLong,char*,uLong)
unzOpenCurrentFile3(unzFile,int*,int*,int,constchar*)730174561cocos2d.__Globals.unzOpenCurrentFile3(unzFile,int*,int*,int,constchar* )
unzReadCurrentFile(unzFile,voidp,unsignedint)7822443121cocos2d.__Globals.unzReadCurrentFile(unzFile,voidp,unsignedint)
unz64local_getLong64(constzlib_filefunc64_32_def*,voidpf,ZPOS64_T*)31091331cocos2d.__Globals.unz64local_getLong64(constzlib_filefunc64_32_def* ,voidpf,ZPOS64_T*)
unz64local_SearchCentralDir(constzlib_filefunc64_32_def*,voidpf)352123281cocos2d.__Globals.unz64local_SearchCentralDir (constzlib_filefunc64_32_def*,voidpf)
unz64local_SearchCentralDir64(constzlib_filefunc64_32_def*,voidpf)5922332101cocos2d.__Globals.unz64local_SearchCentralDir64 (constzlib_filefunc64_32_def*,voidpf)
unzOpenInternal(constvoid*,zlib_filefunc64_32_def*,int)9303143101cocos2d.__Globals.unzOpenInternal(constvoid*,zlib_filefunc64_32_def* ,int)
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)132155139141cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
unz64local_CheckCurrentFileCoherencyHeader(unz64_s*,uInt*,ZPOS64_T* ,uInt*)490202461cocos2d.__Globals.unz64local_CheckCurrentFileCoherencyHeader(unz64_s* ,uInt*,ZPOS64_T*,uInt*)
getChildMap(std::map<int,std::vector<int>>&,cocos2d::SkinData* ,constrapidjson::Value&)281933101cocos2d.__Globals.getChildMap(std::map<int,std::vector<int>>& ,cocos2d::SkinData*,constrapidjson::Value&)
_getEigenVectors(cocos2d::Mat4*,cocos2d::Vec3*,cocos2d::Mat4)7071893211cocos2d.__Globals._getEigenVectors(cocos2d::Mat4*,cocos2d::Vec3* ,cocos2d::Mat4)
updateVertex(std::map<vertex_index,ssize_t>&,std::vector<float>& ,std::vector<float>&,std::vector<float>&,conststd::vector<float>& ,conststd::vector<float>&,conststd::vector<float>& ,constcocos2d::vertex_index&)17042821cocos2d.__Globals.updateVertex(std::map<vertex_index,ssize_t>& ,std::vector<float>&,std::vector<float>&,std::vector<float>& ,conststd::vector<float>&,conststd::vector<float>&,conststd::vector <float>&,constcocos2d::vertex_index&)
exportFaceGroupToShape(std::map<vertex_index,ssize_t>& ,ObjLoader::shapes_t&,conststd::vector<float>&,conststd::vector<float >&,conststd::vector<float>&,conststd::vector<std::vector<vertex_index> >&,constObjLoader::material_t&,conststd::string&)272438151cocos2d.__Globals.exportFaceGroupToShape(std::map<vertex_index,ssize_t >&,ObjLoader::shapes_t&,conststd::vector<float>&,conststd::vector <float>&,conststd::vector<float>&,conststd::vector<std::vector <vertex_index>>&,constObjLoader::material_t&,conststd::string&)
LoadMtl(std::map<std::string,ObjLoader::material_t>&,constchar* ,constchar*)12614633281cocos2d.__Globals.LoadMtl(std::map<std::string,ObjLoader::material_t>& ,constchar*,constchar*)
getImageData(cocos2d::Image*,Texture2D::PixelFormat&)411942161cocos2d.__Globals.getImageData(cocos2d::Image*,Texture2D::PixelFormat& )
_base64Decode(constunsignedchar*,unsignedint,unsignedchar* ,unsignedint*)441133491cocos2d.__Globals._base64Decode(constunsignedchar*,unsignedint ,unsignedchar*,unsignedint*)
printFileUtils(int)160121161cocos2d.__Globals.printFileUtils(int)
RectFromString(conststd::string&)291341141cocos2d.__Globals.RectFromString(conststd::string&)
tgaLoadBuffer(unsignedchar*,long)35094241cocos2d.__Globals.tgaLoadBuffer(unsignedchar*,long)
tgaLoadRLEImageData(unsignedchar*,unsignedlong,tImageTGA*)301643101cocos2d.__Globals.tgaLoadRLEImageData(unsignedchar*,unsignedlong ,tImageTGA*)
ccDrawCircle(constcocos2d::Vec2&,float,float,unsignedint,bool,float ,float)1011702cocos2d.__Globals.ccDrawCircle(constcocos2d::Vec2&,float,float ,unsignedint,bool,float,float)
ccDrawSolidCircle(constcocos2d::Vec2&,float,float,unsignedint,float ,float)1011602cocos2d.__Globals.ccDrawSolidCircle(constcocos2d::Vec2&,float,float ,unsignedint,float,float)
kmMat4OrthographicProjection(cocos2d::Mat4*,float,float,float,float ,float,float)2011701cocos2d.__Globals.kmMat4OrthographicProjection(cocos2d::Mat4*,float ,float,float,float,float,float)
visitArray(constValueVector&)180331101cocos2d.__Globals.visitArray(constValueVector&)
ccdictionary_to_valuemap(cocos2d::__Dictionary*)3201041121cocos2d.__Globals.ccdictionary_to_valuemap(cocos2d::__Dictionary*)
ccarray_to_valuevector(cocos2d::__Array*)290931101cocos2d.__Globals.ccarray_to_valuevector(cocos2d::__Array*)
__CCAffineTransformMake(float,float,float,float,float,float)8011611cocos2d.__Globals.__CCAffineTransformMake(float,float,float,float ,float,float)
RectApplyAffineTransform(constcocos2d::Rect& ,constcocos2d::AffineTransform&)130112121cocos2d.__Globals.RectApplyAffineTransform(constcocos2d::Rect& ,constcocos2d::AffineTransform&)
RectApplyTransform(constcocos2d::Rect&,constcocos2d::Mat4&)170112121cocos2d.__Globals.RectApplyTransform(constcocos2d::Rect& ,constcocos2d::Mat4&)
ccVertexLineToPolygon(cocos2d::Vec2*,float,cocos2d::Vec2*,unsignedint ,unsignedint)4511235181cocos2d.__Globals.ccVertexLineToPolygon(cocos2d::Vec2*,float ,cocos2d::Vec2*,unsignedint,unsignedint)
ccVertexLineIntersect(float,float,float,float,float,float,float,float ,float*)22031941cocos2d.__Globals.ccVertexLineIntersect(float,float,float,float,float ,float,float,float,float*)
isOneDimensionSegmentOverlap(float,float,float,float,float*,float*)230113641cocos2d.__Globals.isOneDimensionSegmentOverlap(float,float,float,float ,float*,float*)
getData(conststd::string&,bool)35063282cocos2d.__Globals.getData(conststd::string&,bool)
glew_dynamic_binding()46045011cocos2d.__Globals.glew_dynamic_binding()
getData(conststd::string&,bool)390842112cocos2d.__Globals.getData(conststd::string&,bool)
ccCardinalSplineAt(cocos2d::Vec2&,cocos2d::Vec2&,cocos2d::Vec2& ,cocos2d::Vec2&,float,float)10011691cocos2d.__Globals.ccCardinalSplineAt(cocos2d::Vec2&,cocos2d::Vec2& ,cocos2d::Vec2&,cocos2d::Vec2&,float,float)
makeDistanceMap(unsignedchar*,long,long)4521133131cocos2d.__Globals.makeDistanceMap(unsignedchar*,long,long)
listenOnTCP(int)5301341141cocos2d.Console.listenOnTCP(int)
loop()4911560261cocos2d.Console.loop()
parseCommand(int)5011141161cocos2d.Console.parseCommand(int)
commandResolution(int,conststd::string&)160232121cocos2d.Console.commandResolution(int,conststd::string&)
commandTouch(int,conststd::string&)7011872241cocos2d.Console.commandTouch(int,conststd::string&)
commandUpload(int)4121351201cocos2d.Console.commandUpload(int)
isLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)10052611cocos2d.Vec2.isLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)
isSegmentOverlap(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,cocos2d::Vec2*,cocos2d::Vec2* )3022601cocos2d.Vec2.isSegmentOverlap(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,cocos2d::Vec2*,cocos2d::Vec2* )
Mat4(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)10111604cocos2d.Mat4.Mat4(float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float,float)
createLookAt(float,float,float,float,float,float,float,float,float ,cocos2d::Mat4*)300111062cocos2d.Mat4.createLookAt(float,float,float,float,float,float,float ,float,float,cocos2d::Mat4*)
createOrthographicOffCenter(float,float,float,float,float,float ,cocos2d::Mat4*)15011701cocos2d.Mat4.createOrthographicOffCenter(float,float,float,float,float ,float,cocos2d::Mat4*)
createRotation(constcocos2d::Quaternion&,cocos2d::Mat4*)290112122cocos2d.Mat4.createRotation(constcocos2d::Quaternion&,cocos2d::Mat4*)
createRotation(constcocos2d::Vec3&,float,cocos2d::Mat4*)400333162cocos2d.Mat4.createRotation(constcocos2d::Vec3&,float,cocos2d::Mat4*)
decompose(cocos2d::Vec3*,cocos2d::Quaternion*,cocos2d::Vec3*)6301033131cocos2d.Mat4.decompose(cocos2d::Vec3*,cocos2d::Quaternion* ,cocos2d::Vec3*)
determinant()130110121cocos2d.Mat4.determinant()
inverse()340210141cocos2d.Mat4.inverse()
set(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)160111603cocos2d.Mat4.set(float,float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float)
squad(constcocos2d::Quaternion&,constcocos2d::Quaternion& ,constcocos2d::Quaternion&,constcocos2d::Quaternion&,float ,cocos2d::Quaternion*)6011621cocos2d.Quaternion.squad(constcocos2d::Quaternion& ,constcocos2d::Quaternion&,constcocos2d::Quaternion& ,constcocos2d::Quaternion&,float,cocos2d::Quaternion*)
slerp(float,float,float,float,float,float,float,float,float,float* ,float*,float*,float*)6306213182cocos2d.Quaternion.slerp(float,float,float,float,float,float,float ,float,float,float*,float*,float*,float*)
unionWithRect(constcocos2d::Rect&)210521121cocos2d.Rect.unionWithRect(constcocos2d::Rect&)
initWithData(constvoid*,ssize_t,Texture2D::PixelFormat,int,int ,constcocos2d::Size&)5011611cocos2d.Texture2D.initWithData(constvoid*,ssize_t ,Texture2D::PixelFormat,int,int,constcocos2d::Size&)
initWithMipmaps(MipmapInfo*,int,Texture2D::PixelFormat,int,int)6711814591cocos2d.Texture2D.initWithMipmaps(MipmapInfo*,int ,Texture2D::PixelFormat,int,int)
initWithImage(cocos2d::Image*,cocos2d::Texture2D::PixelFormat)340952112cocos2d.Texture2D.initWithImage(cocos2d::Image* ,cocos2d::Texture2D::PixelFormat)
initWithString(constchar*,conststd::string&,float,constcocos2d::Size& ,cocos2d::TextHAlignment,cocos2d::TextVAlignment)10011612cocos2d.Texture2D.initWithString(constchar*,conststd::string&,float ,constcocos2d::Size&,cocos2d::TextHAlignment,cocos2d::TextVAlignment)
initWithString(constchar*,constcocos2d::FontDefinition&)3701322122cocos2d.Texture2D.initWithString(constchar* ,constcocos2d::FontDefinition&)
convertDataToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,cocos2d::Texture2D::PixelFormat ,unsignedchar**,ssize_t*)18072601cocos2d.Texture2D.convertDataToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,cocos2d::Texture2D::PixelFormat ,unsignedchar**,ssize_t*)
convertI8ToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,unsignedchar**,ssize_t*)38093501cocos2d.Texture2D.convertI8ToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,unsignedchar**,ssize_t*)

Statistics

Stat   # lines of code (LOC)   MaxNestedLoop   Cyclomatic Complexity (CC)   NestingDepth   # Parameters   # Variables   # Overloads
Sum:79 43485615 9636 3403 23520 7773 176
Average:41.650.458.373.321.710.91.67
Minimum:0010001
Maximum:290914129168716
Standard deviation:31.070.789.362.061.939.262.26
Variance:965.30.6187.524.233.7285.695.09
warningCritical    Rule warning: Methods too big
• Rule Description:

This rule matches methods where NbLinesOfCode > 30 or (commented per default) NbILInstructions > 200. Such method can be hard to understand and maintain.

However rules like Methods too complex or Methods with too many variables might be more relevant to detect painful to maintain methods, because complexity is more related to numbers of if, switch case, loops… than to just number of lines.

See the definition of the NbLinesOfCode metric here http://www.cppdepend.com/Metrics.aspx#NbLinesOfCode


• How to Fix Violations:

Usually too big methods should be split in smaller methods.

But long methods with no branch conditions, that typically initialize some data, are not necessarily a problem to maintain nor to test, and might not need refactoring.

1,304 methods matched

methods# lines of code (LOC)Full Name
edtaa3(double*,double*,double*,int,int,short*,short*,double*)290__Globals.edtaa3(double*,double*,double*,int,int,short*,short*,double* )
spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)273__Globals.spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)269cocos2d.PUEmitterTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
register_all_cocos2dx(lua_State*)256__Globals.register_all_cocos2dx(lua_State*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)255cocos2d.PURendererTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
_spSkeletonJson_readAnimation(spSkeletonJson*,Json*,spSkeletonData*)241__Globals._spSkeletonJson_readAnimation(spSkeletonJson*,Json* ,spSkeletonData*)
parse(PUConcreteNodeList&,constPUScriptTokenList&)239cocos2d.PUScriptParser.parse(PUConcreteNodeList& ,constPUScriptTokenList&)
Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)230b2EPCollider.Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)
startElement(void*,constchar*,constchar**)223cocos2d.TMXMapInfo.startElement(void*,constchar*,constchar**)
GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)216flatbuffers.__Globals.GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)
onEnter()211TemplateVectorTest.onEnter()
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)194cocostudio.CheckBoxReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)194cocostudio.SliderReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)193cocostudio.ButtonReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)184cocostudio.WidgetReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
parseProperties(cocos2d::Node*,cocos2d::Node*,cocosbuilder::CCBReader* )183cocosbuilder.NodeLoader.parseProperties(cocos2d::Node*,cocos2d::Node* ,cocosbuilder::CCBReader*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)178cocostudio.NodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
generateTestFunctions()173TouchEventDispatchingPerfTest.generateTestFunctions()
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)170cocostudio.ButtonReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
Next()165flatbuffers.Parser.Next()
tolua_opengl_open(lua_State*)161__Globals.tolua_opengl_open(lua_State*)
createSlicedSprites()160cocos2d.ui.Scale9Sprite.createSlicedSprites()
serialize(void*)159cocostudio.ComRender.serialize(void*)
lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)158__Globals.lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)
caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)157cocos2d.ui.RelativeLayoutManager .caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)
SolveTOI(constb2TimeStep&)152b2World.SolveTOI(constb2TimeStep&)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)151cocostudio.ListViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)146cocostudio.ScrollViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
tolua_cocos2d_Mat4_decompose(lua_State*)144__Globals.tolua_cocos2d_Mat4_decompose(lua_State*)
scrollChildrenBoth(float,float)143cocos2d.ui.ScrollView.scrollChildrenBoth(float,float)
onEnter()142PhysicsDemoJoints.onEnter()
lua_cocos2dx_Texture2D_initWithString(lua_State*)142__Globals.lua_cocos2dx_Texture2D_initWithString(lua_State*)
updateIndicesLOD()141cocos2d.Terrain+Chunk.updateIndicesLOD()
lua_register_cocos2dx_Node(lua_State*)140__Globals.lua_register_cocos2dx_Node(lua_State*)
Car()139Car.Car()
onEnter()134TemplateMapTest.onEnter()
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)132cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
GenTable(constflatbuffers::Parser&,flatbuffers::StructDef& ,constflatbuffers::GeneratorOptions&,std::string*)131flatbuffers.cpp.__Globals.GenTable(constflatbuffers::Parser& ,flatbuffers::StructDef&,constflatbuffers::GeneratorOptions& ,std::string*)
RootTests()130RootTests.RootTests()
SpriteTests()129SpriteTests.SpriteTests()
CharacterCollision()127CharacterCollision.CharacterCollision()
LoadMtl(std::map<std::string,ObjLoader::material_t>&,constchar* ,constchar*)126cocos2d.__Globals.LoadMtl(std::map<std::string,ObjLoader::material_t>& ,constchar*,constchar*)
initWithDictionary(ValueMap&,conststd::string&)126cocos2d.ParticleSystem.initWithDictionary(ValueMap&,conststd::string&)
Texture2DTests()125Texture2DTests.Texture2DTests()
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)124cocostudio.CheckBoxReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)124cocostudio.SliderReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)123cocostudio.LayoutReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)123cocostudio.PageViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
lua_cocos2dx_RenderTexture_saveToFile(lua_State*)123__Globals.lua_cocos2dx_RenderTexture_saveToFile(lua_State*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)120cocos2d.PUForceFieldAffectorTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
buildJson(rapidjson::Document&,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)120cocostudio.TriggerMng.buildJson(rapidjson::Document& ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
readDataTask()119cocos2d.experimental.AudioCache.readDataTask()
SolveVelocityConstraints()119b2ContactSolver.SolveVelocityConstraints()
Step(Settings*)119Test.Step(Settings*)
lua_cocos2dx_LabelTTF_create(lua_State*)119__Globals.lua_cocos2dx_LabelTTF_create(lua_State*)
Dominos()118Dominos.Dominos()
LoadObj(shapes_t&,constchar*,constchar*)115cocos2d.ObjLoader.LoadObj(shapes_t&,constchar*,constchar*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)114cocostudio.TextReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
register_all_cocos2dx_physics_manual(lua_State*)114__Globals.register_all_cocos2dx_physics_manual(lua_State*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)113cocos2d.PUMaterialPassTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State*)113__Globals.lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State*)
openLexer(conststd::string&,conststd::string&,PUScriptTokenList&)111cocos2d.PUScriptLexer.openLexer(conststd::string&,conststd::string& ,PUScriptTokenList&)
tweenTo(float,cocos2d::tweenfunc::TweenType,float*)111cocos2d.tweenfunc.__Globals.tweenTo(float ,cocos2d::tweenfunc::TweenType,float*)
onSocketCallback(structlibwebsocket_context*,structlibwebsocket*,int ,void*,void*,ssize_t)111cocos2d.network.WebSocket.onSocketCallback(structlibwebsocket_context* ,structlibwebsocket*,int,void*,void*,ssize_t)
ParseNumber<parseFlags,Stream,Handler>(Stream&,Handler&)111rapidjson.GenericReader<Encoding,Allocator>.ParseNumber<parseFlags ,Stream,Handler>(Stream&,Handler&)
generateTestFunctions()111TemplateVectorPerfTest.generateTestFunctions()
test(float)111NodeNameTest.test(float)
lua_cocos2dx_ui_CheckBox_create(lua_State*)111__Globals.lua_cocos2dx_ui_CheckBox_create(lua_State*)
lua_cocos2dx_extension_ControlSlider_create(lua_State*)110__Globals.lua_cocos2dx_extension_ControlSlider_create(lua_State*)
initWithQuantityOfNodes(unsignedint)109PerformanceEventDispatcherScene.initWithQuantityOfNodes(unsignedint)
drawSkeleton(constcocos2d::Mat4&,uint32_t)108spine.SkeletonRenderer.drawSkeleton(constcocos2d::Mat4&,uint32_t)
Cantilever()106Cantilever.Cantilever()
DumpShell()106DumpShell.DumpShell()
decodeFrame(tinyxml2::XMLElement*,tinyxml2::XMLElement* ,cocostudio::BoneData*,DataInfo*)105cocostudio.DataReaderHelper.decodeFrame(tinyxml2::XMLElement* ,tinyxml2::XMLElement*,cocostudio::BoneData*,DataInfo*)
spAtlas_create(constchar*,int,constchar*,void*)105__Globals.spAtlas_create(constchar*,int,constchar*,void*)
rotateBufferThread(int)104cocos2d.experimental.AudioPlayer.rotateBufferThread(int)
getEasingAction(cocos2d::ActionInterval*)104cocostudio.ActionFrame.getEasingAction(cocos2d::ActionInterval*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)104cocostudio.ListViewReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
lua_register_cocos2dx_ParticleSystem(lua_State*)104__Globals.lua_register_cocos2dx_ParticleSystem(lua_State*)
render(cocos2d::Renderer*,constcocos2d::Mat4& ,cocos2d::ParticleSystem3D*)103cocos2d.PUParticle3DQuadRender.render(cocos2d::Renderer* ,constcocos2d::Mat4&,cocos2d::ParticleSystem3D*)
lua_cocos2dx_ui_EditBox_create(lua_State*)103__Globals.lua_cocos2dx_ui_EditBox_create(lua_State*)
lua_cocos2dx_LabelBMFont_create(lua_State*)103__Globals.lua_cocos2dx_LabelBMFont_create(lua_State*)
initWithPVRv3Data(constunsignedchar*,ssize_t)102cocos2d.Image.initWithPVRv3Data(constunsignedchar*,ssize_t)
initWithBinary(cocostudio::CocoLoader*,cocostudio::stExpCocoNode* ,cocos2d::Ref*)102cocostudio.ActionNode.initWithBinary(cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*,cocos2d::Ref*)
Solve(b2Profile*,constb2TimeStep&,constb2Vec2&,bool)102b2Island.Solve(b2Profile*,constb2TimeStep&,constb2Vec2&,bool)
ActionsTests()101ActionsTests.ActionsTests()
createOptionsWithFlatBuffersForNode(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)100cocostudio.Node3DReader.createOptionsWithFlatBuffersForNode (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
initWithQuantityOfNodes(unsignedint)100PerformanceContainerScene.initWithQuantityOfNodes(unsignedint)
readNodeGraph(cocos2d::Node*)99cocosbuilder.CCBReader.readNodeGraph(cocos2d::Node*)
Web()99Web.Web()
ParticleTests()98ParticleTests.ParticleTests()
lua_cocos2dx_RenderTexture_beginWithClear(lua_State*)98__Globals.lua_cocos2dx_RenderTexture_beginWithClear(lua_State*)
dispatchTouchEvent(cocos2d::EventTouch*)97cocos2d.EventDispatcher.dispatchTouchEvent(cocos2d::EventTouch*)
createStringSprites(cocos2d::Label*)97cocos2d.LabelTextFormatter.createStringSprites(cocos2d::Label*)
groupBatchDownload(constDownloadUnits&)97cocos2d.extension.Downloader.groupBatchDownload(constDownloadUnits&)
generateTestFunctions()97ArrayPerfTest.generateTestFunctions()
lua_cocos2dx_ui_Scale9Sprite_init(lua_State*)97__Globals.lua_cocos2dx_ui_Scale9Sprite_init(lua_State*)
b2TimeOfImpact(b2TOIOutput*,constb2TOIInput*)96__Globals.b2TimeOfImpact(b2TOIOutput*,constb2TOIInput*)
parseNodesRecursivelyBinary(bool&,bool)94cocos2d.Bundle3D.parseNodesRecursivelyBinary(bool&,bool)
applicationDidFinishLaunching()94AppDelegate.applicationDidFinishLaunching()

Statistics

Stat   # lines of code (LOC)
Sum:69 561
Average:53.34
Minimum:31
Maximum:290
Standard deviation:30.68
Variance:941.23
warningCritical    Rule warning: Methods too complex
• Rule Description:

This rule matches methods where CyclomaticComplexity > 20 or ILCyclomaticComplexity > 40 or ILNestingDepth > 4. Such method is typically hard to understand and maintain.

See the definition of the CyclomaticComplexity metric here: http://www.cppdepend.com/Metrics.aspx#CC

See the definition of the NestingDepth metric here: http://www.cppdepend.com/Metrics.aspx#NestingDepth


• How to Fix Violations:

A large and complex method should be split in smaller methods, or even one or several classes can be created for that.

During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es).

Large switch…case structures might be refactored through the help of a set of types that implement a common interface, the interface polymorphism playing the role of the switch cases tests.

Unit Tests can help: write tests for each method before extracting it to ensure you don't break functionality.

269 methods matched

methodsCyclomatic Complexity (CC)MaxNestedLoopNestingDepthFull Name
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)14119cocos2d.PURendererTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)12317cocos2d.PUEmitterTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
_spSkeletonJson_readAnimation(spSkeletonJson*,Json*,spSkeletonData*)80911__Globals._spSkeletonJson_readAnimation(spSkeletonJson*,Json* ,spSkeletonData*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)6627cocostudio.WidgetReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)6625cocostudio.ButtonReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
parseProperties(cocos2d::Node*,cocos2d::Node*,cocosbuilder::CCBReader* )6616cocosbuilder.NodeLoader.parseProperties(cocos2d::Node*,cocos2d::Node* ,cocosbuilder::CCBReader*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)6427cocostudio.NodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
Next()6027flatbuffers.Parser.Next()
spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)5659__Globals.spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)55222cocos2d.PUMaterialPassTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)55113cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)5228flatbuffers.__Globals.GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)5225cocostudio.ScrollViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)5225cocostudio.ListViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
SolveTOI(constb2TimeStep&)4836b2World.SolveTOI(constb2TimeStep&)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)48113cocos2d.PUTechniqueTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
startElement(void*,constchar*,constchar**)48110cocos2d.TMXMapInfo.startElement(void*,constchar*,constchar**)
caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)4804cocos2d.ui.RelativeLayoutManager .caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)
parse(PUConcreteNodeList&,constPUScriptTokenList&)4726cocos2d.PUScriptParser.parse(PUConcreteNodeList& ,constPUScriptTokenList&)
LoadMtl(std::map<std::string,ObjLoader::material_t>&,constchar* ,constchar*)4613cocos2d.__Globals.LoadMtl(std::map<std::string,ObjLoader::material_t>& ,constchar*,constchar*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)4525cocostudio.TextReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)4505cocos2d.PUForceFieldAffectorTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
wstrerror(int)4402__Globals.wstrerror(int)
serialize(void*)42216cocostudio.ComRender.serialize(void*)
edtaa3(double*,double*,double*,int,int,short*,short*,double*)4225__Globals.edtaa3(double*,double*,double*,int,int,short*,short*,double* )
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)4225cocostudio.LayoutReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)4225cocostudio.PageViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)4218cocos2d.PUDynamicAttributeTranslator.translate (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
ParseNumber<parseFlags,Stream,Handler>(Stream&,Handler&)4215rapidjson.GenericReader<Encoding,Allocator>.ParseNumber<parseFlags ,Stream,Handler>(Stream&,Handler&)
scrollChildrenBoth(float,float)4204cocos2d.ui.ScrollView.scrollChildrenBoth(float,float)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)4106cocostudio.CheckBoxReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)4106cocostudio.SliderReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)3814b2EPCollider.Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)
Solve(constb2TimeStep&)3735b2World.Solve(constb2TimeStep&)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)3725cocostudio.CheckBoxReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)3704cocos2d.PUDoPlacementParticleEventHandlerTranslator .translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
tweenTo(float,cocos2d::tweenfunc::TweenType,float*)3704cocos2d.tweenfunc.__Globals.tweenTo(float ,cocos2d::tweenfunc::TweenType,float*)
GenTable(constflatbuffers::Parser&,flatbuffers::StructDef& ,constflatbuffers::GeneratorOptions&,std::string*)3627flatbuffers.cpp.__Globals.GenTable(constflatbuffers::Parser& ,flatbuffers::StructDef&,constflatbuffers::GeneratorOptions& ,std::string*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)3625cocostudio.SliderReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
dispatchTouchEvent(cocos2d::EventTouch*)3617cocos2d.EventDispatcher.dispatchTouchEvent(cocos2d::EventTouch*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)3606cocostudio.ButtonReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
readDataTask()3516cocos2d.experimental.AudioCache.readDataTask()
openLexer(conststd::string&,conststd::string&,PUScriptTokenList&)3515cocos2d.PUScriptLexer.openLexer(conststd::string&,conststd::string& ,PUScriptTokenList&)
lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)3504__Globals.lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)
refreshLayout()3503cocos2d.ui.LayoutComponent.refreshLayout()
getEasingAction(cocos2d::ActionInterval*)3503cocostudio.ActionFrame.getEasingAction(cocos2d::ActionInterval*)
LoadObj(shapes_t&,constchar*,constchar*)3424cocos2d.ObjLoader.LoadObj(shapes_t&,constchar*,constchar*)
Parse(constchar*,constchar**,constchar*)3325flatbuffers.Parser.Parse(constchar*,constchar**,constchar*)
buildJson(rapidjson::Document&,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)32612cocostudio.TriggerMng.buildJson(rapidjson::Document& ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
rotateBufferThread(int)3226cocos2d.experimental.AudioPlayer.rotateBufferThread(int)
decodeFrame(tinyxml2::XMLElement*,tinyxml2::XMLElement* ,cocostudio::BoneData*,DataInfo*)32010cocostudio.DataReaderHelper.decodeFrame(tinyxml2::XMLElement* ,tinyxml2::XMLElement*,cocostudio::BoneData*,DataInfo*)
readNodeGraph(cocos2d::Node*)3137cocosbuilder.CCBReader.readNodeGraph(cocos2d::Node*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)3127cocos2d.PUAffectorTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
checkCustomScrollDestination(float*,float*)3105cocos2d.ui.ScrollView.checkCustomScrollDestination(float*,float*)
unzOpenInternal(constvoid*,zlib_filefunc64_32_def*,int)3104cocos2d.__Globals.unzOpenInternal(constvoid*,zlib_filefunc64_32_def* ,int)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)3104cocos2d.PURandomiserTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)2918cocos2d.PUObserverTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2904cocos2d.PUCircleEmitterTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
lua_cocos2dx_Texture2D_initWithString(lua_State*)2904__Globals.lua_cocos2dx_Texture2D_initWithString(lua_State*)
loadDefaultGLProgram(cocos2d::GLProgram*,int)2903cocos2d.GLProgramCache.loadDefaultGLProgram(cocos2d::GLProgram*,int)
updateIndicesLOD()2824cocos2d.Terrain+Chunk.updateIndicesLOD()
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2805cocos2d.PUTextureAnimatorTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
tolua_cocos2d_Layer_registerScriptTouchHandler(lua_State*)2804__Globals.tolua_cocos2d_Layer_registerScriptTouchHandler(lua_State*)
handleEvent(ScriptHandlerMgr::HandlerType,void*)2803cocos2d.LuaEngine.handleEvent(ScriptHandlerMgr::HandlerType,void*)
loadAnimationDataBinary(conststd::string&,cocos2d::Animation3DData*)2736cocos2d.Bundle3D.loadAnimationDataBinary(conststd::string& ,cocos2d::Animation3DData*)
spAtlas_create(constchar*,int,constchar*,void*)2716__Globals.spAtlas_create(constchar*,int,constchar*,void*)
setPropsFromBinary(cocos2d::ui::Widget*,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)2714cocostudio.LayoutReader.setPropsFromBinary(cocos2d::ui::Widget* ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
deallocate(void*,size_t)2704cocos2d.allocator.AllocatorStrategyGlobalSmallBlock.deallocate(void* ,size_t)
getTranslator(conststd::string&)2702cocos2d.PUAffectorManager.getTranslator(conststd::string&)
createAffector(conststd::string&)2702cocos2d.PUAffectorManager.createAffector(conststd::string&)
main(int,constchar**)2626__Globals.main(int,constchar**)
onSocketCallback(structlibwebsocket_context*,structlibwebsocket*,int ,void*,void*,ssize_t)26110cocos2d.network.WebSocket.onSocketCallback(structlibwebsocket_context* ,structlibwebsocket*,int,void*,void*,ssize_t)
createStringSprites(cocos2d::Label*)2615cocos2d.LabelTextFormatter.createStringSprites(cocos2d::Label*)
parse_string(Json*,constchar*)2615__Globals.parse_string(Json*,constchar*)
lua_cocos2dx_LabelTTF_create(lua_State*)2604__Globals.lua_cocos2dx_LabelTTF_create(lua_State*)
addDataFromBinaryCache(constchar*,DataInfo*)2527cocostudio.DataReaderHelper.addDataFromBinaryCache(constchar* ,DataInfo*)
decodeFrame(cocostudio::CocoLoader*,cocostudio::stExpCocoNode* ,DataInfo*)2526cocostudio.DataReaderHelper.decodeFrame(cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*,DataInfo*)
createOptionsWithFlatBuffersForNode(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)2525cocostudio.Node3DReader.createOptionsWithFlatBuffersForNode (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
initWithPVRv3Data(constunsignedchar*,ssize_t)2515cocos2d.Image.initWithPVRv3Data(constunsignedchar*,ssize_t)
lua_cocos2dx_RenderTexture_saveToFile(lua_State*)2506__Globals.lua_cocos2dx_RenderTexture_saveToFile(lua_State*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2504cocos2d.PULineAffectorTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2504cocos2d.PULineEmitterTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
spAnimationState_apply(spAnimationState*,structspSkeleton*)2425__Globals.spAnimationState_apply(spAnimationState*,structspSkeleton*)
unzReadCurrentFile(unzFile,voidp,unsignedint)2424cocos2d.__Globals.unzReadCurrentFile(unzFile,voidp,unsignedint)
easeValue(float)2406cocostudio.ActionFrameEasing.easeValue(float)
lua_cocos2dx_ui_CheckBox_create(lua_State*)2404__Globals.lua_cocos2dx_ui_CheckBox_create(lua_State*)
caculateFinalPositionWithRelativeAlign()2402cocos2d.ui.RelativeLayoutManager .caculateFinalPositionWithRelativeAlign()
unz64local_SearchCentralDir64(constzlib_filefunc64_32_def*,voidpf)2323cocos2d.__Globals.unz64local_SearchCentralDir64 (constzlib_filefunc64_32_def*,voidpf)
handle(cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)2308cocos2d.PUDoEnableComponentEventHandler.handle (cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)
findNextFocusedWidget(cocos2d::ui::Widget::FocusDirection ,cocos2d::ui::Widget*)2307cocos2d.ui.Layout.findNextFocusedWidget (cocos2d::ui::Widget::FocusDirection,cocos2d::ui::Widget*)
initWithDictionary(ValueMap&,conststd::string&)2306cocos2d.ParticleSystem.initWithDictionary(ValueMap&,conststd::string&)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2305cocos2d.PUBaseColliderTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
onChangeLayoutComponent(cocos2d::Ref*)2303UILayoutComponentTest_Editor.onChangeLayoutComponent(cocos2d::Ref*)
tolua_cocos2d_Mat4_decompose(lua_State*)2303__Globals.tolua_cocos2d_Mat4_decompose(lua_State*)
createEffect(int,float)2302__Globals.createEffect(int,float)
parseNodesRecursivelyBinary(bool&,bool)2236cocos2d.Bundle3D.parseNodesRecursivelyBinary(bool&,bool)
initWithPngData(constunsignedchar*,ssize_t)2214cocos2d.Image.initWithPngData(constunsignedchar*,ssize_t)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2205cocos2d.PUOnPositionObserverTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
translateChildProperty(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)2204cocos2d.PUBoxColliderTranslator.translateChildProperty (cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)
marchSquare(int,int)2204cocos2d.MarchingSquare.marchSquare(int,int)

Statistics

Stat   Cyclomatic Complexity (CC)   MaxNestedLoop   NestingDepth
Sum:5 8962651 775
Average:21.920.996.6
Minimum:202
Maximum:141929
Standard deviation:16.651.252.86
Variance:277.161.578.2
warningCritical    Rule warning: Methods potentially poorly commented
• Rule Description:

This rule matches methods with less than 20% of comment lines and that have at least 20 lines of code. Such method might need to be more commented.

See the definitions of the Comments metric here: http://www.cppdepend.com/Metrics.aspx#PercentageComment http://www.cppdepend.com/Metrics.aspx#NbLinesOfComment


• How to Fix Violations:

Typically add more comment. But code commenting is subject to controversy. While poorly written and designed code would needs a lot of comment to be understood, clean code doesn't need that much comment, especially if variables and methods are properly named and convey enough information. Unit-Test code can also play the role of code commenting.

However, even when writing clean and well-tested code, one will have to write hacks at a point, usually to circumvent some API limitations or bugs. A hack is a non-trivial piece of code, that doesn't make sense at first glance, and that took time and web research to be found. In such situation comments must absolutely be used to express the intention, the need for the hacks and the source where the solution has been found.

4,445 methods matched

methodsPercentage Comment# lines of code (LOC)# lines of commentFull Name
XXH32_intermediateDigest_endian(void*,XXH_endianess)0230__Globals.XXH32_intermediateDigest_endian(void*,XXH_endianess)
decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32,bool,bool )0220__Globals.decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32 ,bool,bool)
etc_average_colors_subblock(constetc1_byte*,etc1_uint32,etc1_byte* ,bool,bool)0320__Globals.etc_average_colors_subblock(constetc1_byte*,etc1_uint32 ,etc1_byte*,bool,bool)
chooseModifier(constetc1_byte*,constetc1_byte*,etc1_uint32*,int ,constint*)0260__Globals.chooseModifier(constetc1_byte*,constetc1_byte*,etc1_uint32* ,int,constint*)
etc_encode_subblock_helper(constetc1_byte*,etc1_uint32,etc_compressed* ,bool,bool,constetc1_byte*,constint*)0220__Globals.etc_encode_subblock_helper(constetc1_byte*,etc1_uint32 ,etc_compressed*,bool,bool,constetc1_byte*,constint*)
etc_encode_block_helper(constetc1_byte*,etc1_uint32,constetc1_byte* ,etc_compressed*,bool)0260__Globals.etc_encode_block_helper(constetc1_byte*,etc1_uint32 ,constetc1_byte*,etc_compressed*,bool)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)0340ArmatureNodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)0250ArmatureNodeReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
unz64local_getLong64(constzlib_filefunc64_32_def*,voidpf,ZPOS64_T*)0310cocos2d.__Globals.unz64local_getLong64(constzlib_filefunc64_32_def* ,voidpf,ZPOS64_T*)
_getEigenVectors(cocos2d::Mat4*,cocos2d::Vec3*,cocos2d::Mat4)0700cocos2d.__Globals._getEigenVectors(cocos2d::Mat4*,cocos2d::Vec3* ,cocos2d::Mat4)
_base64Decode(constunsignedchar*,unsignedint,unsignedchar* ,unsignedint*)0440cocos2d.__Globals._base64Decode(constunsignedchar*,unsignedint ,unsignedchar*,unsignedint*)
_base64Encode(constunsignedchar*,unsignedint,char*)0290cocos2d.__Globals._base64Encode(constunsignedchar*,unsignedint,char*)
visit(constcocos2d::Value&,int)0240cocos2d.__Globals.visit(constcocos2d::Value&,int)
ccdictionary_to_valuemap(cocos2d::__Dictionary*)0320cocos2d.__Globals.ccdictionary_to_valuemap(cocos2d::__Dictionary*)
ccarray_to_valuevector(cocos2d::__Array*)0290cocos2d.__Globals.ccarray_to_valuevector(cocos2d::__Array*)
parseCommand(int)0500cocos2d.Console.parseCommand(int)
commandProjection(int,conststd::string&)0270cocos2d.Console.commandProjection(int,conststd::string&)
commandTouch(int,conststd::string&)0700cocos2d.Console.commandTouch(int,conststd::string&)
processParentFlags(constcocos2d::Mat4&,uint32_t)0210cocos2d.Node.processParentFlags(constcocos2d::Mat4&,uint32_t)
startWithTarget(cocos2d::Node*)0210cocos2d.SkewTo.startWithTarget(cocos2d::Node*)
update(float)0530cocos2d.Animate3D.update(float)
init()0240cocos2d.EventListenerMouse.init()
update(float)0210cocos2d.Lens3D.update(float)
alignText()0370cocos2d.Label.alignText()
updateShaderProgram()0210cocos2d.Label.updateShaderProgram()
createShadowSpriteForSystemFont()0230cocos2d.Label.createShadowSpriteForSystemFont()
reset()0230cocos2d.Label.reset()
setTextureCoords(cocos2d::Rect)0410cocos2d.Sprite.setTextureCoords(cocos2d::Rect)
saveImageToPNG(conststd::string&,bool)0770cocos2d.Image.saveImageToPNG(conststd::string&,bool)
calculateVertexPoints()0500cocos2d.Grid3D.calculateVertexPoints()
calculateVertexPoints()0580cocos2d.TiledGrid3D.calculateVertexPoints()
loadDefaultGLProgram(cocos2d::GLProgram*,int)0920cocos2d.GLProgramCache.loadDefaultGLProgram(cocos2d::GLProgram*,int)
PhysicsBody()0210cocos2d.PhysicsBody.PhysicsBody()
onEvent(cocos2d::EventCustom*)0300cocos2d.EventListenerPhysicsContact.onEvent(cocos2d::EventCustom*)
update(float,bool)0260cocos2d.PhysicsWorld.update(float,bool)
drawShape(cocos2d::PhysicsShape&)0300cocos2d.PhysicsDebugDraw.drawShape(cocos2d::PhysicsShape&)
drawJoint(cocos2d::PhysicsJoint&)0410cocos2d.PhysicsDebugDraw.drawJoint(cocos2d::PhysicsJoint&)
getCurrentLanguage()0620cocos2d.Application.getCurrentLanguage()
parseVersion1(constValueMap&)0250cocos2d.AnimationCache.parseVersion1(constValueMap&)
getVertexZForPos(constcocos2d::Vec2&)0230cocos2d.TMXLayer.getVertexZForPos(constcocos2d::Vec2&)
updateAtlasValueAt(constcocos2d::Vec2&,constcocos2d::Color3B&,int)0430cocos2d.TileMapAtlas.updateAtlasValueAt(constcocos2d::Vec2& ,constcocos2d::Color3B&,int)
onDraw(constcocos2d::Mat4&,uint32_t)0420cocos2d.Skybox.onDraw(constcocos2d::Mat4&,uint32_t)
render(cocos2d::Renderer*,constcocos2d::Mat4& ,cocos2d::ParticleSystem3D*)0350cocos2d.Particle3DModelRender.render(cocos2d::Renderer* ,constcocos2d::Mat4&,cocos2d::ParticleSystem3D*)
copyAttributesTo(cocos2d::PUParticleSystem3D*)0490cocos2d.PUParticleSystem3D.copyAttributesTo (cocos2d::PUParticleSystem3D*)
parseChunk(PUConcreteNodeList&,constPUScriptTokenList&)0330cocos2d.PUScriptParser.parseChunk(PUConcreteNodeList& ,constPUScriptTokenList&)
createAffector(conststd::string&)0530cocos2d.PUAffectorManager.createAffector(conststd::string&)
initRender(conststd::string&)0210cocos2d.PUParticle3DEntityRender.initRender(conststd::string&)
getOriginOffset(int&,int&)0370cocos2d.PUParticle3DQuadRender.getOriginOffset(int&,int&)
render(cocos2d::Renderer*,constcocos2d::Mat4& ,cocos2d::ParticleSystem3D*)0410cocos2d.PUParticle3DModelRender.render(cocos2d::Renderer* ,constcocos2d::Mat4&,cocos2d::ParticleSystem3D*)
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)01131cocos2d.PUMaterialPassTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
createObserver(conststd::string&)0230cocos2d.PUObserverManager.createObserver(conststd::string&)
loadAnimationDataJson(conststd::string&,cocos2d::Animation3DData*)0490cocos2d.Bundle3D.loadAnimationDataJson(conststd::string& ,cocos2d::Animation3DData*)
getFontAtlasTTF(constTTFConfig&)0240cocos2d.FontAtlasCache.getFontAtlasTTF(constTTFConfig&)
getGlyphBitmap(unsignedshort,long&,long&,cocos2d::Rect&,int&)0690cocos2d.FontFreeType.getGlyphBitmap(unsignedshort,long&,long& ,cocos2d::Rect&,int&)
getGlyphBitmapWithOutline(unsignedshort,FT_BBox&)0300cocos2d.FontFreeType.getGlyphBitmapWithOutline(unsignedshort,FT_BBox&)
CSLoader()0280cocos2d.CSLoader.CSLoader()
init()0250cocos2d.CSLoader.init()
initNode(cocos2d::Node*,constrapidjson::Value&)0510cocos2d.CSLoader.initNode(cocos2d::Node*,constrapidjson::Value&)
endElement(void*,constchar*)0400cocos2d.DictMaker.endElement(void*,constchar*)
createFontAtlas()0250cocos2d.FontCharMap.createFontAtlas()
DrawShape(cpShape*,cocos2d::DrawNode*)0240cocos2d.extension.__Globals.DrawShape(cpShape*,cocos2d::DrawNode*)
__indexFromOffset(cocos2d::Vec2)0230cocos2d.extension.TableView.__indexFromOffset(cocos2d::Vec2)
rotateBufferThread(int)01041cocos2d.experimental.AudioPlayer.rotateBufferThread(int)
play2d(cocos2d::experimental::AudioCache*)0330cocos2d.experimental.AudioPlayer.play2d (cocos2d::experimental::AudioCache*)
play2d(conststd::string&,bool,float)0500cocos2d.experimental.AudioEngineImpl.play2d(conststd::string&,bool ,float)
update(float)0380cocos2d.experimental.AudioEngineImpl.update(float)
cleanupSlicedSprites()0350cocos2d.ui.Scale9Sprite.cleanupSlicedSprites()
copyProperties(cocos2d::ui::Widget*)0370cocos2d.ui.Widget.copyProperties(cocos2d::ui::Widget*)
getClippingRect()0480cocos2d.ui.Layout.getClippingRect()
onPressStateChangedToPressed()0250cocos2d.ui.Button.onPressStateChangedToPressed()
normalTextureScaleChangedWithSize()0210cocos2d.ui.Button.normalTextureScaleChangedWithSize()
pressedTextureScaleChangedWithSize()0210cocos2d.ui.Button.pressedTextureScaleChangedWithSize()
copySpecialProperties(cocos2d::ui::Widget*)0230cocos2d.ui.Button.copySpecialProperties(cocos2d::ui::Widget*)
autoScrollChildren(float)0280cocos2d.ui.ScrollView.autoScrollChildren(float)
checkBounceBoundary()0240cocos2d.ui.ScrollView.checkBounceBoundary()
checkNeedBounce()0460cocos2d.ui.ScrollView.checkNeedBounce()
scrollChildrenVertical(float,float)0260cocos2d.ui.ScrollView.scrollChildrenVertical(float,float)
scrollChildrenHorizontal(float,float)0260cocos2d.ui.ScrollView.scrollChildrenHorizontal(float,float)
endRecordSlidAction()0320cocos2d.ui.ScrollView.endRecordSlidAction()
interceptTouchEvent(Widget::TouchEventType,cocos2d::ui::Widget* ,cocos2d::Touch*)0210cocos2d.ui.ScrollView.interceptTouchEvent(Widget::TouchEventType ,cocos2d::ui::Widget*,cocos2d::Touch*)
updateInnerContainerSize()0210cocos2d.ui.ListView.updateInnerContainerSize()
barRendererScaleChangedWithSize()0220cocos2d.ui.Slider.barRendererScaleChangedWithSize()
progressBarRendererScaleChangedWithSize()0240cocos2d.ui.Slider.progressBarRendererScaleChangedWithSize()
autoScroll(float)0280cocos2d.ui.PageView.autoScroll(float)
handleReleaseLogic(cocos2d::Touch*)0230cocos2d.ui.PageView.handleReleaseLogic(cocos2d::Touch*)
interceptTouchEvent(cocos2d::ui::Widget::TouchEventType ,cocos2d::ui::Widget*,cocos2d::Touch*)0210cocos2d.ui.PageView.interceptTouchEvent (cocos2d::ui::Widget::TouchEventType,cocos2d::ui::Widget* ,cocos2d::Touch*)
handleTextRenderer(conststd::string&,conststd::string&,float ,constcocos2d::Color3B&,GLubyte)0310cocos2d.ui.RichText.handleTextRenderer(conststd::string& ,conststd::string&,float,constcocos2d::Color3B&,GLubyte)
formarRenderers()0520cocos2d.ui.RichText.formarRenderers()
openKeyboard()0340cocos2d.ui.EditBoxImplWin.openKeyboard()
doLayout(cocos2d::ui::LayoutProtocol*)0300cocos2d.ui.LinearVerticalLayoutManager.doLayout (cocos2d::ui::LayoutProtocol*)
doLayout(cocos2d::ui::LayoutProtocol*)0300cocos2d.ui.LinearHorizontalLayoutManager.doLayout (cocos2d::ui::LayoutProtocol*)
caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)01570cocos2d.ui.RelativeLayoutManager .caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)
onMessage(cocos2d::network::WebSocket*,constWebSocket::Data&)0730cocos2d.network.SIOClientImpl.onMessage(cocos2d::network::WebSocket* ,constWebSocket::Data&)
handshakeResponse(cocos2d::network::HttpClient* ,cocos2d::network::HttpResponse*)0380cocos2d.network.SIOClientImpl.handshakeResponse (cocos2d::network::HttpClient*,cocos2d::network::HttpResponse*)
tiffReadProc(thandle_t,void*,tmsize_t)0250cocos2d.anonymous_namespace{ccimage.cpp}.__Globals.tiffReadProc (thandle_t,void*,tmsize_t)
testFormatForPvr3TCSupport(cocos2d::(anonymousnamespace )::PVR3TexturePixelFormat)0230cocos2d.anonymous_namespace{ccimage.cpp}.__Globals .testFormatForPvr3TCSupport(cocos2d::(anonymousnamespace )::PVR3TexturePixelFormat)
Parse<parseFlags,Stream,Handler>(Stream&,Handler&)0220rapidjson.GenericReader<Encoding,Allocator>.Parse<parseFlags,Stream ,Handler>(Stream&,Handler&)
ParseValue<parseFlags,Stream,Handler>(Stream&,Handler&)0210rapidjson.GenericReader<Encoding,Allocator>.ParseValue<parseFlags ,Stream,Handler>(Stream&,Handler&)
Accept<Handler>(Handler&)0390rapidjson.GenericValue<Encoding,Allocator>.Accept<Handler>(Handler&)
ParseAnyValue(flatbuffers::Value&,flatbuffers::FieldDef*)0260flatbuffers.Parser.ParseAnyValue(flatbuffers::Value& ,flatbuffers::FieldDef*)

Statistics

Stat   Percentage Comment   # lines of code (LOC)   # lines of comment
Sum:7 697143 6754 060
Average:1.7332.320.91
Minimum:0210
Maximum:1929041
Standard deviation:4.2520.152.75
Variance:18.09405.957.55
warningCritical    Rule warning: Methods with too many parameters
• Rule Description:

This rule matches methods with more than 5 parameters. Such method might be painful to call and might degrade performance. See the definition of the NbParameters metric here: http://www.cppdepend.com/Metrics.aspx#NbParameters


• How to Fix Violations:

More properties/fields can be added to the declaring type to handle numerous states. An alternative is to provide a class or a structure dedicated to handle arguments passing.

161 methods matched

methods# ParametersFull Name
Mat4(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)16cocos2d.Mat4.Mat4(float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float,float)
set(float,float,float,float,float,float,float,float,float,float,float ,float,float,float,float,float)16cocos2d.Mat4.set(float,float,float,float,float,float,float,float,float ,float,float,float,float,float,float,float)
slerp(float,float,float,float,float,float,float,float,float,float* ,float*,float*,float*)13cocos2d.Quaternion.slerp(float,float,float,float,float,float,float ,float,float,float*,float*,float*,float*)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc,GLuint ,GLuint,GLenum,GLenum,ssize_t,constcocos2d::Mat4&,uint32_t)11cocos2d.MeshCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,GLuint,GLuint,GLenum,GLenum,ssize_t ,constcocos2d::Mat4&,uint32_t)
createLookAt(float,float,float,float,float,float,float,float,float ,cocos2d::Mat4*)10cocos2d.Mat4.createLookAt(float,float,float,float,float,float,float ,float,float,cocos2d::Mat4*)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc,GLuint ,GLuint,GLenum,GLenum,ssize_t,constcocos2d::Mat4&)10cocos2d.MeshCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,GLuint,GLuint,GLenum,GLenum,ssize_t ,constcocos2d::Mat4&)
distaa3(double*,double*,double*,int,int,int,int,int,int)9__Globals.distaa3(double*,double*,double*,int,int,int,int,int,int)
unz64local_GetCurrentFileInfoInternal(unzFile,unz_file_info64* ,unz_file_info64_internal*,char*,uLong,void*,uLong,char*,uLong)9cocos2d.__Globals.unz64local_GetCurrentFileInfoInternal(unzFile ,unz_file_info64*,unz_file_info64_internal*,char*,uLong,void*,uLong ,char*,uLong)
ccVertexLineIntersect(float,float,float,float,float,float,float,float ,float*)9cocos2d.__Globals.ccVertexLineIntersect(float,float,float,float,float ,float,float,float,float*)
TerrainData(constchar*,constchar*,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Size&,float,float)9cocos2d.Terrain+TerrainData.TerrainData(constchar*,constchar* ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Size&,float,float)
EventAssetsManagerEx(conststd::string& ,cocos2d::extension::AssetsManagerEx* ,constcocos2d::extension::EventAssetsManagerEx::EventCode&,float,float ,conststd::string&,conststd::string&,int,int)9cocos2d.extension.EventAssetsManagerEx.EventAssetsManagerEx (conststd::string&,cocos2d::extension::AssetsManagerEx* ,constcocos2d::extension::EventAssetsManagerEx::EventCode&,float,float ,conststd::string&,conststd::string&,int,int)
edtaa3(double*,double*,double*,int,int,short*,short*,double*)8__Globals.edtaa3(double*,double*,double*,int,int,short*,short*,double* )
decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32,bool,bool )8__Globals.decode_subblock(etc1_byte*,int,int,int,constint*,etc1_uint32 ,bool,bool)
InterpolateColours(constint*,constint*,constint*,constint*,constint ,constint,constint,int*)8__Globals.InterpolateColours(constint*,constint*,constint*,constint* ,constint,constint,constint,int*)
unzGetCurrentFileInfo64(unzFile,unz_file_info64*,char*,uLong,void* ,uLong,char*,uLong)8cocos2d.__Globals.unzGetCurrentFileInfo64(unzFile,unz_file_info64* ,char*,uLong,void*,uLong,char*,uLong)
unzGetCurrentFileInfo(unzFile,unz_file_info*,char*,uLong,void*,uLong ,char*,uLong)8cocos2d.__Globals.unzGetCurrentFileInfo(unzFile,unz_file_info*,char* ,uLong,void*,uLong,char*,uLong)
updateVertex(std::map<vertex_index,ssize_t>&,std::vector<float>& ,std::vector<float>&,std::vector<float>&,conststd::vector<float>& ,conststd::vector<float>&,conststd::vector<float>& ,constcocos2d::vertex_index&)8cocos2d.__Globals.updateVertex(std::map<vertex_index,ssize_t>& ,std::vector<float>&,std::vector<float>&,std::vector<float>& ,conststd::vector<float>&,conststd::vector<float>&,conststd::vector <float>&,constcocos2d::vertex_index&)
exportFaceGroupToShape(std::map<vertex_index,ssize_t>& ,ObjLoader::shapes_t&,conststd::vector<float>&,conststd::vector<float >&,conststd::vector<float>&,conststd::vector<std::vector<vertex_index> >&,constObjLoader::material_t&,conststd::string&)8cocos2d.__Globals.exportFaceGroupToShape(std::map<vertex_index,ssize_t >&,ObjLoader::shapes_t&,conststd::vector<float>&,conststd::vector <float>&,conststd::vector<float>&,conststd::vector<std::vector <vertex_index>>&,constObjLoader::material_t&,conststd::string&)
init(float,GLuint,cocos2d::GLProgramState*,constcocos2d::BlendFunc& ,cocos2d::V3F_C4B_T2F_Quad*,ssize_t,constcocos2d::Mat4&,uint32_t)8cocos2d.QuadCommand.init(float,GLuint,cocos2d::GLProgramState* ,constcocos2d::BlendFunc&,cocos2d::V3F_C4B_T2F_Quad*,ssize_t ,constcocos2d::Mat4&,uint32_t)
drawCircle(constcocos2d::Vec2&,float,float,unsignedint,bool,float ,float,constcocos2d::Color4F&)8cocos2d.DrawNode.drawCircle(constcocos2d::Vec2&,float,float ,unsignedint,bool,float,float,constcocos2d::Color4F&)
TerrainData(constchar*,constchar*,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Size&,float,float)8cocos2d.Terrain+TerrainData.TerrainData(constchar*,constchar* ,constcocos2d::Terrain::DetailMap&,constcocos2d::Terrain::DetailMap& ,constcocos2d::Terrain::DetailMap&,constcocos2d::Size&,float,float)
initialise(cocos2d::PUForceField::ForceFieldType,constcocos2d::Vec3& ,unsignedint,unsignedshort,double,double,double,constcocos2d::Vec3&)8cocos2d.PUForceField.initialise(cocos2d::PUForceField::ForceFieldType ,constcocos2d::Vec3&,unsignedint,unsignedshort,double,double,double ,constcocos2d::Vec3&)
spAnimation_mix(constspAnimation*,structspSkeleton*,float,float,int ,spEvent**,int*,float)8__Globals.spAnimation_mix(constspAnimation*,structspSkeleton*,float ,float,int,spEvent**,int*,float)
etc_encode_subblock_helper(constetc1_byte*,etc1_uint32,etc_compressed* ,bool,bool,constetc1_byte*,constint*)7__Globals.etc_encode_subblock_helper(constetc1_byte*,etc1_uint32 ,etc_compressed*,bool,bool,constetc1_byte*,constint*)
GetModulationValue(int,int,constint,constint(*)[16],constint(*)[16] ,int*,int*)7__Globals.GetModulationValue(int,int,constint,constint(*)[16],constint (*)[16],int*,int*)
ccDrawCircle(constcocos2d::Vec2&,float,float,unsignedint,bool,float ,float)7cocos2d.__Globals.ccDrawCircle(constcocos2d::Vec2&,float,float ,unsignedint,bool,float,float)
kmMat4OrthographicProjection(cocos2d::Mat4*,float,float,float,float ,float,float)7cocos2d.__Globals.kmMat4OrthographicProjection(cocos2d::Mat4*,float ,float,float,float,float,float)
createOrthographicOffCenter(float,float,float,float,float,float ,cocos2d::Mat4*)7cocos2d.Mat4.createOrthographicOffCenter(float,float,float,float,float ,float,cocos2d::Mat4*)
initWithCallback(cocos2d::Scheduler*,constccSchedulerFunc&,void* ,conststd::string&,float,unsignedint,float)7cocos2d.TimerTargetCallback.initWithCallback(cocos2d::Scheduler* ,constccSchedulerFunc&,void*,conststd::string&,float,unsignedint,float )
schedule(constccSchedulerFunc&,void*,float,unsignedint,float,bool ,conststd::string&)7cocos2d.Scheduler.schedule(constccSchedulerFunc&,void*,float ,unsignedint,float,bool,conststd::string&)
create(float,float,float,float,float,float,float)7cocos2d.OrbitCamera.create(float,float,float,float,float,float,float)
initWithDuration(float,float,float,float,float,float,float)7cocos2d.OrbitCamera.initWithDuration(float,float,float,float,float ,float,float)
init(float,GLuint,cocos2d::GLProgramState*,constcocos2d::BlendFunc& ,cocos2d::V3F_C4B_T2F_Quad*,ssize_t,constcocos2d::Mat4&)7cocos2d.QuadCommand.init(float,GLuint,cocos2d::GLProgramState* ,constcocos2d::BlendFunc&,cocos2d::V3F_C4B_T2F_Quad*,ssize_t ,constcocos2d::Mat4&)
drawSolidCircle(constcocos2d::Vec2&,float,float,unsignedint,float ,float,constcocos2d::Color4F&)7cocos2d.DrawNode.drawSolidCircle(constcocos2d::Vec2&,float,float ,unsignedint,float,float,constcocos2d::Color4F&)
create(conststd::string&,conststd::string&,int,int,char,cocos2d::Ref* ,SEL_MenuHandler)7cocos2d.MenuItemAtlasFont.create(conststd::string&,conststd::string& ,int,int,char,cocos2d::Ref*,SEL_MenuHandler)
initWithString(conststd::string&,conststd::string&,int,int,char ,cocos2d::Ref*,SEL_MenuHandler)7cocos2d.MenuItemAtlasFont.initWithString(conststd::string& ,conststd::string&,int,int,char,cocos2d::Ref*,SEL_MenuHandler)
beginWithClear(float,float,float,float,float,int,GLbitfield)7cocos2d.RenderTexture.beginWithClear(float,float,float,float,float,int ,GLbitfield)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc ,cocos2d::Primitive*,constcocos2d::Mat4&,uint32_t)7cocos2d.PrimitiveCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,cocos2d::Primitive*,constcocos2d::Mat4&,uint32_t)
init(float,GLuint,cocos2d::GLProgramState*,cocos2d::BlendFunc ,constcocos2d::TrianglesCommand::Triangles&,constcocos2d::Mat4& ,uint32_t)7cocos2d.TrianglesCommand.init(float,GLuint,cocos2d::GLProgramState* ,cocos2d::BlendFunc,constcocos2d::TrianglesCommand::Triangles& ,constcocos2d::Mat4&,uint32_t)
initialise(cocos2d::PUForceField::ForceFieldType,unsignedint ,unsignedshort,double,double,double,constcocos2d::Vec3&)7cocos2d.PUForceField.initialise(cocos2d::PUForceField::ForceFieldType ,unsignedint,unsignedshort,double,double,double,constcocos2d::Vec3&)
PUBillboardChain(conststd::string&,conststd::string&,size_t,size_t ,bool,bool,bool)7cocos2d.PUBillboardChain.PUBillboardChain(conststd::string& ,conststd::string&,size_t,size_t,bool,bool,bool)
processGetTask(cocos2d::network::HttpRequest*,write_callback,void* ,long*,write_callback,void*,char*)7cocos2d.network.__Globals.processGetTask (cocos2d::network::HttpRequest*,write_callback,void*,long* ,write_callback,void*,char*)
processPostTask(cocos2d::network::HttpRequest*,write_callback,void* ,long*,write_callback,void*,char*)7cocos2d.network.__Globals.processPostTask (cocos2d::network::HttpRequest*,write_callback,void*,long* ,write_callback,void*,char*)
processPutTask(cocos2d::network::HttpRequest*,write_callback,void* ,long*,write_callback,void*,char*)7cocos2d.network.__Globals.processPutTask (cocos2d::network::HttpRequest*,write_callback,void*,long* ,write_callback,void*,char*)
processDeleteTask(cocos2d::network::HttpRequest*,write_callback,void* ,long*,write_callback,void*,char*)7cocos2d.network.__Globals.processDeleteTask (cocos2d::network::HttpRequest*,write_callback,void*,long* ,write_callback,void*,char*)
drawCircle(constcocos2d::Vec2&,float,float,unsignedint,bool,float ,float)7cocos2d.DrawPrimitives.__Globals.drawCircle(constcocos2d::Vec2&,float ,float,unsignedint,bool,float,float)
GenFieldOffset(constflatbuffers::FieldDef&,constflatbuffers::Table* ,bool,int,flatbuffers::StructDef*,constflatbuffers::GeneratorOptions& ,std::string*)7flatbuffers.__Globals.GenFieldOffset(constflatbuffers::FieldDef& ,constflatbuffers::Table*,bool,int,flatbuffers::StructDef* ,constflatbuffers::GeneratorOptions&,std::string*)
spAnimation_apply(constspAnimation*,structspSkeleton*,float,float,int ,spEvent**,int*)7__Globals.spAnimation_apply(constspAnimation*,structspSkeleton*,float ,float,int,spEvent**,int*)
spTimeline_apply(constspTimeline*,structspSkeleton*,float,float ,spEvent**,int*,float)7__Globals.spTimeline_apply(constspTimeline*,structspSkeleton*,float ,float,spEvent**,int*,float)
spColorTimeline_setFrame(spColorTimeline*,int,float,float,float,float ,float)7__Globals.spColorTimeline_setFrame(spColorTimeline*,int,float,float ,float,float,float)
_spRotateTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spRotateTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
_spTranslateTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spTranslateTimeline_apply(constspTimeline*,spSkeleton* ,float,float,spEvent**,int*,float)
_spScaleTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spScaleTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
_spColorTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spColorTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
_spAttachmentTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spAttachmentTimeline_apply(constspTimeline*,spSkeleton* ,float,float,spEvent**,int*,float)
_spEventTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spEventTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
_spDrawOrderTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spDrawOrderTimeline_apply(constspTimeline*,spSkeleton* ,float,float,spEvent**,int*,float)
_spFFDTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spFFDTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
_spIkConstraintTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spIkConstraintTimeline_apply(constspTimeline*,spSkeleton* ,float,float,spEvent**,int*,float)
_spFlipTimeline_apply(constspTimeline*,spSkeleton*,float,float ,spEvent**,int*,float)7__Globals._spFlipTimeline_apply(constspTimeline*,spSkeleton*,float ,float,spEvent**,int*,float)
add(constcocos2d::Texture2D*,constfloat*,constfloat*,int,constint*,int ,cocos2d::Color4B*)7spine.PolygonBatch.add(constcocos2d::Texture2D*,constfloat* ,constfloat*,int,constint*,int,cocos2d::Color4B*)
Initialize(b2Body*,b2Body*,constb2Vec2&,constb2Vec2&,constb2Vec2& ,constb2Vec2&,float32)7b2PulleyJointDef.Initialize(b2Body*,b2Body*,constb2Vec2&,constb2Vec2& ,constb2Vec2&,constb2Vec2&,float32)
socket_sendto(p_socket,constchar*,size_t,size_t*,SA*,socklen_t ,p_timeout)7__Globals.socket_sendto(p_socket,constchar*,size_t,size_t*,SA* ,socklen_t,p_timeout)
socket_recvfrom(p_socket,char*,size_t,size_t*,SA*,socklen_t*,p_timeout )7__Globals.socket_recvfrom(p_socket,char*,size_t,size_t*,SA*,socklen_t* ,p_timeout)
atitc_decode_block(uint8_t**,uint32_t*,unsignedint,bool,uint64_t ,ATITCDecodeFlag)6__Globals.atitc_decode_block(uint8_t**,uint32_t*,unsignedint,bool ,uint64_t,ATITCDecodeFlag)
etc1_encode_image(constetc1_byte*,etc1_uint32,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_byte*)6__Globals.etc1_encode_image(constetc1_byte*,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_uint32,etc1_byte*)
etc1_decode_image(constetc1_byte*,etc1_byte*,etc1_uint32,etc1_uint32 ,etc1_uint32,etc1_uint32)6__Globals.etc1_decode_image(constetc1_byte*,etc1_byte*,etc1_uint32 ,etc1_uint32,etc1_uint32,etc1_uint32)
PVRDecompress(AMTC_BLOCK_STRUCT*,constbool,constint,constint,constint ,unsignedchar*)6__Globals.PVRDecompress(AMTC_BLOCK_STRUCT*,constbool,constint,constint ,constint,unsignedchar*)
UnpackModulations(constAMTC_BLOCK_STRUCT*,constint,int(*)[16],int(* )[16],int,int)6__Globals.UnpackModulations(constAMTC_BLOCK_STRUCT*,constint,int(* )[16],int(*)[16],int,int)
s3tc_decode_block(uint8_t**,uint32_t*,unsignedint,bool,uint64_t ,S3TCDecodeFlag)6__Globals.s3tc_decode_block(uint8_t**,uint32_t*,unsignedint,bool ,uint64_t,S3TCDecodeFlag)
InputBox(LPCSTR,LPCSTR,std::string*,DWORD,bool,HWND)6CWin32InputBox.InputBox(LPCSTR,LPCSTR,std::string*,DWORD,bool,HWND)
ccpLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)6cocos2d.__Globals.ccpLineIntersect(constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,constcocos2d::Vec2&,float* ,float*)
CCAffineTransformMake(float,float,float,float,float,float)6cocos2d.__Globals.CCAffineTransformMake(float,float,float,float,float ,float)
ccDrawSolidCircle(constcocos2d::Vec2&,float,float,unsignedint,float ,float)6cocos2d.__Globals.ccDrawSolidCircle(constcocos2d::Vec2&,float,float ,unsignedint,float,float)
__CCAffineTransformMake(float,float,float,float,float,float)6cocos2d.__Globals.__CCAffineTransformMake(float,float,float,float ,float,float)
isOneDimensionSegmentOverlap(float,float,float,float,float*,float*)6cocos2d.__Globals.isOneDimensionSegmentOverlap(float,float,float,float ,float*,float*)
ccCardinalSplineAt(cocos2d::Vec2&,cocos2d::Vec2&,cocos2d::Vec2& ,cocos2d::Vec2&,float,float)6cocos2d.__Globals.ccCardinalSplineAt(cocos2d::Vec2&,cocos2d::Vec2& ,cocos2d::Vec2&,cocos2d::Vec2&,float,float)
isLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)6cocos2d.Vec2.isLineIntersect(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,float*,float*)
isSegmentOverlap(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,cocos2d::Vec2*,cocos2d::Vec2* )6cocos2d.Vec2.isSegmentOverlap(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,cocos2d::Vec2*,cocos2d::Vec2* )
squad(constcocos2d::Quaternion&,constcocos2d::Quaternion& ,constcocos2d::Quaternion&,constcocos2d::Quaternion&,float ,cocos2d::Quaternion*)6cocos2d.Quaternion.squad(constcocos2d::Quaternion& ,constcocos2d::Quaternion&,constcocos2d::Quaternion& ,constcocos2d::Quaternion&,float,cocos2d::Quaternion*)
initWithData(constvoid*,ssize_t,Texture2D::PixelFormat,int,int ,constcocos2d::Size&)6cocos2d.Texture2D.initWithData(constvoid*,ssize_t ,Texture2D::PixelFormat,int,int,constcocos2d::Size&)
initWithString(constchar*,conststd::string&,float,constcocos2d::Size& ,cocos2d::TextHAlignment,cocos2d::TextVAlignment)6cocos2d.Texture2D.initWithString(constchar*,conststd::string&,float ,constcocos2d::Size&,cocos2d::TextHAlignment,cocos2d::TextVAlignment)
convertDataToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,cocos2d::Texture2D::PixelFormat ,unsignedchar**,ssize_t*)6cocos2d.Texture2D.convertDataToFormat(constunsignedchar*,ssize_t ,cocos2d::Texture2D::PixelFormat,cocos2d::Texture2D::PixelFormat ,unsignedchar**,ssize_t*)
PixelFormatInfo(GLenum,GLenum,GLenum,int,bool,bool)6cocos2d.Texture2D+PixelFormatInfo.PixelFormatInfo(GLenum,GLenum,GLenum ,int,bool,bool)
initWithSelector(cocos2d::Scheduler*,SEL_SCHEDULE,cocos2d::Ref*,float ,unsignedint,float)6cocos2d.TimerTargetSelector.initWithSelector(cocos2d::Scheduler* ,SEL_SCHEDULE,cocos2d::Ref*,float,unsignedint,float)
schedule(SEL_SCHEDULE,cocos2d::Ref*,float,unsignedint,float,bool)6cocos2d.Scheduler.schedule(SEL_SCHEDULE,cocos2d::Ref*,float ,unsignedint,float,bool)
scheduleSelector(SEL_SCHEDULE,cocos2d::Ref*,float,unsignedint,float ,bool)6cocos2d.Scheduler.scheduleSelector(SEL_SCHEDULE,cocos2d::Ref*,float ,unsignedint,float,bool)
transformVec4(constfloat*,float,float,float,float,float*)6cocos2d.MathUtil.transformVec4(constfloat*,float,float,float,float ,float*)
create(float,constcocos2d::Size&,constcocos2d::Vec2&,float,unsignedint ,float)6cocos2d.Ripple3D.create(float,constcocos2d::Size&,constcocos2d::Vec2& ,float,unsignedint,float)
initWithDuration(float,constcocos2d::Size&,constcocos2d::Vec2&,float ,unsignedint,float)6cocos2d.Ripple3D.initWithDuration(float,constcocos2d::Size& ,constcocos2d::Vec2&,float,unsignedint,float)
create(float,constcocos2d::Size&,unsignedint,float,bool,bool)6cocos2d.Waves.create(float,constcocos2d::Size&,unsignedint,float,bool ,bool)
initWithDuration(float,constcocos2d::Size&,unsignedint,float,bool,bool )6cocos2d.Waves.initWithDuration(float,constcocos2d::Size&,unsignedint ,float,bool,bool)
setVertexAttribPointer(conststd::string&,GLint,GLenum,GLboolean ,GLsizei,GLvoid*)6cocos2d.GLProgramState.setVertexAttribPointer(conststd::string&,GLint ,GLenum,GLboolean,GLsizei,GLvoid*)
drawCircle(constcocos2d::Vec2&,float,float,unsignedint,bool ,constcocos2d::Color4F&)6cocos2d.DrawNode.drawCircle(constcocos2d::Vec2&,float,float ,unsignedint,bool,constcocos2d::Color4F&)
drawCubicBezier(constcocos2d::Vec2&,constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,unsignedint ,constcocos2d::Color4F&)6cocos2d.DrawNode.drawCubicBezier(constcocos2d::Vec2& ,constcocos2d::Vec2&,constcocos2d::Vec2&,constcocos2d::Vec2& ,unsignedint,constcocos2d::Color4F&)
create(conststd::string&,conststd::string&,float,constcocos2d::Size& ,cocos2d::TextHAlignment,cocos2d::TextVAlignment)6cocos2d.LabelTTF.create(conststd::string&,conststd::string&,float ,constcocos2d::Size&,cocos2d::TextHAlignment,cocos2d::TextVAlignment)
initWithString(conststd::string&,conststd::string&,float ,constcocos2d::Size&,cocos2d::TextHAlignment,cocos2d::TextVAlignment)6cocos2d.LabelTTF.initWithString(conststd::string&,conststd::string& ,float,constcocos2d::Size&,cocos2d::TextHAlignment ,cocos2d::TextVAlignment)
init(float,cocos2d::GLProgram*,cocos2d::BlendFunc ,cocos2d::TextureAtlas*,constcocos2d::Mat4&,uint32_t)6cocos2d.BatchCommand.init(float,cocos2d::GLProgram*,cocos2d::BlendFunc ,cocos2d::TextureAtlas*,constcocos2d::Mat4&,uint32_t)
_ttfConfig(constchar*,int,constcocos2d::GlyphCollection&,constchar* ,bool,int)6cocos2d._ttfConfig._ttfConfig(constchar*,int ,constcocos2d::GlyphCollection&,constchar*,bool,int)
createWithSystemFont(conststd::string&,conststd::string&,float ,constcocos2d::Size&,cocos2d::TextHAlignment,cocos2d::TextVAlignment)6cocos2d.Label.createWithSystemFont(conststd::string&,conststd::string& ,float,constcocos2d::Size&,cocos2d::TextHAlignment ,cocos2d::TextVAlignment)

Statistics

Stat   # Parameters
Sum:1 086
Average:6.75
Minimum:6
Maximum:16
Standard deviation:1.48
Variance:2.18
warningCritical    Rule warning: Methods with too many local variables
• Rule Description:

This rule matches methods with more than 15 variables.

Methods where NbVariables > 8 are hard to understand and maintain. Methods where NbVariables > 15 are extremely complex and must be refactored.

See the definition of the Nbvariables metric here: http://www.cppdepend.com/Metrics.aspx#Nbvariables


• How to Fix Violations:

To refactor such method and increase code quality and maintainability, certainly you'll have to split the method into several smaller methods or even create one or several classes to implement the logic.

During this process it is important to question the scope of each variable local to the method. This can be an indication if such local variable will become an instance field of the newly created class(es).

388 methods matched

methods# VariablesFull Name
startElement(void*,constchar*,constchar**)87cocos2d.TMXMapInfo.startElement(void*,constchar*,constchar**)
onEnter()70TemplateMapTest.onEnter()
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)64cocos2d.PUEmitterTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
generateTestFunctions()63TouchEventDispatchingPerfTest.generateTestFunctions()
_spSkeletonJson_readAnimation(spSkeletonJson*,Json*,spSkeletonData*)62__Globals._spSkeletonJson_readAnimation(spSkeletonJson*,Json* ,spSkeletonData*)
onEnter()61TemplateVectorTest.onEnter()
buildJson(rapidjson::Document&,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)60cocostudio.TriggerMng.buildJson(rapidjson::Document& ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)60cocostudio.ButtonReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)60cocostudio.CheckBoxReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)60cocostudio.SliderReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)57cocostudio.ButtonReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)56cocostudio.WidgetReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)54cocostudio.NodeReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
generateTestFunctions()54TemplateVectorPerfTest.generateTestFunctions()
spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)53__Globals.spSkeletonJson_readSkeletonData(spSkeletonJson*,constchar*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)52cocostudio.ListViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
SolveVelocityConstraints()52b2ContactSolver.SolveVelocityConstraints()
createOptionsWithFlatBuffersForNode(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)50cocostudio.Node3DReader.createOptionsWithFlatBuffersForNode (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
generateTestFunctions()50TemplateMapStringKeyPerfTest.generateTestFunctions()
translate(cocos2d::PUScriptCompiler*,cocos2d::PUAbstractNode*)48cocos2d.PURendererTranslator.translate(cocos2d::PUScriptCompiler* ,cocos2d::PUAbstractNode*)
InitializeVelocityConstraints()46b2ContactSolver.InitializeVelocityConstraints()
Cantilever()46Cantilever.Cantilever()
serialize(void*)45cocostudio.ComRender.serialize(void*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)45cocostudio.CheckBoxReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)45cocostudio.SliderReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
generateTestFunctions()45ArrayPerfTest.generateTestFunctions()
generateTestFunctions()44TemplateMapIntKeyPerfTest.generateTestFunctions()
CharacterCollision()44CharacterCollision.CharacterCollision()
createSlicedSprites()43cocos2d.ui.Scale9Sprite.createSlicedSprites()
parseProperties(cocos2d::Node*,cocos2d::Node*,cocosbuilder::CCBReader* )43cocosbuilder.NodeLoader.parseProperties(cocos2d::Node*,cocos2d::Node* ,cocosbuilder::CCBReader*)
generateTestFunctions()43DictionaryStringKeyPerfTest.generateTestFunctions()
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)42cocostudio.ListViewReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
SolveTOI(constb2TimeStep&)42b2World.SolveTOI(constb2TimeStep&)
SolvePositionConstraints(constb2SolverData&)42b2PrismaticJoint.SolvePositionConstraints(constb2SolverData&)
Dominos()42Dominos.Dominos()
initWithBinary(cocostudio::CocoLoader*,cocostudio::stExpCocoNode* ,cocos2d::Ref*)41cocostudio.ActionNode.initWithBinary(cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*,cocos2d::Ref*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)41cocostudio.ScrollViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
onEnter()41PhysicsDemoJoints.onEnter()
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)39cocostudio.ScrollViewReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setLightUniforms()38cocos2d.MeshCommand.setLightUniforms()
Solve(b2Profile*,constb2TimeStep&,constb2Vec2&,bool)38b2Island.Solve(b2Profile*,constb2TimeStep&,constb2Vec2&,bool)
generateTestFunctions()37DictionaryIntKeyPerfTest.generateTestFunctions()
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)36cocostudio.LayoutReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)36cocostudio.PageViewReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
Car()36Car.Car()
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)35cocostudio.LayoutReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)35cocostudio.PageViewReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
b2CollidePolygons(b2Manifold*,constb2PolygonShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)35__Globals.b2CollidePolygons(b2Manifold*,constb2PolygonShape* ,constb2Transform&,constb2PolygonShape*,constb2Transform&)
LoadObj(shapes_t&,constchar*,constchar*)34cocos2d.ObjLoader.LoadObj(shapes_t&,constchar*,constchar*)
drawSkeleton(constcocos2d::Mat4&,uint32_t)34spine.SkeletonRenderer.drawSkeleton(constcocos2d::Mat4&,uint32_t)
SolvePositionConstraints(constb2SolverData&)34b2GearJoint.SolvePositionConstraints(constb2SolverData&)
initWithQuantityOfNodes(unsignedint)34PerformanceEventDispatcherScene.initWithQuantityOfNodes(unsignedint)
lua_cocos2dx_Texture2D_initWithString(lua_State*)34__Globals.lua_cocos2dx_Texture2D_initWithString(lua_State*)
init(constcocos2d::Animation3DData&)33cocos2d.Animation3D.init(constcocos2d::Animation3DData&)
initWithDictionary(constrapidjson::Value&,cocos2d::Ref*)33cocostudio.ActionNode.initWithDictionary(constrapidjson::Value& ,cocos2d::Ref*)
copyAttributesTo(cocos2d::PUParticleSystem3D*)32cocos2d.PUParticleSystem3D.copyAttributesTo (cocos2d::PUParticleSystem3D*)
~PUParticleSystem3D()32cocos2d.PUParticleSystem3D.~PUParticleSystem3D()
readNodeGraph(cocos2d::Node*)32cocosbuilder.CCBReader.readNodeGraph(cocos2d::Node*)
createOptionsWithFlatBuffers(consttinyxml2::XMLElement* ,flatbuffers::FlatBufferBuilder*)32cocostudio.TextReader.createOptionsWithFlatBuffers (consttinyxml2::XMLElement*,flatbuffers::FlatBufferBuilder*)
lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)32__Globals.lua_cocos2dx_experimental_SpritePolygon_create(lua_State*)
handle(cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)31cocos2d.PUDoEnableComponentEventHandler.handle (cocos2d::PUParticleSystem3D*,cocos2d::PUParticle3D*,float)
b2TimeOfImpact(b2TOIOutput*,constb2TOIInput*)31__Globals.b2TimeOfImpact(b2TOIOutput*,constb2TOIInput*)
Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)31b2EPCollider.Collide(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2PolygonShape*,constb2Transform&)
SolvePositionConstraints()31b2ContactSolver.SolvePositionConstraints()
SolveTOIPositionConstraints(int32,int32)31b2ContactSolver.SolveTOIPositionConstraints(int32,int32)
resetTest()31PhysicsContactTest.resetTest()
Gears()31Gears.Gears()
drawPolygon(constcocos2d::Vec2*,int,constcocos2d::Color4F&,float ,constcocos2d::Color4F&)30cocos2d.DrawNode.drawPolygon(constcocos2d::Vec2*,int ,constcocos2d::Color4F&,float,constcocos2d::Color4F&)
addSpriteFramesWithDictionary(ValueMap&,cocos2d::Texture2D*)30cocos2d.SpriteFrameCache.addSpriteFramesWithDictionary(ValueMap& ,cocos2d::Texture2D*)
caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)30cocos2d.ui.RelativeLayoutManager .caculateFinalPositionWithRelativeWidget(cocos2d::ui::LayoutProtocol*)
setPropsForButtonFromJsonDictionary(cocos2d::ui::Widget* ,constrapidjson::Value&)30cocostudio.WidgetPropertiesReader0250 .setPropsForButtonFromJsonDictionary(cocos2d::ui::Widget* ,constrapidjson::Value&)
setPropsFromJsonDictionary(cocos2d::ui::Widget*,constrapidjson::Value& )30cocostudio.LayoutReader.setPropsFromJsonDictionary (cocos2d::ui::Widget*,constrapidjson::Value&)
groupBatchDownload(constDownloadUnits&)29cocos2d.extension.Downloader.groupBatchDownload(constDownloadUnits&)
SolveVelocityConstraints(constb2SolverData&)29b2PrismaticJoint.SolveVelocityConstraints(constb2SolverData&)
AllocatorTest()29AllocatorTest.AllocatorTest()
init()29Bug1174Layer.init()
CompoundShapes()29CompoundShapes.CompoundShapes()
lua_cocos2dx_cocosdenshion_SimpleAudioEngine_playEffect(lua_State*)29__Globals.lua_cocos2dx_cocosdenshion_SimpleAudioEngine_playEffect (lua_State*)
LoadMtl(std::map<std::string,ObjLoader::material_t>&,constchar* ,constchar*)28cocos2d.__Globals.LoadMtl(std::map<std::string,ObjLoader::material_t>& ,constchar*,constchar*)
calculateVertexPoints()28cocos2d.Grid3D.calculateVertexPoints()
render(cocos2d::Renderer*,constcocos2d::Mat4& ,cocos2d::ParticleSystem3D*)28cocos2d.PUParticle3DQuadRender.render(cocos2d::Renderer* ,constcocos2d::Mat4&,cocos2d::ParticleSystem3D*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)28cocostudio.TextReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)
Step(Settings*)28Test.Step(Settings*)
lua_cocos2dx_extension_ControlSlider_create(lua_State*)28__Globals.lua_cocos2dx_extension_ControlSlider_create(lua_State*)
onDraw(constcocos2d::Mat4&,bool)27cocos2d.Label.onDraw(constcocos2d::Mat4&,bool)
createStringSprites(cocos2d::Label*)27cocos2d.LabelTextFormatter.createStringSprites(cocos2d::Label*)
updateTiles(constcocos2d::Rect&)27cocos2d.experimental.TMXLayer.updateTiles(constcocos2d::Rect&)
scrollChildrenBoth(float,float)27cocos2d.ui.ScrollView.scrollChildrenBoth(float,float)
GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)27flatbuffers.__Globals.GenStruct(constflatbuffers::LanguageParameters& ,constflatbuffers::Parser&,flatbuffers::StructDef&,std::string*)
createNodeWithSceneFile(conststd::string& ,cocostudio::SceneReader::AttachComponentType)27cocostudio.SceneReader.createNodeWithSceneFile(conststd::string& ,cocostudio::SceneReader::AttachComponentType)
createNodeWithFlatBuffers(constflatbuffers::Table*)27cocostudio.GameMapReader.createNodeWithFlatBuffers (constflatbuffers::Table*)
setPropsFromBinary(cocos2d::ui::Widget*,cocostudio::CocoLoader* ,cocostudio::stExpCocoNode*)27cocostudio.SliderReader.setPropsFromBinary(cocos2d::ui::Widget* ,cocostudio::CocoLoader*,cocostudio::stExpCocoNode*)
b2CollideEdgeAndCircle(b2Manifold*,constb2EdgeShape*,constb2Transform& ,constb2CircleShape*,constb2Transform&)27__Globals.b2CollideEdgeAndCircle(b2Manifold*,constb2EdgeShape* ,constb2Transform&,constb2CircleShape*,constb2Transform&)
InitVelocityConstraints(constb2SolverData&)27b2PrismaticJoint.InitVelocityConstraints(constb2SolverData&)
lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State*)27__Globals.lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State*)
loop()26cocos2d.Console.loop()
prepared()26cocos2d.PUParticleSystem3D.prepared()
parseBinaryConfigFile(unsignedchar*,unsignedlong,conststd::string&)26cocos2d.BMFontConfiguration.parseBinaryConfigFile(unsignedchar* ,unsignedlong,conststd::string&)
decodeFrame(tinyxml2::XMLElement*,tinyxml2::XMLElement* ,cocostudio::BoneData*,DataInfo*)26cocostudio.DataReaderHelper.decodeFrame(tinyxml2::XMLElement* ,tinyxml2::XMLElement*,cocostudio::BoneData*,DataInfo*)
setPropsWithFlatBuffers(cocos2d::Node*,constflatbuffers::Table*)26cocostudio.WidgetReader.setPropsWithFlatBuffers(cocos2d::Node* ,constflatbuffers::Table*)

Statistics

Stat   # Variables
Sum:9 447
Average:24.35
Minimum:16
Maximum:87
Standard deviation:10.67
Variance:113.85
warningCritical    Rule warning: Methods with too many overloads
• Rule Description:

Method overloading is the ability to create multiple methods of the same name with different implementations, and various set of parameters.

This rule matches sets of method with more than 6 overloads.

Such method set might be a problem to maintain and provokes higher coupling than necessary.

See the definition of the NbOverloads metric here http://www.cppdepend.com/Metrics.aspx#NbOverloads


• How to Fix Violations:

Typically the too many overloads phenomenon appears when an algorithm takes a various set of in-parameters. Each overload is presented as a facility to provide a various set of in-parameters.

The too many overloads phenomenon can also be a consequence of the usage of the visitor design pattern http://en.wikipedia.org/wiki/Visitor_pattern since a method named Visit() must be provided for each sub type. In such situation there is no need for fix.

59 methods matched

methods# OverloadsFull Name
Value()16cocos2d.Value.Value()
Value(unsignedchar)16cocos2d.Value.Value(unsignedchar)
Value(int)16cocos2d.Value.Value(int)
Value(float)16cocos2d.Value.Value(float)
Value(double)16cocos2d.Value.Value(double)
Value(bool)16cocos2d.Value.Value(bool)
Value(constchar*)16cocos2d.Value.Value(constchar*)
Value(conststd::string&)16cocos2d.Value.Value(conststd::string&)
Value(constValueVector&)16cocos2d.Value.Value(constValueVector&)
Value(ValueVector&&)16cocos2d.Value.Value(ValueVector&&)
Value(constValueMap&)16cocos2d.Value.Value(constValueMap&)
Value(ValueMap&&)16cocos2d.Value.Value(ValueMap&&)
Value(constValueMapIntKey&)16cocos2d.Value.Value(constValueMapIntKey&)
Value(ValueMapIntKey&&)16cocos2d.Value.Value(ValueMapIntKey&&)
Value(constcocos2d::Value&)16cocos2d.Value.Value(constcocos2d::Value&)
Value(cocos2d::Value&&)16cocos2d.Value.Value(cocos2d::Value&&)
GenericValue<Encoding,Allocator>()13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>()
GenericValue<Encoding,Allocator>(constGenericValue<Encoding,Allocator >&)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(constGenericValue<Encoding,Allocator>&)
GenericValue<Encoding,Allocator>(rapidjson::Type)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(rapidjson::Type)
GenericValue<Encoding,Allocator>(bool)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(bool)
GenericValue<Encoding,Allocator>(int)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(int)
GenericValue<Encoding,Allocator>(unsignedint)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(unsignedint)
GenericValue<Encoding,Allocator>(int64_t)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(int64_t)
GenericValue<Encoding,Allocator>(uint64_t)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(uint64_t)
GenericValue<Encoding,Allocator>(double)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(double)
GenericValue<Encoding,Allocator>(constCh*,SizeType)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(constCh*,SizeType)
GenericValue<Encoding,Allocator>(constCh*)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(constCh*)
GenericValue<Encoding,Allocator>(constCh*,SizeType,Allocator&)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(constCh*,SizeType,Allocator&)
GenericValue<Encoding,Allocator>(constCh*,Allocator&)13rapidjson.GenericValue<Encoding,Allocator>.GenericValue<Encoding ,Allocator>(constCh*,Allocator&)
visit(constcocos2d::__Bool*)8cocos2d.DataVisitor.visit(constcocos2d::__Bool*)
visit(constcocos2d::__Integer*)8cocos2d.DataVisitor.visit(constcocos2d::__Integer*)
visit(constcocos2d::__Float*)8cocos2d.DataVisitor.visit(constcocos2d::__Float*)
visit(constcocos2d::__Double*)8cocos2d.DataVisitor.visit(constcocos2d::__Double*)
visit(constcocos2d::__String*)8cocos2d.DataVisitor.visit(constcocos2d::__String*)
visit(constcocos2d::__Array*)8cocos2d.DataVisitor.visit(constcocos2d::__Array*)
visit(constcocos2d::__Dictionary*)8cocos2d.DataVisitor.visit(constcocos2d::__Dictionary*)
visit(constcocos2d::__Set*)8cocos2d.DataVisitor.visit(constcocos2d::__Set*)
visit(constcocos2d::__Bool*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Bool*)
visit(constcocos2d::__Integer*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Integer*)
visit(constcocos2d::__Float*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Float*)
visit(constcocos2d::__Double*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Double*)
visit(constcocos2d::__String*)8cocos2d.PrettyPrinter.visit(constcocos2d::__String*)
visit(constcocos2d::__Array*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Array*)
visit(constcocos2d::__Dictionary*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Dictionary*)
visit(constcocos2d::__Set*)8cocos2d.PrettyPrinter.visit(constcocos2d::__Set*)
create()7cocos2d.MenuItemImage.create()
create(conststd::string&,conststd::string&)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string&)
create(conststd::string&,conststd::string&,conststd::string&)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string& ,conststd::string&)
create(conststd::string&,conststd::string&,cocos2d::Ref* ,SEL_MenuHandler)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string& ,cocos2d::Ref*,SEL_MenuHandler)
create(conststd::string&,conststd::string&,constccMenuCallback&)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string& ,constccMenuCallback&)
create(conststd::string&,conststd::string&,conststd::string& ,cocos2d::Ref*,SEL_MenuHandler)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string& ,conststd::string&,cocos2d::Ref*,SEL_MenuHandler)
create(conststd::string&,conststd::string&,conststd::string& ,constccMenuCallback&)7cocos2d.MenuItemImage.create(conststd::string&,conststd::string& ,conststd::string&,constccMenuCallback&)
b2Mul(constb2Mat22&,constb2Vec2&)7__Globals.b2Mul(constb2Mat22&,constb2Vec2&)
b2Mul(constb2Mat22&,constb2Mat22&)7__Globals.b2Mul(constb2Mat22&,constb2Mat22&)
b2Mul(constb2Mat33&,constb2Vec3&)7__Globals.b2Mul(constb2Mat33&,constb2Vec3&)
b2Mul(constb2Rot&,constb2Rot&)7__Globals.b2Mul(constb2Rot&,constb2Rot&)
b2Mul(constb2Rot&,constb2Vec2&)7__Globals.b2Mul(constb2Rot&,constb2Vec2&)
b2Mul(constb2Transform&,constb2Vec2&)7__Globals.b2Mul(constb2Transform&,constb2Vec2&)
b2Mul(constb2Transform&,constb2Transform&)7__Globals.b2Mul(constb2Transform&,constb2Transform&)

Statistics

Stat   # Overloads
Sum:651
Average:11.03
Minimum:7
Maximum:16
Standard deviation:3.73
Variance:13.9
warningCritical    Rule warning: Types with too many methods
• Rule Description:

This rule matches types with more than 20 methods. Such type might be hard to understand and maintain.

Notice that methods like constructors or property and event accessors are not taken account.

Having many methods for a type might be a symptom of too many responsibilities implemented.

Maybe you are facing the God Class phenomenon: A God Class is a class that controls way too many other classes in the system and has grown beyond all logic to become The Class That Does Everything.


• How to Fix Violations:

To refactor such type and increase code quality and maintainability, certainly you'll have to split the type into several smaller types that together, implement the same logic.

To refactor a God Class you'll need patience, and you might even need to recreate everything from scratch. Here are a few advices:

• Think before pulling out methods: What responsibility does it have? Can you isolate some subsets of methods that operate on the same subsets of fields?

• Try to maintain the interface of the god class at first and delegate calls to the new extracted classes. In the end the god class should be a pure facade without own logic. Then you can keep it for convenience or throw it away and start to use the new classes only.

• Unit Tests can help: write tests for each method before extractin