PMD Results

The following document contains the results of PMD 5.2.3.

Files

Tobago Core - org/apache/myfaces/tobago/component/Attributes.java

Violation Line
Parameter 'explicit' is not assigned and could be declared final 263
Avoid if (x != y) ..; else ..; 268272
Parameter 'name' is not assigned and could be declared final 275

Tobago Core - org/apache/myfaces/tobago/component/Facets.java

Violation Line
Perhaps 'event' could be replaced by a local variable. 74
Document empty constructor 7677
Parameter 'event' is not assigned and could be declared final 79

Tobago Core - org/apache/myfaces/tobago/component/LabelLayout.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 88

Tobago Core - org/apache/myfaces/tobago/component/MethodBindingToMethodExpression.java

Violation Line
This class has too many methods, consider refactoring it. 37241
Document empty constructor 4748
Consider using varargs for methods or constructors which take an array the last parameter. 96

Tobago Core - org/apache/myfaces/tobago/component/MethodExpressionToMethodBinding.java

Violation Line
Avoid using redundant field initializer for 'isTransient' 38
Unnecessary use of fully qualified name 'javax.faces.el.MethodNotFoundException' due to existing import 'javax.faces.el.MethodNotFoundException' 63
Consider using varargs for methods or constructors which take an array the last parameter. 70
Unnecessary use of fully qualified name 'javax.faces.el.MethodNotFoundException' due to existing import 'javax.faces.el.MethodNotFoundException' 76

Tobago Core - org/apache/myfaces/tobago/component/Sorter.java

Violation Line
Possible God class (WMC=51, ATFD=25, TCC=0.2) 20259
The class 'Sorter' has a Cyclomatic Complexity of 8 (Highest = 30). 49258
The class 'Sorter' has a Standard Cyclomatic Complexity of 6 (Highest = 28). 49258
The class 'Sorter' has a Modified Cyclomatic Complexity of 6 (Highest = 28). 49258
The method 'perform' has a Cyclomatic Complexity of 30. 64201
The method perform() has an NPath complexity of 139872 64201
Avoid really long methods. 64201
The method 'perform' has a Modified Cyclomatic Complexity of 28. 64201
The method 'perform' has a Standard Cyclomatic Complexity of 28. 64201
Avoid if (x != y) ..; else ..; 96137
Avoid if (x != y) ..; else ..; 99132
Avoid if (x != y) ..; else ..; 199
The method 'getFirstSortableChild' has a Cyclomatic Complexity of 13. 224249

Tobago Core - org/apache/myfaces/tobago/context/ClientProperties.java

Violation Line
Use equals() to compare object references. 133

Tobago Core - org/apache/myfaces/tobago/context/Markup.java

Violation Line
The class 'Markup' has a Modified Cyclomatic Complexity of 5 (Highest = 10). 57368
The class 'Markup' has a Standard Cyclomatic Complexity of 5 (Highest = 10). 57368
This class has too many methods, consider refactoring it. 57368
The class 'Markup' has a Cyclomatic Complexity of 5 (Highest = 11). 57368
Consider using varargs for methods or constructors which take an array the last parameter. 114
Consider using varargs for methods or constructors which take an array the last parameter. 124
Avoid if (x != y) ..; else ..; 184
Avoid if (x != y) ..; else ..; 196
Avoid if (x != y) ..; else ..; 197
Use equals() to compare object references. 220
Avoid if (x != y) ..; else ..; 223234
Avoid if (x != y) ..; else ..; 264273
The method 'contains' has a Standard Cyclomatic Complexity of 10. 325355
The method 'contains' has a Cyclomatic Complexity of 11. 325355
The method 'contains' has a Modified Cyclomatic Complexity of 10. 325355
Use equals() to compare object references. 326
Avoid if (x != y) ..; else ..; 332354
Avoid if (x != y) ..; else ..; 333342
Avoid if (x != y) ..; else ..; 344353

Tobago Core - org/apache/myfaces/tobago/context/MarkupConfig.java

Violation Line
Private field 'markups' could be made final; it is only initialized in the declaration or constructor. 30

Tobago Core - org/apache/myfaces/tobago/context/ResourceManagerUtils.java

Violation Line
This call to String.startsWith can be rewritten using String.charAt(0) 184
Local variable 'dot' could be declared final 194
Local variable 'slash' could be declared final 198

Tobago Core - org/apache/myfaces/tobago/context/ThemeImpl.java

Violation Line
Possible God class (WMC=60, ATFD=16, TCC=0.07816091954022988) 20314
The class 'ThemeImpl' has a Cyclomatic Complexity of 2 (Highest = 12). 33314
The class 'ThemeImpl' has a Modified Cyclomatic Complexity of 2 (Highest = 12). 33314
The class 'ThemeImpl' has a Standard Cyclomatic Complexity of 2 (Highest = 12). 33314
Too many fields 33314
Private field 'productionResources' could be made final; it is only initialized in the declaration or constructor. 46
Private field 'resources' could be made final; it is only initialized in the declaration or constructor. 47
Avoid using redundant field initializer for 'unmodifiable' 55
Deeply nested if..then statements are hard to read 154159
The method 'toString' has a Cyclomatic Complexity of 12. 273313
The method 'toString' has a Standard Cyclomatic Complexity of 12. 273313
The method 'toString' has a Modified Cyclomatic Complexity of 12. 273313
StringBuffer constructor is initialized with size 16, but has at least 112 characters appended. 274
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 275
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 276
Avoid if (x != y) ..; else ..; 278284
Avoid appending characters as strings in StringBuffer.append. 279
Avoid appending characters as strings in StringBuffer.append. 281
Avoid if (x != y) ..; else ..; 286
Local variable 's' could be declared final 286
Avoid appending characters as strings in StringBuffer.append. 287
Local variable 's' could be declared final 291
Avoid if (x != y) ..; else ..; 291
Avoid appending characters as strings in StringBuffer.append. 292
Avoid if (x != y) ..; else ..; 296
Local variable 's' could be declared final 296
Avoid appending characters as strings in StringBuffer.append. 297
Avoid if (x != y) ..; else ..; 301
Local variable 's' could be declared final 301
Avoid appending characters as strings in StringBuffer.append. 302
Avoid appending characters as strings in StringBuffer.append. 306
Avoid appending characters as strings in StringBuffer.append. 309

Tobago Core - org/apache/myfaces/tobago/context/ThemeResource.java

Violation Line
Avoid if (x != y) ..; else ..; 50
Avoid if (x != y) ..; else ..; 56

Tobago Core - org/apache/myfaces/tobago/context/ThemeResources.java

Violation Line
Parameter 'production' is not assigned and could be declared final 39
Parameter 'exclude' is not assigned and could be declared final 67
Parameter 'exclude' is not assigned and could be declared final 71

Tobago Core - org/apache/myfaces/tobago/context/TobagoBundle.java

Violation Line
Private field 'bundleName' could be made final; it is only initialized in the declaration or constructor. 41

Tobago Core - org/apache/myfaces/tobago/context/TransientStateHolder.java

Violation Line
Document empty constructor 3334

Tobago Core - org/apache/myfaces/tobago/context/UserAgent.java

Violation Line
The class 'UserAgent' has a Cyclomatic Complexity of 3 (Highest = 20). 33390
The class 'UserAgent' has a Modified Cyclomatic Complexity of 3 (Highest = 19). 33390
The class 'UserAgent' has a Standard Cyclomatic Complexity of 3 (Highest = 19). 33390
The String literal "msie" appears 12 times in this file; the first occurrence is on line 43 43
The String literal "opera" appears 4 times in this file; the first occurrence is on line 107 107
The String literal "mozilla" appears 4 times in this file; the first occurrence is on line 131 131
The String literal "gecko" appears 5 times in this file; the first occurrence is on line 154 154
The method 'getInstance' has a Standard Cyclomatic Complexity of 19. 279334
The method 'getInstance' has a Modified Cyclomatic Complexity of 19. 279334
The method 'getInstance' has a Cyclomatic Complexity of 20. 279334
Avoid if (x != y) ..; else ..; 350352
Consider using varargs for methods or constructors which take an array the last parameter. 364
Consider using varargs for methods or constructors which take an array the last parameter. 382

Tobago Core - org/apache/myfaces/tobago/convert/DurationConverter.java

Violation Line
Unnecessary wrapper object creation 65
Avoid declaring a variable if it is unreferenced before a possible exit point. 89
The default label should be the last label in a switch statement 129145

Tobago Core - org/apache/myfaces/tobago/el/ConstantMethodExpression.java

Violation Line
Document empty constructor 3536
Parameter 'outcome' is not assigned and could be declared final 38
Parameter 'context' is not assigned and could be declared final 43
Parameter 'context' is not assigned and could be declared final 49
Consider using varargs for methods or constructors which take an array the last parameter. 49
Parameter 'params' is not assigned and could be declared final 49
Parameter 'o' is not assigned and could be declared final 55
Local variable 'that' could be declared final 63
Avoid if (x != y) ..; else ..; 65
Parameter 'context' is not assigned and could be declared final 85
Parameter 'state' is not assigned and could be declared final 90
Parameter 'context' is not assigned and could be declared final 90

Tobago Core - org/apache/myfaces/tobago/el/UserWrapper.java

Violation Line
Private field 'roles' could be made final; it is only initialized in the declaration or constructor. 35

Tobago Core - org/apache/myfaces/tobago/event/CollapsibleActionListener.java

Violation Line
Parameter 'context' is not assigned and could be declared final 69
Parameter 'state' is not assigned and could be declared final 74
Parameter 'context' is not assigned and could be declared final 74
Parameter 'transientFlag' is not assigned and could be declared final 84

Tobago Core - org/apache/myfaces/tobago/event/FacesEventWrapper.java

Violation Line
Private field 'wrappedFacesEvent' could be made final; it is only initialized in the declaration or constructor. 31

Tobago Core - org/apache/myfaces/tobago/event/MethodExpressionStateChangeListener.java

Violation Line
Avoid using redundant field initializer for 'isTransient' 33
Document empty constructor 3536

Tobago Core - org/apache/myfaces/tobago/event/MethodExpressionTabChangeListener.java

Violation Line
Avoid using redundant field initializer for 'isTransient' 33
Document empty constructor 3536

Tobago Core - org/apache/myfaces/tobago/event/MethodExpressionTreeExpansionListener.java

Violation Line
Avoid using redundant field initializer for 'isTransient' 34
Document empty constructor 3637
Avoid unused private methods such as 'elContext()'. 48

Tobago Core - org/apache/myfaces/tobago/event/MethodExpressionTreeSelectedListener.java

Violation Line
Avoid using redundant field initializer for 'isTransient' 33
Document empty constructor 3536
Avoid unused private methods such as 'elContext()'. 47

Tobago Core - org/apache/myfaces/tobago/event/PageAction.java

Violation Line
Avoid if (x != y) ..; else ..; 8589

Tobago Core - org/apache/myfaces/tobago/event/PageActionEvent.java

Violation Line
Private field 'action' could be made final; it is only initialized in the declaration or constructor. 31

Tobago Core - org/apache/myfaces/tobago/event/ResetInputActionListener.java

Violation Line
Document empty constructor 3435
Consider using varargs for methods or constructors which take an array the last parameter. 37

Tobago Core - org/apache/myfaces/tobago/event/SortActionEvent.java

Violation Line
Private field 'column' could be made final; it is only initialized in the declaration or constructor. 31

Tobago Core - org/apache/myfaces/tobago/event/TreeExpansionEvent.java

Violation Line
Private field 'oldExpanded' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'newExpanded' could be made final; it is only initialized in the declaration or constructor. 31

Tobago Core - org/apache/myfaces/tobago/event/TreeSelectedEvent.java

Violation Line
Private field 'oldSelected' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'newSelected' could be made final; it is only initialized in the declaration or constructor. 31

Tobago Core - org/apache/myfaces/tobago/event/ValueExpressionResetInputActionListener.java

Violation Line
Document empty constructor 4445

Tobago Core - org/apache/myfaces/tobago/event/ValueExpressionSheetStateChangeListener.java

Violation Line
Document empty constructor 3738
Avoid if (x != y) ..; else ..; 4852
No need to check for null before an instanceof 85

Tobago Core - org/apache/myfaces/tobago/event/ValueExpressionTabChangeListener.java

Violation Line
Document empty constructor 3738
Avoid if (x != y) ..; else ..; 4852
No need to check for null before an instanceof 85

Tobago Core - org/apache/myfaces/tobago/facelets/AttributeHandler.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20354
Possible God class (WMC=75, ATFD=82, TCC=0.027777777777777776) 20354
The class 'AttributeHandler' has a Cyclomatic Complexity of 7 (Highest = 55). 56354
The class 'AttributeHandler' has a Standard Cyclomatic Complexity of 6 (Highest = 49). 56354
The class 'AttributeHandler' has a Modified Cyclomatic Complexity of 6 (Highest = 49). 56354
The method apply() has an NCSS line count of 155 74271
The method 'apply' has a Cyclomatic Complexity of 55. 74271
Avoid really long methods. 74271
The method 'apply' has a Modified Cyclomatic Complexity of 49. 74271
The method 'apply' has a Standard Cyclomatic Complexity of 49. 74271
Avoid if (x != y) ..; else ..; 81269
Avoid if (x != y) ..; else ..; 85103
Avoid if (x != y) ..; else ..; 108126
Avoid if (x != y) ..; else ..; 194201
Consider using varargs for methods or constructors which take an array the last parameter. 295
Avoid if (x != y) ..; else ..; 301307

Tobago Core - org/apache/myfaces/tobago/facelets/ConverterHandler.java

Violation Line
Avoid declaring a variable if it is unreferenced before a possible exit point. 54
New exception is thrown in catch block, original stack trace may be lost 66
Deeply nested if..then statements are hard to read 6870

Tobago Core - org/apache/myfaces/tobago/facelets/FixCharacterEncodingFilter.java

Violation Line
Document empty method 5758

Tobago Core - org/apache/myfaces/tobago/facelets/GridLayoutConstraintHandler.java

Violation Line
Parameter 'parent' is not assigned and could be declared final 48

Tobago Core - org/apache/myfaces/tobago/facelets/MetaInfResourcesClasspathResourceResolver.java

Violation Line
Avoid reassigning parameters such as 'path' 55
Avoid reassigning parameters such as 'path' 55
This call to String.startsWith can be rewritten using String.charAt(0) 61

Tobago Core - org/apache/myfaces/tobago/facelets/Resource.java

Violation Line
These nested if statements could be combined 7274
Document empty method 114115
Avoid if (x != y) ..; else ..; 136

Tobago Core - org/apache/myfaces/tobago/facelets/ScriptHandler.java

Violation Line
Document empty method 5051

Tobago Core - org/apache/myfaces/tobago/facelets/SegmentLayoutRule.java

Violation Line
These nested if statements could be combined 3953
Local variable 'a' could be declared final 40
Deeply nested if..then statements are hard to read 4143
Deeply nested if..then statements are hard to read 4446
Deeply nested if..then statements are hard to read 4749
Deeply nested if..then statements are hard to read 5052

Tobago Core - org/apache/myfaces/tobago/facelets/SheetStateChangeSourceRule.java

Violation Line
These nested if statements could be combined 4143

Tobago Core - org/apache/myfaces/tobago/facelets/SortActionSourceRule.java

Violation Line
These nested if statements could be combined 4244

Tobago Core - org/apache/myfaces/tobago/facelets/SuggestMethodRule.java

Violation Line
These nested if statements could be combined 4244
These nested if statements could be combined 4751
Deeply nested if..then statements are hard to read 4850
These nested if statements could be combined 4850

Tobago Core - org/apache/myfaces/tobago/facelets/SupportsMarkupRule.java

Violation Line
Local variable 'a' could be declared final 41

Tobago Core - org/apache/myfaces/tobago/facelets/TabChangeListenerHandler.java

Violation Line
New exception is thrown in catch block, original stack trace may be lost 77
Deeply nested if..then statements are hard to read 7981
Avoid if (x != y) ..; else ..; 8388

Tobago Core - org/apache/myfaces/tobago/facelets/TabChangeSourceRule.java

Violation Line
These nested if statements could be combined 3840

Tobago Core - org/apache/myfaces/tobago/facelets/TagMethodExpression.java

Violation Line
New exception is thrown in catch block, original stack trace may be lost 64
New exception is thrown in catch block, original stack trace may be lost 66
New exception is thrown in catch block, original stack trace may be lost 68
Consider using varargs for methods or constructors which take an array the last parameter. 73
New exception is thrown in catch block, original stack trace may be lost 77
New exception is thrown in catch block, original stack trace may be lost 79
New exception is thrown in catch block, original stack trace may be lost 81

Tobago Core - org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java

Violation Line
Local variable 'validator' could be declared final 94
Local variable 'entry' could be declared final 97
Local variable 'next' could be declared final 103

Tobago Core - org/apache/myfaces/tobago/internal/ajax/AjaxInternalUtils.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 64

Tobago Core - org/apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 63

Tobago Core - org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java

Violation Line
Private field 'viewRoot' could be made final; it is only initialized in the declaration or constructor. 52
Private field 'messages' could be made final; it is only initialized in the declaration or constructor. 54
Avoid if (x != y) ..; else ..; 113117
Avoid if (x != y) ..; else ..; 125132
Use equals() to compare object references. 136
Parameter 'facesContext' is not assigned and could be declared final 184
Local variable 'throwable' could be declared final 188
Parameter 'facesContext' is not assigned and could be declared final 196

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIBar.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2225

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIButton.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2224

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIButtons.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUICollapsiblePanel.java

Violation Line
Avoid unused private fields such as 'LOG'. 34
Parameter 'submittedCollapsed' is not assigned and could be declared final 85
Avoid if (x != y) ..; else ..; 9296

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIColumnNode.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2728

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIColumnSelector.java

Violation Line
An empty method in an abstract class should be abstract instead 3234

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUICommand.java

Violation Line
Avoid unused private fields such as 'LOG'. 51
Parameter 'event' is not assigned and could be declared final 64
Local variable 'operation' could be declared final 69
Avoid instantiating new objects inside loops 70
Local variable 'child' could be declared final 117
Do not use if statements that are always true or always false 135
Local variable 'bool' could be declared final 147
Parameter 'disabled' is not assigned and could be declared final 154

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUICommands.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIData.java

Violation Line
The String literal "Not a tree model" appears 4 times in this file; the first occurrence is on line 71 71
Avoid if (x != y) ..; else ..; 8084
Avoid if (x != y) ..; else ..; 146150
Avoid if (x != y) ..; else ..; 155
Avoid if (x != y) ..; else ..; 160
String.indexOf(char) is faster than String.indexOf(String). 201

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2932

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2427

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java

Violation Line
Avoid instantiating new objects inside loops 61
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 92
Avoid appending characters as strings in StringBuffer.append. 92
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 93
Avoid appending characters as strings in StringBuffer.append. 94
Avoid appending characters as strings in StringBuffer.append. 104
Avoid appending characters as strings in StringBuffer.append. 114

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIIn.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2224

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUILabel.java

Violation Line
Avoid if (x != y) ..; else ..; 3339
Avoid if (x != y) ..; else ..; 3539

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUILayoutBase.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2729

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIMediator.java

Violation Line
Avoid unused private fields such as 'LOG'. 33

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIMessages.java

Violation Line
Avoid if (x != y) ..; else ..; 4246
Avoid declaring a variable if it is unreferenced before a possible exit point. 64
Avoid instantiating new objects inside loops 74

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIObject.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2627

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIOut.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2728

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIPage.java

Violation Line
The class 'AbstractUIPage' has a Cyclomatic Complexity of 3 (Highest = 11). 35159
Avoid if (x != y) ..; else ..; 6973
The method 'markSubmittedForm' has a Cyclomatic Complexity of 11. 102158
Avoid if (x != y) ..; else ..; 113120
Avoid if (x != y) ..; else ..; 144157

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIPanelBase.java

Violation Line
Avoid if (x != y) ..; else ..; 4650

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIPopup.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2426

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java

Violation Line
Avoid unused private fields such as 'LOG'. 37
Parameter 'event' is not assigned and could be declared final 51
Local variable 'model' could be declared final 56
Local variable 'm' could be declared final 58
Do not add empty strings 70
Avoid if (x != y) ..; else ..; 7276

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUIScript.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2728

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISection.java

Violation Line
Parameter 'context' is not assigned and could be declared final 55
Avoid if (x != y) ..; else ..; 5963
Parameter 'level' is not assigned and could be declared final 73

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISegmentLayout.java

Violation Line
Local variable 'builder' could be declared final 35

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java

Violation Line
These nested if statements could be combined 7077

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISelectManyCheckbox.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java

Violation Line
Avoid if (x != y) ..; else ..; 5865

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISelectOneRadio.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISeparator.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2627

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISheet.java

Violation Line
Possible God class (WMC=126, ATFD=45, TCC=0.013131313131313131) 20591
A high number of imports can indicate a high degree of coupling within an object. 20591
The class 'AbstractUISheet' has a Modified Cyclomatic Complexity of 2 (Highest = 12). 66591
The class 'AbstractUISheet' has a Standard Cyclomatic Complexity of 3 (Highest = 17). 66591
The class 'AbstractUISheet' has a Cyclomatic Complexity of 3 (Highest = 19). 66591
This class has too many methods, consider refactoring it. 68591
Avoid if (x != y) ..; else ..; 9195
Parameter 'event' is not assigned and could be declared final 132
Local variable 'layoutToken' could be declared final 144
Avoid if (x != y) ..; else ..; 270274
Avoid if (x != y) ..; else ..; 280288
Avoid if (x != y) ..; else ..; 301309
Avoid if (x != y) ..; else ..; 308
Avoid if (x != y) ..; else ..; 319
Local variable 'result' could be declared final 341
Parameter 'facesContext' is not assigned and could be declared final 405
Local variable 'columnSpan' could be declared final 429
Local variable 'rowSpan' could be declared final 430
Avoid instantiating new objects inside loops 431
Parameter 'facesContext' is not assigned and could be declared final 437
Avoid reassigning parameters such as 'event' 437
Avoid if (x != y) ..; else ..; 441453
Avoid reassigning parameters such as 'searchId' 478
The method 'performPaging' has a Modified Cyclomatic Complexity of 12. 494555
The method 'performPaging' has a Standard Cyclomatic Complexity of 17. 494555
The method 'performPaging' has a Cyclomatic Complexity of 19. 494555
A switch statement does not contain a break 502545
Avoid if (x != y) ..; else ..; 548552

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java

Violation Line
Avoid if (x != y) ..; else ..; 7685
Parameter 'query' is not assigned and could be declared final 88
Avoid if (x != y) ..; else ..; 9098

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java

Violation Line
Possible God class (WMC=59, ATFD=22, TCC=0.0) 20304
The class 'AbstractUITabGroup' has a Standard Cyclomatic Complexity of 2 (Highest = 11). 51304
The class 'AbstractUITabGroup' has a Modified Cyclomatic Complexity of 2 (Highest = 11). 51304
The class 'AbstractUITabGroup' has a Cyclomatic Complexity of 2 (Highest = 11). 51304
This class has too many methods, consider refactoring it. 52304
An empty method in an abstract class should be abstract instead 5960
Document empty method 5960
The method 'processDecodes' has a Standard Cyclomatic Complexity of 11. 107147
The method 'processDecodes' has a Cyclomatic Complexity of 11. 107147
The method 'processDecodes' has a Modified Cyclomatic Complexity of 11. 107147
Use opposite operator instead of the logic complement operator. 108
Avoid if (x != y) ..; else ..; 108146
Local variable 'facet' could be declared final 124
Use opposite operator instead of the logic complement operator. 151
Avoid if (x != y) ..; else ..; 151165
Avoid if (x != y) ..; else ..; 170185
Use opposite operator instead of the logic complement operator. 170
Use opposite operator instead of the logic complement operator. 206
Avoid if (x != y) ..; else ..; 214218

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUITextarea.java

Violation Line
An empty method in an abstract class should be abstract instead 2527

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUITreeCommand.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2223

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUITreeIndent.java

Violation Line
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead. 2627

Tobago Core - org/apache/myfaces/tobago/internal/component/AbstractUITreeNode.java

Violation Line
An empty method in an abstract class should be abstract instead 2527

Tobago Core - org/apache/myfaces/tobago/internal/config/ContentSecurityPolicy.java

Violation Line
Avoid using redundant field initializer for 'unmodifiable' 31

Tobago Core - org/apache/myfaces/tobago/internal/config/RenderersConfigImpl.java

Violation Line
Avoid unused private fields such as 'LOG'. 37
Avoid using redundant field initializer for 'merged' 40
Avoid using redundant field initializer for 'unmodifiable' 42

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigBuilder.java

Violation Line
Private field 'list' could be made final; it is only initialized in the declaration or constructor. 45
Avoid unused local variables such as 'builder'. 72
Avoid instantiating new objects inside loops 103

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigEntityResolver.java

Violation Line
Position literals first in String comparisons 52
Position literals first in String comparisons 54
Position literals first in String comparisons 56
Position literals first in String comparisons 58
Avoid if (x != y) ..; else ..; 6369

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigFragment.java

Violation Line
Too many fields 33210
Private field 'before' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'after' could be made final; it is only initialized in the declaration or constructor. 39
Private field 'supportedThemeNames' could be made final; it is only initialized in the declaration or constructor. 41
Private field 'resourceDirs' could be made final; it is only initialized in the declaration or constructor. 43
Private field 'themeDefinitions' could be made final; it is only initialized in the declaration or constructor. 50
Private field 'mimeTypes' could be made final; it is only initialized in the declaration or constructor. 54
Parameter 'sanitizerClass' is not assigned and could be declared final 186
Parameter 'sanitizerProperties' is not assigned and could be declared final 194
Parameter 'type' is not assigned and could be declared final 198
Parameter 'extension' is not assigned and could be declared final 198
Avoid if (x != y) ..; else ..; 208

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigImpl.java

Violation Line
Possible God class (WMC=69, ATFD=26, TCC=0.08333333333333333) 20431
The class 'TobagoConfigImpl' has a Modified Cyclomatic Complexity of 2 (Highest = 11). 53431
The class 'TobagoConfigImpl' has a Standard Cyclomatic Complexity of 2 (Highest = 11). 53431
Too many fields 53431
The class 'TobagoConfigImpl' has a Cyclomatic Complexity of 2 (Highest = 11). 53431
Private field 'contentSecurityPolicy' could be made final; it is only initialized in the declaration or constructor. 68
Avoid using redundant field initializer for 'unmodifiable' 74
Local variable 'theme' could be declared final 95
The method 'resolveThemes' has a Cyclomatic Complexity of 11. 122168
The method 'resolveThemes' has a Standard Cyclomatic Complexity of 11. 122168
The method 'resolveThemes' has a Modified Cyclomatic Complexity of 11. 122168
Avoid if (x != y) ..; else ..; 129156
Parameter 'availableTheme' is not assigned and could be declared final 227
The method 'initProjectState' has a Modified Cyclomatic Complexity of 10. 251290
The method 'initProjectState' has a Standard Cyclomatic Complexity of 10. 251290
The method 'initProjectState' has a Cyclomatic Complexity of 10. 251290
Use block level rather than method level synchronization 292311
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 301
Parameter 'sanitizer' is not assigned and could be declared final 372
StringBuffer constructor is initialized with size 16, but has at least 293 characters appended. 393
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 394
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 394
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 400
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 401
Avoid if (x != y) ..; else ..; 401
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 402
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 403
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 404
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 405
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 406
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 407
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 408
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 409
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 410
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 411
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 412
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 413
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 414
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 415
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 416
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 417
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 418
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 419
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 420
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 421
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 425
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 426
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 427

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigParser.java

Violation Line
Possible God class (WMC=106, ATFD=38, TCC=0.05454545454545454) 20464
The class 'TobagoConfigParser' has a Standard Cyclomatic Complexity of 6 (Highest = 32). 48464
This class has too many methods, consider refactoring it. 48464
The class 'TobagoConfigParser' has a Cyclomatic Complexity of 6 (Highest = 32). 48464
StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 95
Perhaps 'extension' could be replaced by a local variable. 98
Perhaps 'type' could be replaced by a local variable. 99
Document empty constructor 103104
The method 'startElement' has a Standard Cyclomatic Complexity of 16. 155259
Avoid really long methods. 155259
The method 'startElement' has a Cyclomatic Complexity of 16. 155259
A switch statement does not contain a break 164258
Avoid if (x != y) ..; else ..; 176180
The method endElement() has an NCSS line count of 116 267422
Avoid really long methods. 267422
The method 'endElement' has a Standard Cyclomatic Complexity of 32. 267422
The method 'endElement' has a Cyclomatic Complexity of 32. 267422
A switch statement does not contain a break 277306
Avoid if (x != y) ..; else ..; 293297

Tobago Core - org/apache/myfaces/tobago/internal/config/TobagoConfigSorter.java

Violation Line
Possible God class (WMC=65, ATFD=63, TCC=0.20952380952380953) 20337
The class 'TobagoConfigSorter' has a Cyclomatic Complexity of 5 (Highest = 18). 36337
The class 'TobagoConfigSorter' has a Standard Cyclomatic Complexity of 5 (Highest = 18). 36337
This class has too many methods, consider refactoring it. 36337
The class 'TobagoConfigSorter' has a Modified Cyclomatic Complexity of 5 (Highest = 18). 36337
Private field 'list' could be made final; it is only initialized in the declaration or constructor. 40
Prefer StringBuffer over += for concatenating strings 66
The method 'merge' has a Cyclomatic Complexity of 18. 73164
The method merge() has an NPath complexity of 24579 73164
The method 'merge' has a Standard Cyclomatic Complexity of 18. 73164
The method 'merge' has a Modified Cyclomatic Complexity of 18. 73164
Local variable 'theme' could be declared final 135
Avoid instantiating new objects inside loops 175
Avoid instantiation through private constructors from outside of the constructors class. 175
Avoid instantiating new objects inside loops 186
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 187
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 188
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 189
The String literal "' < '" appears 4 times in this file; the first occurrence is on line 189 189
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 190
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 191
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 191
Avoid appending characters as strings in StringBuffer.append. 194
Avoid instantiating new objects inside loops 210
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 211
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 212
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 213
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 214
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 215
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 216
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 217
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 218
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 219
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 219
Avoid appending characters as strings in StringBuffer.append. 222
Avoid instantiation through private constructors from outside of the constructors class. 255
Avoid instantiating new objects inside loops 255
Avoid instantiating new objects inside loops 261
Avoid instantiation through private constructors from outside of the constructors class. 261
Parameter 'tobagoConfig' is not assigned and could be declared final 289
Parameter 'map' is not assigned and could be declared final 289

Tobago Core - org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java

Violation Line
The class 'ClientPropertiesKey' has a Cyclomatic Complexity of 2 (Highest = 10). 32135
The method 'equals' has a Cyclomatic Complexity of 10. 6898

Tobago Core - org/apache/myfaces/tobago/internal/context/DateTimeI18n.java

Violation Line
A class which only has private constructors should be final 31106
Parameter 'locale' is not assigned and could be declared final 44
Unnecessary use of fully qualified name 'java.util.Calendar.MONTH' due to existing import 'java.util.Calendar' 56
Use block level rather than method level synchronization 7381
Parameter 'locale' is not assigned and could be declared final 73

Tobago Core - org/apache/myfaces/tobago/internal/context/ImageCacheKey.java

Violation Line
Parameter 'o' is not assigned and could be declared final 36
Local variable 'that' could be declared final 44
Avoid if (x != y) ..; else ..; 49

Tobago Core - org/apache/myfaces/tobago/internal/context/MeasureValue.java

Violation Line
Private field 'value' could be made final; it is only initialized in the declaration or constructor. 31
Avoid if (x != y) ..; else ..; 52
Avoid if (x != y) ..; else ..; 61
Do not add empty strings 66

Tobago Core - org/apache/myfaces/tobago/internal/context/ResourceLocator.java

Violation Line
Possible God class (WMC=71, ATFD=41, TCC=0.07575757575757576) 20450
The class 'ResourceLocator' has a Cyclomatic Complexity of 6 (Highest = 14). 61450
The class 'ResourceLocator' has a Standard Cyclomatic Complexity of 5 (Highest = 12). 61450
The class 'ResourceLocator' has a Modified Cyclomatic Complexity of 5 (Highest = 12). 61450
This class has too many methods, consider refactoring it. 61450
Private field 'servletContext' could be made final; it is only initialized in the declaration or constructor. 69
Private field 'resourceManager' could be made final; it is only initialized in the declaration or constructor. 70
The method 'locateResourcesInWar' has a Cyclomatic Complexity of 14. 85136
The method 'locateResourcesInWar' has a Modified Cyclomatic Complexity of 12. 85136
The method locateResourcesInWar() has an NPath complexity of 240 85136
The method 'locateResourcesInWar' has a Standard Cyclomatic Complexity of 12. 85136
Avoid reassigning parameters such as 'path' 86
Avoid instantiating new objects inside loops 150
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 163
Avoid if (x != y) ..; else ..; 236240
The method 'addResourcesFromZip' has a Modified Cyclomatic Complexity of 11. 275330
The method 'addResourcesFromZip' has a Standard Cyclomatic Complexity of 11. 275330
The method addResourcesFromZip() has an NPath complexity of 288 275330
The method 'addResourcesFromZip' has a Cyclomatic Complexity of 12. 275330
Avoid reassigning parameters such as 'fileName' 276
Avoid reassigning parameters such as 'fileName' 276
Avoid reassigning parameters such as 'fileName' 276
String.indexOf(char) is faster than String.indexOf(String). 280
Do not add empty strings 285
Position literals first in String comparisons 289
Position literals first in String comparisons 298
Avoid reassigning parameters such as 'resourcePath' 364
Avoid reassigning parameters such as 'resourcePath' 364
This call to String.startsWith can be rewritten using String.charAt(0) 365
Avoid declaring a variable if it is unreferenced before a possible exit point. 379
Avoid declaring a variable if it is unreferenced before a possible exit point. 386
Avoid if (x != y) ..; else ..; 440446

Tobago Core - org/apache/myfaces/tobago/internal/context/ResourceManagerFactory.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 37

Tobago Core - org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java

Violation Line
Possible God class (WMC=109, ATFD=52, TCC=0.05128205128205128) 20567
The class 'ResourceManagerImpl' has a Modified Cyclomatic Complexity of 5 (Highest = 21). 40567
The class 'ResourceManagerImpl' has a Cyclomatic Complexity of 6 (Highest = 35). 40567
The class 'ResourceManagerImpl' has a Standard Cyclomatic Complexity of 5 (Highest = 21). 40567
Avoid unused private fields such as 'JSP'. 44
Private field 'production' could be made final; it is only initialized in the declaration or constructor. 60
Private field 'tobagoConfig' could be made final; it is only initialized in the declaration or constructor. 80
Avoid if (x != y) ..; else ..; 123127
Avoid if (x != y) ..; else ..; 152158
Avoid if (x != y) ..; else ..; 217221
These nested if statements could be combined 225227
The method getPaths() has an NPath complexity of 7540 236332
The method 'getPaths' has a Standard Cyclomatic Complexity of 21. 236332
The method 'getPaths' has a Modified Cyclomatic Complexity of 21. 236332
The method 'getPaths' has a Cyclomatic Complexity of 35. 236332
Avoid long parameter lists. 236239
Avoid reassigning parameters such as 'ignoreMissing' 239
Avoid declaring a variable if it is unreferenced before a possible exit point. 241
Avoid declaring a variable if it is unreferenced before a possible exit point. 242
Avoid declaring a variable if it is unreferenced before a possible exit point. 243
The method 'checkPath' has a Modified Cyclomatic Complexity of 10. 334376
The method 'checkPath' has a Standard Cyclomatic Complexity of 10. 334376
Avoid long parameter lists. 334337
The method 'checkPath' has a Cyclomatic Complexity of 11. 334376
Avoid if (x != y) ..; else ..; 355374
The String literal "testing path: " appears 6 times in this file; the first occurrence is on line 360 360
Avoid long parameter lists. 378382
The method 'checkPath' has a Modified Cyclomatic Complexity of 11. 378425
The method 'checkPath' has a Standard Cyclomatic Complexity of 11. 378425
The method 'checkPath' has a Cyclomatic Complexity of 14. 378425
Avoid if (x != y) ..; else ..; 404423
Avoid long parameter lists. 427430
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 433
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 439
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 440
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 441
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 442
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 443
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 449
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 454
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 469
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 474
Prefer StringBuffer over += for concatenating strings 494
Avoid if (x != y) ..; else ..; 541549

Tobago Core - org/apache/myfaces/tobago/internal/context/StringValue.java

Violation Line
Private field 'value' could be made final; it is only initialized in the declaration or constructor. 29
Avoid if (x != y) ..; else ..; 50
Avoid if (x != y) ..; else ..; 59

Tobago Core - org/apache/myfaces/tobago/internal/context/ThemeConfigCacheKey.java

Violation Line
Avoid if (x != y) ..; else ..; 59
Avoid if (x != y) ..; else ..; 73

Tobago Core - org/apache/myfaces/tobago/internal/layout/Grid.java

Violation Line
The class 'Grid' has a Standard Cyclomatic Complexity of 6 (Highest = 51). 30447
The class 'Grid' has a Modified Cyclomatic Complexity of 6 (Highest = 51). 30447
The class 'Grid' has a Cyclomatic Complexity of 6 (Highest = 55). 30447
Private field 'cells' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'columns' could be made final; it is only initialized in the declaration or constructor. 40
Private field 'rows' could be made final; it is only initialized in the declaration or constructor. 41
Private field 'columnCount' could be made final; it is only initialized in the declaration or constructor. 43
Avoid reassigning parameters such as 'columnSpan' 68
Avoid reassigning parameters such as 'columnSpan' 68
Avoid instantiating new objects inside loops 100
The method gridAsString() has an NCSS line count of 175 203431
The method 'gridAsString' has a Standard Cyclomatic Complexity of 51. 203431
The method 'gridAsString' has a Cyclomatic Complexity of 55. 203431
The method 'gridAsString' has a Modified Cyclomatic Complexity of 51. 203431
Avoid really long methods. 203431
The method gridAsString() has an NPath complexity of 11503356 203431
StringBuffer constructor is initialized with size 16, but has at least 17 characters appended. 205
Avoid if (x != y) ..; else ..; 210214
Avoid appending characters as strings in StringBuffer.append. 211
Avoid appending characters as strings in StringBuffer.append. 213
Avoid appending characters as strings in StringBuffer.append. 219
Avoid appending characters as strings in StringBuffer.append. 222
Avoid appending characters as strings in StringBuffer.append. 225
Avoid appending characters as strings in StringBuffer.append. 227
Avoid appending characters as strings in StringBuffer.append. 229
Avoid if (x != y) ..; else ..; 234238
Avoid appending characters as strings in StringBuffer.append. 235
Avoid appending characters as strings in StringBuffer.append. 237
Avoid if (x != y) ..; else ..; 241245
Avoid appending characters as strings in StringBuffer.append. 242
Avoid appending characters as strings in StringBuffer.append. 244
Avoid appending characters as strings in StringBuffer.append. 246
Avoid appending characters as strings in StringBuffer.append. 257
Avoid appending characters as strings in StringBuffer.append. 260
Avoid appending characters as strings in StringBuffer.append. 263
Avoid appending characters as strings in StringBuffer.append. 265
Avoid appending characters as strings in StringBuffer.append. 267
Avoid appending characters as strings in StringBuffer.append. 282
Avoid appending characters as strings in StringBuffer.append. 284
Avoid appending characters as strings in StringBuffer.append. 287
Avoid appending characters as strings in StringBuffer.append. 292
Avoid appending characters as strings in StringBuffer.append. 294
Avoid appending characters as strings in StringBuffer.append. 296
Avoid appending characters as strings in StringBuffer.append. 301
Avoid appending characters as strings in StringBuffer.append. 303
Avoid appending characters as strings in StringBuffer.append. 307
Avoid appending characters as strings in StringBuffer.append. 309
Avoid appending characters as strings in StringBuffer.append. 318
Avoid appending characters as strings in StringBuffer.append. 320
Avoid appending characters as strings in StringBuffer.append. 326
Avoid appending characters as strings in StringBuffer.append. 329
Avoid appending characters as strings in StringBuffer.append. 332
Avoid appending characters as strings in StringBuffer.append. 334
Avoid appending characters as strings in StringBuffer.append. 336
Avoid appending characters as strings in StringBuffer.append. 340
Avoid if (x != y) ..; else ..; 346350
Avoid appending characters as strings in StringBuffer.append. 347
Avoid appending characters as strings in StringBuffer.append. 349
Avoid appending characters as strings in StringBuffer.append. 355
Avoid appending characters as strings in StringBuffer.append. 357
Avoid appending characters as strings in StringBuffer.append. 361
Avoid appending characters as strings in StringBuffer.append. 364
Avoid appending characters as strings in StringBuffer.append. 367
Avoid appending characters as strings in StringBuffer.append. 372
Avoid appending characters as strings in StringBuffer.append. 374
Avoid appending characters as strings in StringBuffer.append. 378
Avoid if (x != y) ..; else ..; 382386
Avoid appending characters as strings in StringBuffer.append. 383
Avoid appending characters as strings in StringBuffer.append. 385
Avoid appending characters as strings in StringBuffer.append. 387
Avoid if (x != y) ..; else ..; 393397
Avoid appending characters as strings in StringBuffer.append. 394
Avoid appending characters as strings in StringBuffer.append. 396
Avoid appending characters as strings in StringBuffer.append. 402
Avoid appending characters as strings in StringBuffer.append. 405
Avoid appending characters as strings in StringBuffer.append. 408
Avoid appending characters as strings in StringBuffer.append. 410
Avoid appending characters as strings in StringBuffer.append. 412
Avoid if (x != y) ..; else ..; 417421
Avoid appending characters as strings in StringBuffer.append. 418
Avoid appending characters as strings in StringBuffer.append. 420
Avoid if (x != y) ..; else ..; 423427
Avoid appending characters as strings in StringBuffer.append. 424
Avoid appending characters as strings in StringBuffer.append. 426
Avoid appending characters as strings in StringBuffer.append. 428

Tobago Core - org/apache/myfaces/tobago/internal/layout/LayoutUtils.java

Violation Line
Parameter 'component' is not assigned and could be declared final 85
Avoid if (x != y) ..; else ..; 8993
Avoid if (x != y) ..; else ..; 96100

Tobago Core - org/apache/myfaces/tobago/internal/layout/MathUtils.java

Violation Line
Avoid reassigning parameters such as 'bias' 36
Avoid unused local variables such as 'ignored'. 37
Consider using varargs for methods or constructors which take an array the last parameter. 53
Consider using varargs for methods or constructors which take an array the last parameter. 70

Tobago Core - org/apache/myfaces/tobago/internal/layout/OriginCell.java

Violation Line
Private field 'component' could be made final; it is only initialized in the declaration or constructor. 26

Tobago Core - org/apache/myfaces/tobago/internal/layout/SpanCell.java

Violation Line
Private field 'origin' could be made final; it is only initialized in the declaration or constructor. 26
Private field 'horizontalFirst' could be made final; it is only initialized in the declaration or constructor. 27
Private field 'verticalFirst' could be made final; it is only initialized in the declaration or constructor. 28

Tobago Core - org/apache/myfaces/tobago/internal/taglib/component/MessagesTagDeclaration.java

Violation Line
The String literal "boolean" appears 4 times in this file; the first occurrence is on line 54 54

Tobago Core - org/apache/myfaces/tobago/internal/taglib/component/SegmentLayoutTagDeclaration.java

Violation Line
The String literal "org.apache.myfaces.tobago.layout.ColumnPartition" appears 4 times in this file; the first occurrence is on line 52 52

Tobago Core - org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java

Violation Line
The String literal "boolean" appears 4 times in this file; the first occurrence is on line 72 72

Tobago Core - org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java

Violation Line
The String literal "org.apache.myfaces.tobago.layout.Measure" appears 18 times in this file; the first occurrence is on line 72 72

Tobago Core - org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java

Violation Line
The String literal "java.lang.Integer" appears 4 times in this file; the first occurrence is on line 84 84

Tobago Core - org/apache/myfaces/tobago/internal/util/AccessKeyLogger.java

Violation Line
Parameter 'clientId' is not assigned and could be declared final 55
Local variable 'entry' could be declared final 76

Tobago Core - org/apache/myfaces/tobago/internal/util/ArrayUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2234

Tobago Core - org/apache/myfaces/tobago/internal/util/AuthorizationHelper.java

Violation Line
The class 'AuthorizationHelper' has a Modified Cyclomatic Complexity of 5 (Highest = 12). 47228
The class 'AuthorizationHelper' has a Cyclomatic Complexity of 5 (Highest = 13). 47228
The class 'AuthorizationHelper' has a Standard Cyclomatic Complexity of 5 (Highest = 13). 47228
The method 'isAuthorized' has a Cyclomatic Complexity of 10. 97130
The method 'isAuthorized' has a Modified Cyclomatic Complexity of 10. 97130
The method 'isAuthorized' has a Standard Cyclomatic Complexity of 10. 97130
Parameter 'expression' is not assigned and could be declared final 132
The method 'getSecurityAnnotation' has a Modified Cyclomatic Complexity of 12. 132192
The method 'getSecurityAnnotation' has a Cyclomatic Complexity of 13. 132192
The method 'getSecurityAnnotation' has a Standard Cyclomatic Complexity of 13. 132192
Avoid if (x != y) ..; else ..; 148159
Local variable 'entry' could be declared final 149
A switch statement does not contain a break 164174
Parameter 'name' is not assigned and could be declared final 210
Parameter 'bean' is not assigned and could be declared final 210
Local variable 'method' could be declared final 220

Tobago Core - org/apache/myfaces/tobago/internal/util/Deprecation.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 49

Tobago Core - org/apache/myfaces/tobago/internal/util/FastStringWriter.java

Violation Line
StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 27

Tobago Core - org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java

Violation Line
The class 'HtmlWriterUtils' has a Modified Cyclomatic Complexity of 7 (Highest = 10). 25124
The class 'HtmlWriterUtils' has a Standard Cyclomatic Complexity of 7 (Highest = 10). 25124
The class 'HtmlWriterUtils' has a Cyclomatic Complexity of 9 (Highest = 14). 25124
The method 'writeEncodedValue' has a Modified Cyclomatic Complexity of 10. 62123
The method 'writeEncodedValue' has a Cyclomatic Complexity of 14. 62123
The method 'writeEncodedValue' has a Standard Cyclomatic Complexity of 10. 62123
Avoid if (x != y) ..; else ..; 9599

Tobago Core - org/apache/myfaces/tobago/internal/util/JavascriptWriterUtils.java

Violation Line
The class 'JavascriptWriterUtils' has a Standard Cyclomatic Complexity of 7 (Highest = 10). 25120
The class 'JavascriptWriterUtils' has a Cyclomatic Complexity of 9 (Highest = 14). 25120
The class 'JavascriptWriterUtils' has a Modified Cyclomatic Complexity of 7 (Highest = 10). 25120
The method 'writeEncodedValue' has a Modified Cyclomatic Complexity of 10. 58119
The method 'writeEncodedValue' has a Standard Cyclomatic Complexity of 10. 58119
The method 'writeEncodedValue' has a Cyclomatic Complexity of 14. 58119
Avoid if (x != y) ..; else ..; 9195

Tobago Core - org/apache/myfaces/tobago/internal/util/JndiUtils.java

Violation Line
Prefer StringBuffer over += for concatenating strings 57

Tobago Core - org/apache/myfaces/tobago/internal/util/JsonWriterUtils.java

Violation Line
The class 'JsonWriterUtils' has a Standard Cyclomatic Complexity of 7 (Highest = 10). 26125
The class 'JsonWriterUtils' has a Modified Cyclomatic Complexity of 7 (Highest = 10). 26125
The class 'JsonWriterUtils' has a Cyclomatic Complexity of 9 (Highest = 14). 26125
The method 'writeEncodedValue' has a Cyclomatic Complexity of 14. 63124
The method 'writeEncodedValue' has a Modified Cyclomatic Complexity of 10. 63124
The method 'writeEncodedValue' has a Standard Cyclomatic Complexity of 10. 63124
Avoid if (x != y) ..; else ..; 96100

Tobago Core - org/apache/myfaces/tobago/internal/util/MimeTypeUtils.java

Violation Line
The class 'MimeTypeUtils' has a Modified Cyclomatic Complexity of 8 (Highest = 21). 27106
The class 'MimeTypeUtils' has a Standard Cyclomatic Complexity of 8 (Highest = 21). 27106
The class 'MimeTypeUtils' has a Cyclomatic Complexity of 8 (Highest = 21). 27106
Avoid using redundant field initializer for 'additionalMimeTypes' 29
The method 'getMimeTypeForFile' has a Cyclomatic Complexity of 21. 3696
The method 'getMimeTypeForFile' has a Standard Cyclomatic Complexity of 21. 3696
The method getMimeTypeForFile() has an NPath complexity of 290 3696
The method 'getMimeTypeForFile' has a Modified Cyclomatic Complexity of 21. 3696
Local variable 'length' could be declared final 37
These nested if statements could be combined 8486
Local variable 'extension' could be declared final 91
Parameter 'servletContext' is not assigned and could be declared final 98
Singleton is not thread safe 99104

Tobago Core - org/apache/myfaces/tobago/internal/util/NumberUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2234

Tobago Core - org/apache/myfaces/tobago/internal/util/ObjectUtils.java

Violation Line
A class which only has private constructors should be final 2232
Parameter 'o1' is not assigned and could be declared final 29
Parameter 'o2' is not assigned and could be declared final 29
Use equals() to compare object references. 30

Tobago Core - org/apache/myfaces/tobago/internal/util/PartUtils.java

Violation Line
Parameter 'part' is not assigned and could be declared final 45
Local variable 'cd' could be declared final 54
Local variable 'cdl' could be declared final 56
Local variable 'paramParser' could be declared final 58
Local variable 'params' could be declared final 6162
Avoid if (x != y) ..; else ..; 6574
Deeply nested if..then statements are hard to read 6574
The class 'ParameterParser' has a Cyclomatic Complexity of 4 (Highest = 10). 81330
Avoid using redundant field initializer for 'chars' 86
Avoid using redundant field initializer for 'pos' 91
Avoid using redundant field initializer for 'len' 96
Avoid using redundant field initializer for 'i1' 101
Avoid using redundant field initializer for 'i2' 106
Avoid using redundant field initializer for 'lowerCaseNames' 111
The method 'getToken' has a Cyclomatic Complexity of 10. 139161
Parameter 'quoted' is not assigned and could be declared final 139
Parameter 'ch' is not assigned and could be declared final 171
Consider using varargs for methods or constructors which take an array the last parameter. 171
Local variable 'element' could be declared final 173
Consider using varargs for methods or constructors which take an array the last parameter. 190
Consider using varargs for methods or constructors which take an array the last parameter. 214
Parameter 'b' is not assigned and could be declared final 244
Parameter 'separator' is not assigned and could be declared final 256
Parameter 'separator' is not assigned and could be declared final 272
The method 'parse' has a Cyclomatic Complexity of 10. 290329
Parameter 'offset' is not assigned and could be declared final 292
Parameter 'length' is not assigned and could be declared final 293
Parameter 'separator' is not assigned and could be declared final 294
Local variable 'params' could be declared final 299
Avoid instantiating new objects inside loops 307309
Avoid instantiating new objects inside loops 313315

Tobago Core - org/apache/myfaces/tobago/internal/util/ResponseUtils.java

Violation Line
The class 'ResponseUtils' has a Cyclomatic Complexity of 3 (Highest = 10). 33145
Avoid if (x != y) ..; else ..; 7283
The method 'ensureContentSecurityPolicyHeader' has a Cyclomatic Complexity of 10. 97132
Avoid declaring a variable if it is unreferenced before a possible exit point. 101
Avoid appending characters as strings in StringBuffer.append. 120
These nested if statements could be combined 128130

Tobago Core - org/apache/myfaces/tobago/internal/util/ResponseWriterBuffer.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 62

Tobago Core - org/apache/myfaces/tobago/internal/util/StringUtils.java

Violation Line
Possible God class (WMC=127, ATFD=11, TCC=0.0) 20577
The class 'StringUtils' has a Standard Cyclomatic Complexity of 4 (Highest = 18). 27577
The class 'StringUtils' has a Cyclomatic Complexity of 4 (Highest = 18). 27577
The class 'StringUtils' has a Modified Cyclomatic Complexity of 4 (Highest = 18). 27577
This class has too many methods, consider refactoring it. 27577
Avoid instantiating Integer objects. Call Integer.valueOf() instead. 45
Avoid instantiating new objects inside loops 45
Avoid appending characters as strings in StringBuffer.append. 57
The method 'equalsIgnoreCaseAndWhitespace' has a Cyclomatic Complexity of 14. 121175
The method equalsIgnoreCaseAndWhitespace() has an NPath complexity of 378 121175
The method 'equalsIgnoreCaseAndWhitespace' has a Standard Cyclomatic Complexity of 11. 121175
The method 'equalsIgnoreCaseAndWhitespace' has a Modified Cyclomatic Complexity of 11. 121175
Use equals() to compare object references. 124
The method 'split' has a Cyclomatic Complexity of 18. 229304
The method 'split' has a Modified Cyclomatic Complexity of 18. 229304
The method 'split' has a Standard Cyclomatic Complexity of 18. 229304
Avoid declaring a variable if it is unreferenced before a possible exit point. 230
The method replace() has an NPath complexity of 1080 365390
The method 'replace' has a Cyclomatic Complexity of 10. 365390
Avoid declaring a variable if it is unreferenced before a possible exit point. 366
Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 379
No need to call String.valueOf to append to a string. 421
Parameter 'b' is not assigned and could be declared final 471
Parameter 'a' is not assigned and could be declared final 471
Local variable 'colon' could be declared final 482
Parameter 'prefix' is not assigned and could be declared final 494
Parameter 'string' is not assigned and could be declared final 494
Parameter 'str' is not assigned and could be declared final 530
Parameter 'searchChars' is not assigned and could be declared final 530
The method 'containsAny' has a Cyclomatic Complexity of 11. 530562
Local variable 'searchChars1' could be declared final 534
Local variable 'csLength' could be declared final 538
Local variable 'searchLength' could be declared final 539
Local variable 'csLast' could be declared final 540
Local variable 'searchLast' could be declared final 541
Local variable 'ch' could be declared final 543
Parameter 'ch' is not assigned and could be declared final 573

Tobago Core - org/apache/myfaces/tobago/internal/webapp/DebugContentTypeFilter.java

Violation Line
Document empty method 6163

Tobago Core - org/apache/myfaces/tobago/internal/webapp/DebugContentTypeResponse.java

Violation Line
These nested if statements could be combined 5557
These nested if statements could be combined 6567

Tobago Core - org/apache/myfaces/tobago/internal/webapp/DebugResponseWriterWrapper.java

Violation Line
This class has too many methods, consider refactoring it. 37228
Private field 'stack' could be made final; it is only initialized in the declaration or constructor. 39
Parameter 'string' is not assigned and could be declared final 100
Parameter 'name' is not assigned and could be declared final 100

Tobago Core - org/apache/myfaces/tobago/internal/webapp/HtmlResponseWriter.java

Violation Line
This class has too many methods, consider refactoring it. 35169
Private field 'javascriptWriter' could be made final; it is only initialized in the declaration or constructor. 40

Tobago Core - org/apache/myfaces/tobago/internal/webapp/LoggingMdcFilter.java

Violation Line
Local variable 'httpRequest' could be declared final 52
Local variable 'session' could be declared final 53
Local variable 'remoteAddr' could be declared final 57
Local variable 'remoteUser' could be declared final 61
Document empty method 7577

Tobago Core - org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterBase.java

Violation Line
Possible God class (WMC=64, ATFD=16, TCC=0.1339031339031339) 20369
This class has too many methods, consider refactoring it. 36368
Avoid using redundant field initializer for 'i' 44
Avoid using redundant field initializer for 'inlineStack' 46
Avoid if (x != y) ..; else ..; 63
Avoid if (x != y) ..; else ..; 88111
Avoid if (x != y) ..; else ..; 90111
Avoid if (x != y) ..; else ..; 91104
Avoid if (x != y) ..; else ..; 9397
Consider using varargs for methods or constructors which take an array the last parameter. 137
An empty method in an abstract class should be abstract instead 173175
An empty method in an abstract class should be abstract instead 178180

Tobago Core - org/apache/myfaces/tobago/internal/webapp/TobagoResponseWriterWrapper.java

Violation Line
This class has too many methods, consider refactoring it. 32148
Private field 'responseWriter' could be made final; it is only initialized in the declaration or constructor. 34
Parameter 'name' is not assigned and could be declared final 46
Parameter 'name' is not assigned and could be declared final 56
Parameter 'string' is not assigned and could be declared final 130
Parameter 'name' is not assigned and could be declared final 130

Tobago Core - org/apache/myfaces/tobago/internal/webapp/XmlResponseWriter.java

Violation Line
Avoid unused private fields such as 'XHTML_DOCTYPE'. 31

Tobago Core - org/apache/myfaces/tobago/layout/ColumnPartition.java

Violation Line
Parameter 'parts' is not assigned and could be declared final 43
Parameter 'string' is not assigned and could be declared final 47
Parameter 'object' is not assigned and could be declared final 52
Avoid if (x != y) ..; else ..; 5761
Consider using varargs for methods or constructors which take an array the last parameter. 64
Local variable 'summand' could be declared final 69
Consider using varargs for methods or constructors which take an array the last parameter. 81
Parameter 'summands' is not assigned and could be declared final 81
Parameter 'summands' is not assigned and could be declared final 85
Avoid declaring a variable if it is unreferenced before a possible exit point. 86
Local variable 'list' could be declared final 86
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 87
Parameter 'parts' is not assigned and could be declared final 111
Consider using varargs for methods or constructors which take an array the last parameter. 111

Tobago Core - org/apache/myfaces/tobago/layout/LayoutTokens.java

Violation Line
Private field 'tokens' could be made final; it is only initialized in the declaration or constructor. 35
Document empty constructor 3738
Consider using varargs for methods or constructors which take an array the last parameter. 69
Avoid appending characters as strings in StringBuffer.append. 141

Tobago Core - org/apache/myfaces/tobago/layout/Measure.java

Violation Line
Parameter 'unit' is not assigned and could be declared final 45
Parameter 'i' is not assigned and could be declared final 45
Parameter 'd' is not assigned and could be declared final 51
Parameter 'unit' is not assigned and could be declared final 51
Parameter 'string' is not assigned and could be declared final 57
Parameter 'unit' is not assigned and could be declared final 57
Avoid if (x != y) ..; else ..; 130
Do not add empty strings 130
Avoid if (x != y) ..; else ..; 130
Parameter 'o' is not assigned and could be declared final 138
Local variable 'measure' could be declared final 146
Avoid if (x != y) ..; else ..; 148
Avoid if (x != y) ..; else ..; 151
Avoid if (x != y) ..; else ..; 160
Avoid if (x != y) ..; else ..; 161

Tobago Core - org/apache/myfaces/tobago/layout/PixelMeasure.java

Violation Line
Avoid instantiating new objects inside loops 35
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 39

Tobago Core - org/apache/myfaces/tobago/layout/RelativeLayoutToken.java

Violation Line
Private field 'factor' could be made final; it is only initialized in the declaration or constructor. 29

Tobago Core - org/apache/myfaces/tobago/lifecycle/SecretPhaseListener.java

Violation Line
Document empty method 5152

Tobago Core - org/apache/myfaces/tobago/model/CalendarModel.java

Violation Line
Private field 'calendarArray' could be made final; it is only initialized in the declaration or constructor. 28
Private field 'firstDayOffset' could be made final; it is only initialized in the declaration or constructor. 29
Avoid instantiating new objects inside loops 43
Avoid appending characters as strings in StringBuffer.append. 77
When instantiating a SimpleDateFormat object, specify a Locale 80
Avoid appending characters as strings in StringBuffer.append. 84
Avoid appending characters as strings in StringBuffer.append. 86
Avoid appending characters as strings in StringBuffer.append. 90
Avoid appending characters as strings in StringBuffer.append. 92

Tobago Core - org/apache/myfaces/tobago/model/DateModel.java

Violation Line
Avoid if (x != y) ..; else ..; 7273

Tobago Core - org/apache/myfaces/tobago/model/ExpandedState.java

Violation Line
This class has too many methods, consider refactoring it. 34251
Private field 'expandedSet' could be made final; it is only initialized in the declaration or constructor. 37
Private field 'collapsedSet' could be made final; it is only initialized in the declaration or constructor. 38
Avoid reassigning parameters such as 'level' 187

Tobago Core - org/apache/myfaces/tobago/model/ScrollPosition.java

Violation Line
Avoid if (x != y) ..; else ..; 36
Avoid if (x != y) ..; else ..; 36
String.indexOf(char) is faster than String.indexOf(String). 49
Parameter 'left' is not assigned and could be declared final 63
Parameter 'top' is not assigned and could be declared final 71

Tobago Core - org/apache/myfaces/tobago/model/SelectItem.java

Violation Line
Parameter 'tip' is not assigned and could be declared final 84
Parameter 'style' is not assigned and could be declared final 112
Parameter 'customClass' is not assigned and could be declared final 122

Tobago Core - org/apache/myfaces/tobago/model/SelectedState.java

Violation Line
Private field 'selected' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Core - org/apache/myfaces/tobago/model/SheetState.java

Violation Line
Avoid unused private fields such as 'LOG'. 36
Overridable method 'reset' called during object construction 51
Avoid if (x != y) ..; else ..; 6771
Local variable 'columnWidth' could be declared final 118
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 123
Parameter 'toBeSorted' is not assigned and could be declared final 181

Tobago Core - org/apache/myfaces/tobago/model/SuggestFilter.java

Violation Line
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 40

Tobago Core - org/apache/myfaces/tobago/model/TreeNodeDataModel.java

Violation Line
Possible God class (WMC=57, ATFD=27, TCC=0.10666666666666667) 20305
Private field 'mapping' could be made final; it is only initialized in the declaration or constructor. 43
Private field 'back' could be made final; it is only initialized in the declaration or constructor. 44
Private field 'showRoot' could be made final; it is only initialized in the declaration or constructor. 45
Overridable method 'reset' called during object construction 59
Avoid instantiating new objects inside loops 69
Avoid instantiation through private constructors from outside of the constructors class. 69
Avoid instantiation through private constructors from outside of the constructors class. 89
Avoid instantiating new objects inside loops 89
Avoid reassigning parameters such as 'node' 103
Avoid instantiating new objects inside loops 209
Avoid if (x != y) ..; else ..; 239243
Private field 'node' could be made final; it is only initialized in the declaration or constructor. 286

Tobago Core - org/apache/myfaces/tobago/model/TreePath.java

Violation Line
Avoid reassigning parameters such as 'node' 69
Avoid if (x != y) ..; else ..; 125

Tobago Core - org/apache/myfaces/tobago/renderkit/RendererBase.java

Violation Line
Avoid if (x != y) ..; else ..; 6670
Document empty method 7475

Tobago Core - org/apache/myfaces/tobago/renderkit/TobagoRenderKit.java

Violation Line
Private field 'renderers' could be made final; it is only initialized in the declaration or constructor. 52
Local variable 'rkFactory' could be declared final 55
Avoid instantiation through private constructors from outside of the constructors class. 66
Avoid instantiation through private constructors from outside of the constructors class. 118
Parameter 'type' is not assigned and could be declared final 132
Parameter 'renderer' is not assigned and could be declared final 132
Parameter 'type' is not assigned and could be declared final 137

Tobago Core - org/apache/myfaces/tobago/renderkit/css/Classes.java

Violation Line
Avoid unused private fields such as 'CACHE'. 67
Use block level rather than method level synchronization 89116
Avoid if (x != y) ..; else ..; 122
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 123
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 133

Tobago Core - org/apache/myfaces/tobago/renderkit/css/CustomClass.java

Violation Line
A class which only has private constructors should be final 3487
Parameter 'list' is not assigned and could be declared final 42
Parameter 'text' is not assigned and could be declared final 46
Avoid if (x != y) ..; else ..; 5458
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 63

Tobago Core - org/apache/myfaces/tobago/renderkit/css/FontAwesomeIconEncoder.java

Violation Line
Private field 'icons' could be made final; it is only initialized in the declaration or constructor. 40
Local variable 'icon' could be declared final 45
Avoid instantiating new objects inside loops 46
Local variable 'result' could be declared final 63
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 90
Parameter 'name' is not assigned and could be declared final 92

Tobago Core - org/apache/myfaces/tobago/renderkit/css/Style.java

Violation Line
This class has a bunch of public methods and attributes 20679
Possible God class (WMC=113, ATFD=23, TCC=0.2970356926799758) 20679
The class 'Style' has a Standard Cyclomatic Complexity of 2 (Highest = 28). 34679
The class 'Style' has a Modified Cyclomatic Complexity of 2 (Highest = 28). 34679
The class 'Style' has a Cyclomatic Complexity of 2 (Highest = 28). 34679
Too many fields 34679
Document empty constructor 7374
Overridable method 'checkEmptiness' called during object construction 111
Avoid really long methods. 166300
The method encode() has an NCSS line count of 107 166300
The method 'encode' has a Modified Cyclomatic Complexity of 27. 166300
The method encode() has an NPath complexity of 67108864 166300
The method 'encode' has a Cyclomatic Complexity of 27. 166300
The method 'encode' has a Standard Cyclomatic Complexity of 27. 166300
StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 167
The method encodeJson() has an NCSS line count of 110 302441
The method encodeJson() has an NPath complexity of 134217728 302441
The method 'encodeJson' has a Standard Cyclomatic Complexity of 28. 302441
Avoid really long methods. 302441
The method 'encodeJson' has a Modified Cyclomatic Complexity of 28. 302441
The method 'encodeJson' has a Cyclomatic Complexity of 28. 302441
StringBuffer constructor is initialized with size 17, but has at least 78 characters appended. 303
The String literal "\"," appears 25 times in this file; the first occurrence is on line 307 307
Avoid appending characters as strings in StringBuffer.append. 427
Parameter 'minWidth' is not assigned and could be declared final 465
Parameter 'minHeight' is not assigned and could be declared final 474
Parameter 'maxWidth' is not assigned and could be declared final 483
Parameter 'maxHeight' is not assigned and could be declared final 492
Parameter 'right' is not assigned and could be declared final 510
Parameter 'bottom' is not assigned and could be declared final 528
Parameter 'backgroundImage' is not assigned and could be declared final 645
Parameter 'backgroundPosition' is not assigned and could be declared final 653

Tobago Core - org/apache/myfaces/tobago/renderkit/html/DataAttributes.java

Violation Line
Parameter 'value' is not assigned and could be declared final 215

Tobago Core - org/apache/myfaces/tobago/renderkit/html/HtmlAttributes.java

Violation Line
Parameter 'value' is not assigned and could be declared final 130

Tobago Core - org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java

Violation Line
Parameter 'value' is not assigned and could be declared final 30

Tobago Core - org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java

Violation Line
Parameter 'value' is not assigned and could be declared final 37

Tobago Core - org/apache/myfaces/tobago/sanitizer/IgnoringSanitizer.java

Violation Line
Parameter 'html' is not assigned and could be declared final 35
Parameter 'configuration' is not assigned and could be declared final 40

Tobago Core - org/apache/myfaces/tobago/sanitizer/JsoupSanitizer.java

Violation Line
Avoid using redundant field initializer for 'unmodifiable' 39

Tobago Core - org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java

Violation Line
Avoid declaring a variable if it is unreferenced before a possible exit point. 61
An empty method in an abstract class should be abstract instead 9597

Tobago Core - org/apache/myfaces/tobago/servlet/ResourceServlet.java

Violation Line
The class 'ResourceServlet' has a Cyclomatic Complexity of 4 (Highest = 10). 69201
Private field 'resourceDirs' could be made final; it is only initialized in the declaration or constructor. 77
Avoid instantiating Long objects.Call Long.valueOf() instead 94
This call to String.startsWith can be rewritten using String.charAt(0) 119
The method 'doGet' has a Cyclomatic Complexity of 10. 127183
Avoid if (x != y) ..; else ..; 149159
Avoid if (x != y) ..; else ..; 173179
Avoid if (x != y) ..; else ..; 187191

Tobago Core - org/apache/myfaces/tobago/util/AjaxUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3277
Local variable 'renderId' could be declared final 62
Parameter 'outcome' is not assigned and could be declared final 71
Parameter 'facesContext' is not assigned and could be declared final 71
Local variable 'navigationHandler' could be declared final 73

Tobago Core - org/apache/myfaces/tobago/util/BeanComparator.java

Violation Line
Private field 'property' could be made final; it is only initialized in the declaration or constructor. 35
Avoid if (x != y) ..; else ..; 69

Tobago Core - org/apache/myfaces/tobago/util/BundleMapWrapper.java

Violation Line
This class has too many methods, consider refactoring it. 30121
Private field 'basename' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Core - org/apache/myfaces/tobago/util/ComparatorBase.java

Violation Line
The class 'ComparatorBase' has a Standard Cyclomatic Complexity of 3 (Highest = 12). 27126
The class 'ComparatorBase' has a Modified Cyclomatic Complexity of 3 (Highest = 12). 27126
The class 'ComparatorBase' has a Cyclomatic Complexity of 3 (Highest = 14). 27126
Document empty constructor 3334
The method 'internalCompare' has a Standard Cyclomatic Complexity of 12. 4989
The method internalCompare() has an NPath complexity of 1600 4989
The method 'internalCompare' has a Modified Cyclomatic Complexity of 12. 4989
The method 'internalCompare' has a Cyclomatic Complexity of 14. 4989
Avoid if (x != y) ..; else ..; 7787
Avoid if (x != y) ..; else ..; 120

Tobago Core - org/apache/myfaces/tobago/util/ComponentUtils.java

Violation Line
Possible God class (WMC=187, ATFD=115, TCC=8.503401360544217E-4) 20848
A high number of imports can indicate a high degree of coupling within an object. 20848
This class has a bunch of public methods and attributes 20848
The class 'ComponentUtils' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 67848
The class 'ComponentUtils' has a Cyclomatic Complexity of 3 (Highest = 10). 67848
The class 'ComponentUtils' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 67848
This class has too many methods, consider refactoring it. 67848
Avoid reassigning parameters such as 'component' 119
Avoid if (x != y) ..; else ..; 142146
Avoid if (x != y) ..; else ..; 151161
Avoid reassigning parameters such as 'component' 164
Avoid reassigning parameters such as 'component' 198
Avoid reassigning parameters such as 'component' 208
Avoid if (x != y) ..; else ..; 266274
Avoid reassigning parameters such as 'component' 379
Local variable 'bool' could be declared final 435
Avoid if (x != y) ..; else ..; 452
Consider simply returning the value vs storing it in local variable 'myRenderer' 554
The method 'findComponent' has a Cyclomatic Complexity of 10. 593628
Position literals first in String comparisons 598
These nested if statements could be combined 598600
Consider using varargs for methods or constructors which take an array the last parameter. 634
The method 'getConvertedValue' has a Modified Cyclomatic Complexity of 10. 676707
The method 'getConvertedValue' has a Standard Cyclomatic Complexity of 10. 676707
The method 'getConvertedValue' has a Cyclomatic Complexity of 10. 676707
Avoid if (x != y) ..; else ..; 680702
Avoid reassigning parameters such as 'markup' 709
Avoid reassigning parameters such as 'markup' 709
Avoid reassigning parameters such as 'markup' 709
Avoid reassigning parameters such as 'markup' 709
Avoid reassigning parameters such as 'markup' 709
Local variable 'map' could be declared final 799
Avoid if (x != y) ..; else ..; 800
Avoid if (x != y) ..; else ..; 841845

Tobago Core - org/apache/myfaces/tobago/util/CreateComponentUtils.java

Violation Line
Avoid if (x != y) ..; else ..; 6468
Avoid if (x != y) ..; else ..; 8489

Tobago Core - org/apache/myfaces/tobago/util/DebugNavigationHandler.java

Violation Line
Private field 'navigationHandler' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Core - org/apache/myfaces/tobago/util/DebugPhaseListener.java

Violation Line
The class 'DebugPhaseListener' has a Standard Cyclomatic Complexity of 8 (Highest = 13). 39157
The class 'DebugPhaseListener' has a Cyclomatic Complexity of 10 (Highest = 16). 39157
The class 'DebugPhaseListener' has a Modified Cyclomatic Complexity of 8 (Highest = 13). 39157
The method 'afterPhase' has a Standard Cyclomatic Complexity of 10. 4692
The method 'afterPhase' has a Cyclomatic Complexity of 11. 4692
The method 'afterPhase' has a Modified Cyclomatic Complexity of 10. 4692
Deeply nested if..then statements are hard to read 6873
Deeply nested if..then statements are hard to read 7678
The method 'beforePhase' has a Modified Cyclomatic Complexity of 13. 95151
The method 'beforePhase' has a Standard Cyclomatic Complexity of 13. 95151
The method 'beforePhase' has a Cyclomatic Complexity of 16. 95151
The method beforePhase() has an NPath complexity of 572 95151
Avoid declaring a variable if it is unreferenced before a possible exit point. 97
Deeply nested if..then statements are hard to read 113129
Deeply nested if..then statements are hard to read 135145
Deeply nested if..then statements are hard to read 146148

Tobago Core - org/apache/myfaces/tobago/util/DebugUtils.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 59
Avoid appending characters as strings in StringBuffer.append. 82
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 82
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 83
Avoid appending characters as strings in StringBuffer.append. 84
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 84
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 92
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 93

Tobago Core - org/apache/myfaces/tobago/util/MessageFormat.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2776
Parameter 'param0' is not assigned and could be declared final 29
Parameter 'pattern' is not assigned and could be declared final 29
Parameter 'param1' is not assigned and could be declared final 33
Parameter 'param0' is not assigned and could be declared final 33
Parameter 'pattern' is not assigned and could be declared final 33
Parameter 'param0' is not assigned and could be declared final 37
Parameter 'param2' is not assigned and could be declared final 37
Parameter 'param1' is not assigned and could be declared final 37
Parameter 'pattern' is not assigned and could be declared final 37
Parameter 'pattern' is not assigned and could be declared final 41
Parameter 'param3' is not assigned and could be declared final 41
Parameter 'param0' is not assigned and could be declared final 41
Parameter 'param2' is not assigned and could be declared final 41
Parameter 'param1' is not assigned and could be declared final 41
Parameter 'param3' is not assigned and could be declared final 45
Parameter 'param2' is not assigned and could be declared final 45
Parameter 'param1' is not assigned and could be declared final 45
Parameter 'pattern' is not assigned and could be declared final 45
Parameter 'param0' is not assigned and could be declared final 45
Parameter 'param4' is not assigned and could be declared final 46
Parameter 'pattern' is not assigned and could be declared final 50
Parameter 'param1' is not assigned and could be declared final 50
Parameter 'param0' is not assigned and could be declared final 50
Parameter 'param2' is not assigned and could be declared final 50
Parameter 'param3' is not assigned and could be declared final 50
Parameter 'param5' is not assigned and could be declared final 51
Parameter 'param4' is not assigned and could be declared final 51
Parameter 'param1' is not assigned and could be declared final 55
Parameter 'pattern' is not assigned and could be declared final 55
Parameter 'param0' is not assigned and could be declared final 55
Parameter 'param3' is not assigned and could be declared final 55
Parameter 'param2' is not assigned and could be declared final 55
Parameter 'param6' is not assigned and could be declared final 56
Parameter 'param4' is not assigned and could be declared final 56
Parameter 'param5' is not assigned and could be declared final 56
Parameter 'param2' is not assigned and could be declared final 60
Parameter 'param1' is not assigned and could be declared final 60
Parameter 'param3' is not assigned and could be declared final 60
Parameter 'param0' is not assigned and could be declared final 60
Parameter 'pattern' is not assigned and could be declared final 60
Parameter 'param6' is not assigned and could be declared final 61
Parameter 'param5' is not assigned and could be declared final 61
Parameter 'param4' is not assigned and could be declared final 61
Parameter 'param7' is not assigned and could be declared final 61
Parameter 'param1' is not assigned and could be declared final 66
Parameter 'pattern' is not assigned and could be declared final 66
Parameter 'param3' is not assigned and could be declared final 66
Parameter 'param2' is not assigned and could be declared final 66
Avoid long parameter lists. 6667
Parameter 'param0' is not assigned and could be declared final 66
Parameter 'param6' is not assigned and could be declared final 67
Parameter 'param8' is not assigned and could be declared final 67
Parameter 'param4' is not assigned and could be declared final 67
Parameter 'param7' is not assigned and could be declared final 67
Parameter 'param5' is not assigned and could be declared final 67
Parameter 'pattern' is not assigned and could be declared final 72

Tobago Core - org/apache/myfaces/tobago/util/MessageUtils.java

Violation Line
The class 'MessageUtils' has a Cyclomatic Complexity of 4 (Highest = 15). 43160
The class 'MessageUtils' has a Standard Cyclomatic Complexity of 3 (Highest = 11). 43160
The class 'MessageUtils' has a Modified Cyclomatic Complexity of 3 (Highest = 11). 43160
Consider using varargs for methods or constructors which take an array the last parameter. 52
The method 'getMessage' has a Cyclomatic Complexity of 15. 57104
The method 'getMessage' has a Standard Cyclomatic Complexity of 11. 57104
The method getMessage() has an NPath complexity of 468 57104
The method 'getMessage' has a Modified Cyclomatic Complexity of 11. 57104
Deeply nested if..then statements are hard to read 7678
Deeply nested if..then statements are hard to read 7981
Avoid if (x != y) ..; else ..; 116

Tobago Core - org/apache/myfaces/tobago/util/ValueBindingComparator.java

Violation Line
The class 'ValueBindingComparator' has a Cyclomatic Complexity of 3 (Highest = 11). 34131
The class 'ValueBindingComparator' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 34131
The class 'ValueBindingComparator' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 34131
Private field 'facesContext' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'var' could be made final; it is only initialized in the declaration or constructor. 40
Private field 'valueBinding' could be made final; it is only initialized in the declaration or constructor. 42
The method 'equals' has a Standard Cyclomatic Complexity of 10. 76100
The method 'equals' has a Cyclomatic Complexity of 11. 76100
The method 'equals' has a Modified Cyclomatic Complexity of 10. 76100
Avoid declaring a variable if it is unreferenced before a possible exit point. 84
Avoid if (x != y) ..; else ..; 89
Avoid if (x != y) ..; else ..; 92
Avoid if (x != y) ..; else ..; 95
Avoid if (x != y) ..; else ..; 104
Avoid if (x != y) ..; else ..; 105
Avoid if (x != y) ..; else ..; 106

Tobago Core - org/apache/myfaces/tobago/util/ValueExpressionComparator.java

Violation Line
The class 'ValueExpressionComparator' has a Cyclomatic Complexity of 3 (Highest = 11). 30128
The class 'ValueExpressionComparator' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 30128
The class 'ValueExpressionComparator' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 30128
Private field 'facesContext' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'var' could be made final; it is only initialized in the declaration or constructor. 36
Private field 'valueExpression' could be made final; it is only initialized in the declaration or constructor. 38
The method 'equals' has a Modified Cyclomatic Complexity of 10. 7498
The method 'equals' has a Cyclomatic Complexity of 11. 7498
The method 'equals' has a Standard Cyclomatic Complexity of 10. 7498
Avoid declaring a variable if it is unreferenced before a possible exit point. 82
Avoid if (x != y) ..; else ..; 87
Avoid if (x != y) ..; else ..; 90
Avoid if (x != y) ..; else ..; 93
Avoid if (x != y) ..; else ..; 102
Avoid if (x != y) ..; else ..; 103
Avoid if (x != y) ..; else ..; 104

Tobago Core - org/apache/myfaces/tobago/util/XmlUtils.java

Violation Line
A switch statement does not contain a break 74100

Tobago Core - org/apache/myfaces/tobago/validator/FileItemValidator.java

Violation Line
The class 'FileItemValidator' has a Cyclomatic Complexity of 2 (Highest = 12). 40132
Avoid using redundant field initializer for 'maxSize' 44
Document empty constructor 5152
The method 'validate' has a Cyclomatic Complexity of 12. 5588
Deeply nested if..then statements are hard to read 6972
Deeply nested if..then statements are hard to read 7680
Consider using varargs for methods or constructors which take an array the last parameter. 104

Tobago Core - org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java

Violation Line
Document empty constructor 4445
Avoid if (x != y) ..; else ..; 58
Avoid if (x != y) ..; else ..; 70
Avoid if (x != y) ..; else ..; 128
Avoid if (x != y) ..; else ..; 131
Avoid if (x != y) ..; else ..; 140
Avoid if (x != y) ..; else ..; 141

Tobago Core - org/apache/myfaces/tobago/webapp/LogoutActionListener.java

Violation Line
New exception is thrown in catch block, original stack trace may be lost 59

Tobago Core - org/apache/myfaces/tobago/webapp/Secret.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 57
Private field 'secret' could be made final; it is only initialized in the declaration or constructor. 57
Local variable 'secret' could be declared final 85
Parameter 'session' is not assigned and could be declared final 89

Tobago Core - org/apache/myfaces/tobago/webapp/SecretSessionListener.java

Violation Line
Document empty method 3839

Tobago Core - org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java

Violation Line
Possible God class (WMC=47, ATFD=17, TCC=0.0) 20306
This class has too many methods, consider refactoring it. 44306
Avoid unused private fields such as 'NO_CSS_ITEMS'. 46
Private field 'iconEncoder' could be made final; it is only initialized in the declaration or constructor. 48
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 156
Local variable 'other' could be declared final 200

Tobago Core - org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java

Violation Line
StringBuffer constructor is initialized with size 16, but has at least 87 characters appended. 60
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 61
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 61
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 62
StringBuffer (or StringBuilder).append is called 3 consecutive times with literal Strings. Use a single append with a single combined String. 65

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/Address.java

Violation Line
Possible God class (WMC=58, ATFD=31, TCC=0.07312925170068027) 20327
This class has a bunch of public methods and attributes 20327
Too many fields 43327
Avoid unused private fields such as 'revision'. 50
Avoid unused private methods such as 'store()'. 112
Avoid unused private methods such as 'load()'. 126

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/DerbyShutdownServletContextListener.java

Violation Line
Document empty method 3638

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/EmailAddress.java

Violation Line
Avoid if (x != y) ..; else ..; 59
Avoid if (x != y) ..; else ..; 67

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDao.java

Violation Line
Private field 'addresses' could be made final; it is only initialized in the declaration or constructor. 39
Use block level rather than method level synchronization 4659
Use block level rather than method level synchronization 6770
Use block level rather than method level synchronization 7380

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/JpaAddressDao.java

Violation Line
Avoid unused private fields such as 'LOG'. 43
Avoid reassigning parameters such as 'filter' 70
StringBuffer constructor is initialized with size 16, but has at least 24 characters appended. 71
Avoid appending characters as strings in StringBuffer.append. 81
Avoid reassigning parameters such as 'address' 93

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/KillSession.java

Violation Line
Avoid if (x != y) ..; else ..; 4247

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/Picture.java

Violation Line
Document empty constructor 4748

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/AdminController.java

Violation Line
Unnecessary wrapper object creation 51
Unnecessary wrapper object creation 52

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/Controller.java

Violation Line
This class has a bunch of public methods and attributes 20434
A high number of imports can indicate a high degree of coupling within an object. 20434
Possible God class (WMC=67, ATFD=43, TCC=0.07474600870827286) 20434
This class has too many methods, consider refactoring it. 60434
Too many fields 60434
Avoid instantiating new objects inside loops 120
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 183
Avoid if (x != y) ..; else ..; 224226
Avoid instantiating new objects inside loops 428

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/Countries.java

Violation Line
Avoid instantiating new objects inside loops 39

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/EmailAddressConverter.java

Violation Line
Avoid unused private fields such as 'LOG'. 35

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/MessageUtils.java

Violation Line
A class which only has private constructors should be final 2761

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/RandomAddressGenerator.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3575
Consider using varargs for methods or constructors which take an array the last parameter. 71

Tobago Example Addressbook (Java EE 6) - org/apache/myfaces/tobago/example/addressbook/web/StartupPhaseListener.java

Violation Line
Position literals first in String comparisons 55
New exception is thrown in catch block, original stack trace may be lost 79
New exception is thrown in catch block, original stack trace may be lost 79
Document empty method 8687

Tobago Example Data - org/apache/myfaces/tobago/example/data/CantorInterval.java

Violation Line
Private field 'begin' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'end' could be made final; it is only initialized in the declaration or constructor. 34
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 81
Avoid appending characters as strings in StringBuffer.append. 81
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 82
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 83
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 84
Avoid appending characters as strings in StringBuffer.append. 85
Avoid reassigning parameters such as 'denominator' 109
Avoid reassigning parameters such as 'numerator' 109
Avoid appending characters as strings in StringBuffer.append. 144

Tobago Example Data - org/apache/myfaces/tobago/example/data/CategoryTree.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2688
Avoid instantiating new objects inside loops 81

Tobago Example Data - org/apache/myfaces/tobago/example/data/CommandNode.java

Violation Line
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 26
Parameter 'name' is not assigned and could be declared final 30
Parameter 'name' is not assigned and could be declared final 34
Parameter 'url' is not assigned and could be declared final 34
Parameter 'action' is not assigned and could be declared final 34

Tobago Example Data - org/apache/myfaces/tobago/example/data/CommandNodeFactory.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2240

Tobago Example Data - org/apache/myfaces/tobago/example/data/LocaleList.java

Violation Line
A class which only has private constructors should be final 3297
Avoid instantiating new objects inside loops 46

Tobago Example Data - org/apache/myfaces/tobago/example/data/MixedCommandTree.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2246

Tobago Example Data - org/apache/myfaces/tobago/example/data/NamedNode.java

Violation Line
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Example Data - org/apache/myfaces/tobago/example/data/SmallTree.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2434

Tobago Example Data - org/apache/myfaces/tobago/example/data/SolarObject.java

Violation Line
Overridable method 'getPopulation' called during object construction 85
Parameter 'event' is not assigned and could be declared final 93
The String literal "Sun" appears 13 times in this file; the first occurrence is on line 102 102
Position literals first in String comparisons 102
Position literals first in String comparisons 105
Avoid if (x != y) ..; else ..; 186
Position literals first in String comparisons 198
Avoid instantiating new objects inside loops 216
Position literals first in String comparisons 219
Parameter 'name' is not assigned and could be declared final 240
Local variable 'solarObject' could be declared final 241
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 250
The String literal "III" appears 5 times in this file; the first occurrence is on line 251 251
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 251
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 252
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 254343
The String literal "Jupiter" appears 28 times in this file; the first occurrence is on line 260 260
The String literal "Saturn" appears 19 times in this file; the first occurrence is on line 261 261
The String literal "Uranus" appears 22 times in this file; the first occurrence is on line 262 262
The String literal "Herschel" appears 5 times in this file; the first occurrence is on line 262 262
The String literal "VII" appears 5 times in this file; the first occurrence is on line 262 262
The String literal "Neptune" appears 9 times in this file; the first occurrence is on line 263 263
The String literal "VIII" appears 5 times in this file; the first occurrence is on line 263 263
The String literal "Galileo" appears 4 times in this file; the first occurrence is on line 272 272
The String literal "Sheppard" appears 11 times in this file; the first occurrence is on line 276 276
The String literal "Nicholson" appears 5 times in this file; the first occurrence is on line 279 279
The String literal "Cassini" appears 4 times in this file; the first occurrence is on line 303 303
The String literal "Voyager 2" appears 15 times in this file; the first occurrence is on line 313 313
Local variable 'sun' could be declared final 346349
Local variable 'earth' could be declared final 351355
Local variable 'moon' could be declared final 357361

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CkeditorController.java

Violation Line
Private field 'editorAvailable' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'contentSecurityPolicyMode' could be made final; it is only initialized in the declaration or constructor. 35
Parameter 'collapsed' is not assigned and could be declared final 73

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CollapsibleBoxController.java

Violation Line
Avoid using redundant field initializer for 'collapsed' 30
Parameter 'collapsed' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CollapsibleController.java

Violation Line
Parameter 'collapsed' is not assigned and could be declared final 57

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CollapsiblePanelController.java

Violation Line
Avoid using redundant field initializer for 'panelCollapsed' 30
Parameter 'panelCollapsed' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CollapsiblePopupController.java

Violation Line
Parameter 'collapsed' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CollapsibleSectionController.java

Violation Line
Avoid using redundant field initializer for 'collapsed' 30
Parameter 'collapsed' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ConversionController.java

Violation Line
Parameter 'amount' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/CurrentValueController.java

Violation Line
Private field 'string' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'currency' could be made final; it is only initialized in the declaration or constructor. 40
When instantiating a SimpleDateFormat object, specify a Locale 47
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 56
Avoid if (x != y) ..; else ..; 56
Parameter 'string' is not assigned and could be declared final 69

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/DateController.java

Violation Line
Local variable 'sdf' could be declared final 44
When instantiating a SimpleDateFormat object, specify a Locale 44
Parameter 'once' is not assigned and could be declared final 56
Parameter 'onchange' is not assigned and could be declared final 64
Parameter 'submitDate' is not assigned and could be declared final 76

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/DefaultCommandController.java

Violation Line
Parameter 'value1' is not assigned and could be declared final 40
Parameter 'value2' is not assigned and could be declared final 48
Parameter 'value3' is not assigned and could be declared final 56

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ExceptionController.java

Violation Line
Local variable 'exception' could be declared final 3435
Local variable 'stringWriter' could be declared final 36
Local variable 'printWriter' could be declared final 37

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ExecuteController.java

Violation Line
Parameter 'value1' is not assigned and could be declared final 73
Parameter 'value2' is not assigned and could be declared final 81
Parameter 'value3' is not assigned and could be declared final 89
Parameter 'value4' is not assigned and could be declared final 97

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ForEachController.java

Violation Line
Overridable method 'reset' called during object construction 39
Parameter 'name' is not assigned and could be declared final 50
Parameter 'length' is not assigned and could be declared final 58
Parameter 'discharge' is not assigned and could be declared final 66
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 92
Private field 'length' could be made final; it is only initialized in the declaration or constructor. 93
Private field 'discharge' could be made final; it is only initialized in the declaration or constructor. 94
Parameter 'length' is not assigned and could be declared final 96
Parameter 'discharge' is not assigned and could be declared final 96
Parameter 'name' is not assigned and could be declared final 96

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/FormAjaxController.java

Violation Line
Parameter 'outerValue' is not assigned and could be declared final 38
Parameter 'innerValue1' is not assigned and could be declared final 46
Parameter 'innerValue2' is not assigned and could be declared final 54

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/FormController.java

Violation Line
Avoid unused private fields such as 'LOG'. 33
Parameter 'value1' is not assigned and could be declared final 42
Parameter 'value2' is not assigned and could be declared final 50

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/FormRequiredController.java

Violation Line
Parameter 'outerValue' is not assigned and could be declared final 38
Parameter 'innerValue1' is not assigned and could be declared final 46
Parameter 'innerValue2' is not assigned and could be declared final 54

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/GroupController.java

Violation Line
Parameter 'newMessage' is not assigned and could be declared final 70
Parameter 'sendTo' is not assigned and could be declared final 83
Parameter 'event' is not assigned and could be declared final 87
Local variable 'command' could be declared final 92
Parameter 'event' is not assigned and could be declared final 98
Parameter 'value' is not assigned and could be declared final 122
Parameter 'currency' is not assigned and could be declared final 134

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/InController.java

Violation Line
Parameter 'event' is not assigned and could be declared final 37
Parameter 'changeValue' is not assigned and could be declared final 45

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/InputSuggestController.java

Violation Line
Private field 'suggestData' could be made final; it is only initialized in the declaration or constructor. 51
The String literal "Niedersachsen" appears 6 times in this file; the first occurrence is on line 52 52
Avoid instantiating new objects inside loops 158
Avoid instantiating new objects inside loops 161
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 170
Avoid instantiating new objects inside loops 171
Avoid instantiating new objects inside loops 174

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/Login.java

Violation Line
Parameter 'username' is not assigned and could be declared final 71
Parameter 'password' is not assigned and could be declared final 79

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ManifestReader.java

Violation Line
Avoid instantiating new objects inside loops 60
Avoid instantiating new objects inside loops 63
Avoid instantiating new objects inside loops 66

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/NavigationNode.java

Violation Line
Private field 'tree' could be made final; it is only initialized in the declaration or constructor. 37
Avoid unused local variables such as 'extension'. 52
Avoid if (x != y) ..; else ..; 55

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/NavigationState.java

Violation Line
Private field 'state' could be made final; it is only initialized in the declaration or constructor. 47
Avoid if (x != y) ..; else ..; 7782
Avoid if (x != y) ..; else ..; 9196
Parameter 'viewSource' is not assigned and could be declared final 140

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/NavigationTree.java

Violation Line
Avoid instantiating new objects inside loops 81
Position literals first in String comparisons 99
Parameter 'viewId' is not assigned and could be declared final 131
Avoid if (x != y) ..; else ..; 147151

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/PanelController.java

Violation Line
Parameter 'text' is not assigned and could be declared final 41

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/PartialReloadController.java

Violation Line
Parameter 'event' is not assigned and could be declared final 77
Do not add empty strings 117

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/PlanetExample.java

Violation Line
This abstract class does not have any abstract methods 2476
Private field 'planets' could be made final; it is only initialized in the declaration or constructor. 26
Private field 'earthMoons' could be made final; it is only initialized in the declaration or constructor. 27
Private field 'marsMoons' could be made final; it is only initialized in the declaration or constructor. 28
Private field 'jupiterMoons' could be made final; it is only initialized in the declaration or constructor. 29
Parameter 'planet' is not assigned and could be declared final 60

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/PopupController.java

Violation Line
Parameter 'popup1Collapsed' is not assigned and could be declared final 39
Parameter 'popup1Text' is not assigned and could be declared final 55
Parameter 'popup2Text' is not assigned and could be declared final 63

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/PrettyUrlForMenuNavigationHandler.java

Violation Line
Private field 'navigationHandler' could be made final; it is only initialized in the declaration or constructor. 35
Parameter 'outcome' is not assigned and could be declared final 42

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ProgressController.java

Violation Line
Avoid unused private fields such as 'LOG'. 36
Private field 'progress' could be made final; it is only initialized in the declaration or constructor. 38
Local variable 'value' could be declared final 45
Local variable 'sdf' could be declared final 59
When instantiating a SimpleDateFormat object, specify a Locale 59
When instantiating a SimpleDateFormat object, specify a Locale 64
Local variable 'sdf' could be declared final 64
When instantiating a SimpleDateFormat object, specify a Locale 69
Local variable 'sdf' could be declared final 69

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/RoleController.java

Violation Line
Parameter 'text' is not assigned and could be declared final 38

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java

Violation Line
Parameter 'a' is not assigned and could be declared final 41
Parameter 'b' is not assigned and could be declared final 49
Parameter 'c' is not assigned and could be declared final 57
Parameter 'd' is not assigned and could be declared final 65
Parameter 'e' is not assigned and could be declared final 73
Parameter 'f' is not assigned and could be declared final 81

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectController.java

Violation Line
Private field 'entries' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectItemModel.java

Violation Line
Avoid instantiating new objects inside loops 51
Parameter 'currency2' is not assigned and could be declared final 83

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java

Violation Line
Parameter 'animals' is not assigned and could be declared final 39
Local variable 's' could be declared final 45
Parameter 'numbers' is not assigned and could be declared final 55
Local variable 'number' could be declared final 61

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java

Violation Line
Private field 'deserts' could be made final; it is only initialized in the declaration or constructor. 35
Parameter 'celestials' is not assigned and could be declared final 52
Local variable 's' could be declared final 58
Parameter 'selectedDeserts' is not assigned and could be declared final 72

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectManyShuttleController.java

Violation Line
Private field 'planets' could be made final; it is only initialized in the declaration or constructor. 35
Private field 'stars' could be made final; it is only initialized in the declaration or constructor. 37
Parameter 'selectedPlanets' is not assigned and could be declared final 52
Consider using varargs for methods or constructors which take an array the last parameter. 52
Parameter 'selectedStars' is not assigned and could be declared final 68
Consider using varargs for methods or constructors which take an array the last parameter. 68

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java

Violation Line
Parameter 'person' is not assigned and could be declared final 36

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java

Violation Line
Private field 'mountains' could be made final; it is only initialized in the declaration or constructor. 33
Parameter 'river' is not assigned and could be declared final 50
Parameter 'mountain' is not assigned and could be declared final 62

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java

Violation Line
Parameter 'numberOne' is not assigned and could be declared final 38
Parameter 'numberTwo' is not assigned and could be declared final 46

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ServerInfo.java

Violation Line
Private field 'version' could be made final; it is only initialized in the declaration or constructor. 54
Private field 'enabled' could be made final; it is only initialized in the declaration or constructor. 59

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SheetController.java

Violation Line
Private field 'solarList' could be made final; it is only initialized in the declaration or constructor. 49
Private field 'hugeSolarList' could be made final; it is only initialized in the declaration or constructor. 50
Local variable 'solarObject' could be declared final 62
Avoid instantiating new objects inside loops 63
Local variable 'solarObjectClone' could be declared final 63
Parameter 'sheetState' is not assigned and could be declared final 82
Avoid if (x != y) ..; else ..; 8995
Parameter 'automaticLayout' is not assigned and could be declared final 118
Parameter 'markup' is not assigned and could be declared final 126
Parameter 'columnEventSample' is not assigned and could be declared final 130
Parameter 'facesContext' is not assigned and could be declared final 143
Parameter 'uiComponent' is not assigned and could be declared final 143
Parameter 'value' is not assigned and could be declared final 143
Parameter 'value' is not assigned and could be declared final 151
Parameter 'uiComponent' is not assigned and could be declared final 151
Parameter 'facesContext' is not assigned and could be declared final 151

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SheetFilterController.java

Violation Line
Possible God class (WMC=49, ATFD=28, TCC=0.04666666666666667) 20285
The class 'SheetFilterController' has a Standard Cyclomatic Complexity of 2 (Highest = 10). 43285
The class 'SheetFilterController' has a Cyclomatic Complexity of 2 (Highest = 16). 43285
The class 'SheetFilterController' has a Modified Cyclomatic Complexity of 2 (Highest = 10). 43285
Private field 'filteredSolarList' could be made final; it is only initialized in the declaration or constructor. 47
Private field 'distanceItems' could be made final; it is only initialized in the declaration or constructor. 49
Private field 'minYearItems' could be made final; it is only initialized in the declaration or constructor. 50
Private field 'maxYearItems' could be made final; it is only initialized in the declaration or constructor. 51
Private field 'distanceRangeConverter' could be made final; it is only initialized in the declaration or constructor. 53
Local variable 'years' could be declared final 74
Local variable 'solarObject' could be declared final 75
Local variable 'year' could be declared final 85
Local variable 'selectItem' could be declared final 86
Avoid instantiating new objects inside loops 86
Overridable method 'filter' called during object construction 96
The method 'filter' has a Modified Cyclomatic Complexity of 10. 99133
The method 'filter' has a Cyclomatic Complexity of 16. 99133
The method filter() has an NPath complexity of 1088 99133
The method 'filter' has a Standard Cyclomatic Complexity of 10. 99133
Parameter 'event' is not assigned and could be declared final 135
Parameter 'name' is not assigned and could be declared final 163
Parameter 'orbit' is not assigned and could be declared final 171
Parameter 'distance' is not assigned and could be declared final 179
Parameter 'discoverer' is not assigned and could be declared final 187
Parameter 'minYear' is not assigned and could be declared final 195
Parameter 'maxYear' is not assigned and could be declared final 203
Private field 'min' could be made final; it is only initialized in the declaration or constructor. 209
Private field 'max' could be made final; it is only initialized in the declaration or constructor. 210
Parameter 'min' is not assigned and could be declared final 213
Parameter 'max' is not assigned and could be declared final 213
No need to call String.valueOf to append to a string. 216
No need to call String.valueOf to append to a string. 216
Parameter 'max' is not assigned and could be declared final 219
Parameter 'min' is not assigned and could be declared final 219
Parameter 'label' is not assigned and could be declared final 219
Local variable 'distanceItem' could be declared final 260
Local variable 'distanceItem' could be declared final 276

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SheetSortingController.java

Violation Line
The class 'SheetSortingController' has a Standard Cyclomatic Complexity of 6 (Highest = 10). 4093
The class 'SheetSortingController' has a Cyclomatic Complexity of 6 (Highest = 10). 4093
The class 'SheetSortingController' has a Modified Cyclomatic Complexity of 6 (Highest = 10). 4093
The method 'sheetSorter' has a Cyclomatic Complexity of 10. 5492
The method 'sheetSorter' has a Modified Cyclomatic Complexity of 10. 5492
The method 'sheetSorter' has a Standard Cyclomatic Complexity of 10. 5492
Local variable 'period1' could be declared final 72
Local variable 'period2' could be declared final 73
Avoid if (x != y) ..; else ..; 81
Local variable 'discoverYear1' could be declared final 81
Local variable 'discoverYear2' could be declared final 82
Avoid if (x != y) ..; else ..; 82

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SheetTreeController.java

Violation Line
Private field 'solarTree' could be made final; it is only initialized in the declaration or constructor. 33

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SourceFileReader.java

Violation Line
This abstract class does not have any abstract methods 3151
Parameter 'filename' is not assigned and could be declared final 35
String.indexOf(char) is faster than String.indexOf(String). 39

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/SuggestController.java

Violation Line
Parameter 'query' is not assigned and could be declared final 45
Avoid if (x != y) ..; else ..; 50

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TabController.java

Violation Line
Avoid unused private fields such as 'LOG'. 35
Private field 'open' could be made final; it is only initialized in the declaration or constructor. 37
Private field 'close' could be made final; it is only initialized in the declaration or constructor. 38
Parameter 'index' is not assigned and could be declared final 46
Avoid if (x != y) ..; else ..; 5155
Avoid if (x != y) ..; else ..; 5963
Avoid if (x != y) ..; else ..; 6771

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TestExceptionHandler.java

Violation Line
Private field 'wrapped' could be made final; it is only initialized in the declaration or constructor. 35
Avoid instantiating new objects inside loops 59

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TestExceptionHandlerFactory.java

Violation Line
Private field 'parent' could be made final; it is only initialized in the declaration or constructor. 27

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TextareaController.java

Violation Line
Parameter 'longText' is not assigned and could be declared final 54

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ThemeController.java

Violation Line
Avoid instantiating new objects inside loops 49
Parameter 'theme' is not assigned and could be declared final 57
Parameter 'themeItems' is not assigned and could be declared final 65
Consider using varargs for methods or constructors which take an array the last parameter. 65

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TobagoDemoController.java

Violation Line
This class has a bunch of public methods and attributes 20526
Possible God class (WMC=86, ATFD=26, TCC=0.01240079365079365) 20526
This class has too many methods, consider refactoring it. 54526
The class 'TobagoDemoController' has a Standard Cyclomatic Complexity of 1 (Highest = 14). 54526
The class 'TobagoDemoController' has a Modified Cyclomatic Complexity of 1 (Highest = 14). 54526
Too many fields 54526
The class 'TobagoDemoController' has a Cyclomatic Complexity of 1 (Highest = 14). 54526
Avoid unused private fields such as 'boolTest'. 64
Private field 'solarTree' could be made final; it is only initialized in the declaration or constructor. 70
Private field 'sheetTreeState' could be made final; it is only initialized in the declaration or constructor. 106
The String literal ".xhtml" appears 4 times in this file; the first occurrence is on line 164 164
String.indexOf(char) is faster than String.indexOf(String). 170
Avoid instantiating new objects inside loops 223
Document empty method 228230
Consider using varargs for methods or constructors which take an array the last parameter. 240
Consider using varargs for methods or constructors which take an array the last parameter. 248
Consider using varargs for methods or constructors which take an array the last parameter. 256
Consider using varargs for methods or constructors which take an array the last parameter. 264
Consider using varargs for methods or constructors which take an array the last parameter. 332
The method 'sheetSorter' has a Cyclomatic Complexity of 14. 422485
The method 'sheetSorter' has a Standard Cyclomatic Complexity of 14. 422485
The method 'sheetSorter' has a Modified Cyclomatic Complexity of 14. 422485
Avoid instantiating Integer objects. Call Integer.valueOf() instead. 450
Avoid instantiating Integer objects. Call Integer.valueOf() instead. 456
Document empty method 511513
Parameter 'actionEvent' is not assigned and could be declared final 515
Parameter 'selectManyShuttle' is not assigned and could be declared final 523
Consider using varargs for methods or constructors which take an array the last parameter. 523

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TreeCommandTypesController.java

Violation Line
Private field 'sample' could be made final; it is only initialized in the declaration or constructor. 33
Avoid using redundant field initializer for 'actionOneCount' 34
Avoid using redundant field initializer for 'actionTwoCount' 35
Parameter 'name' is not assigned and could be declared final 49

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TreeController.java

Violation Line
Private field 'sample' could be made final; it is only initialized in the declaration or constructor. 33
Avoid using redundant field initializer for 'treeShowRoot' 34
Avoid using redundant field initializer for 'treeShowRootJunction' 35
Parameter 'treeShowRoot' is not assigned and could be declared final 51
Parameter 'treeShowRootJunction' is not assigned and could be declared final 59
Parameter 'treeIndentRendered' is not assigned and could be declared final 67
Parameter 'treeIndentShowJunction' is not assigned and could be declared final 75

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TreeEditorController.java

Violation Line
This class has too many methods, consider refactoring it. 37217
Parameter 'name' is not assigned and could be declared final 59
Avoid if (x != y) ..; else ..; 6570
Avoid if (x != y) ..; else ..; 7685
Avoid if (x != y) ..; else ..; 7782
Parameter 'node' is not assigned and could be declared final 113
Local variable 'nodeName' could be declared final 114
Local variable 'resultNode' could be declared final 115
Local variable 'children' could be declared final 117
Avoid if (x != y) ..; else ..; 128140
Parameter 'base' is not assigned and could be declared final 144
Parameter 'selected' is not assigned and could be declared final 144
Local variable 'children' could be declared final 148
Parameter 'node' is not assigned and could be declared final 160
Local variable 'children' could be declared final 163
Local variable 'previousSibling' could be declared final 173
Avoid if (x != y) ..; else ..; 174180
Local variable 'parent' could be declared final 175
Local variable 'nextSibling' could be declared final 188
Avoid if (x != y) ..; else ..; 189195
Local variable 'parent' could be declared final 190

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/TreeSelectController.java

Violation Line
Private field 'sample' could be made final; it is only initialized in the declaration or constructor. 34
Parameter 'selectable' is not assigned and could be declared final 49
Local variable 'stringBuilder' could be declared final 54
Parameter 'node' is not assigned and could be declared final 63
Parameter 'stringBuilder' is not assigned and could be declared final 63
Local variable 'userObject' could be declared final 64
Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 66
Local variable 'child' could be declared final 69

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/UniversalLoggingInfo.java

Violation Line
Private field 'jul' could be made final; it is only initialized in the declaration or constructor. 46
Private field 'slf4j' could be made final; it is only initialized in the declaration or constructor. 51
Private field 'log4j' could be made final; it is only initialized in the declaration or constructor. 53
Private field 'log4j2' could be made final; it is only initialized in the declaration or constructor. 55
Private field 'commonsLogging' could be made final; it is only initialized in the declaration or constructor. 57
The String literal "getLogger" appears 4 times in this file; the first occurrence is on line 62 62
The String literal "info" appears 5 times in this file; the first occurrence is on line 67 67
The String literal "trace" appears 4 times in this file; the first occurrence is on line 71 71
The String literal "debug" appears 4 times in this file; the first occurrence is on line 72 72
The String literal "warn" appears 4 times in this file; the first occurrence is on line 74 74
The String literal "error" appears 4 times in this file; the first occurrence is on line 75 75
Overridable method 'update' called during object construction 97
Parameter 'testCategory' is not assigned and could be declared final 133
Avoid if (x != y) ..; else ..; 134138
Private field 'id' could be made final; it is only initialized in the declaration or constructor. 143
Private field 'calls' could be made final; it is only initialized in the declaration or constructor. 145
Private field 'factoryClassName' could be made final; it is only initialized in the declaration or constructor. 147
Private field 'factoryMethod' could be made final; it is only initialized in the declaration or constructor. 148
Private field 'usesString' could be made final; it is only initialized in the declaration or constructor. 149
Parameter 'id' is not assigned and could be declared final 151
Parameter 'factoryClassName' is not assigned and could be declared final 151
Parameter 'factoryMethod' is not assigned and could be declared final 151
Parameter 'usesString' is not assigned and could be declared final 152
Parameter 'category' is not assigned and could be declared final 152
Parameter 'calls' is not assigned and could be declared final 152
Local variable 'call' could be declared final 162
Parameter 'id' is not assigned and could be declared final 171
Parameter 'logger' is not assigned and could be declared final 171
A method/constructor shouldnt explicitly throw java.lang.Exception 171
Parameter 'name' is not assigned and could be declared final 171
Parameter 'category' is not assigned and could be declared final 185
Avoid if (x != y) ..; else ..; 196213
Local variable 'call' could be declared final 198
Parameter 'level' is not assigned and could be declared final 216
Parameter 'category' is not assigned and could be declared final 216
Local variable 'methodName' could be declared final 235
Consider simply returning the value vs storing it in local variable 'hasLevel' 237
Parameter 'clazz' is not assigned and could be declared final 243
Parameter 'enabledMethod' is not assigned and could be declared final 243
Parameter 'levelMethod' is not assigned and could be declared final 243
Parameter 'level' is not assigned and could be declared final 243
Parameter 'c' is not assigned and could be declared final 243
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 248
Consider simply returning the value vs storing it in local variable 'hasLevel' 250

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/UploadController.java

Violation Line
Private field 'uploadItems' could be made final; it is only initialized in the declaration or constructor. 46
Local variable 'part' could be declared final 59
Parameter 'event' is not assigned and could be declared final 65
Parameter 'part' is not assigned and could be declared final 69
Parameter 'fileBasic' is not assigned and could be declared final 88
Parameter 'fileContentType' is not assigned and could be declared final 96
Parameter 'fileMulti' is not assigned and could be declared final 104
Consider using varargs for methods or constructors which take an array the last parameter. 104
Parameter 'fileAjax' is not assigned and could be declared final 112

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/UploadItem.java

Violation Line
Avoid unused private fields such as 'LOG'. 29

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/ValidationJsr303Controller.java

Violation Line
Parameter 'required' is not assigned and could be declared final 42
Parameter 'length' is not assigned and could be declared final 50

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java

Violation Line
Avoid using redundant field initializer for 'count' 27
Parameter 'tabChangeEvent' is not assigned and could be declared final 33

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java

Violation Line
Overridable method 'resetList' called during object construction 39
Avoid instantiation through private constructors from outside of the constructors class. 44
Avoid instantiation through private constructors from outside of the constructors class. 45
Avoid instantiation through private constructors from outside of the constructors class. 46
Private field 'label' could be made final; it is only initialized in the declaration or constructor. 76
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 77

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java

Violation Line
Avoid instantiating new objects inside loops 58
Overridable method 'loadFromClientProperties' called during object construction 67
Avoid if (x != y) ..; else ..; 127131
Consider using varargs for methods or constructors which take an array the last parameter. 162
Avoid if (x != y) ..; else ..; 171175

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java

Violation Line
Document empty method 3334

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/formatter/AbstractConverter.java

Violation Line
Private field 'matcher' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'compiler' could be made final; it is only initialized in the declaration or constructor. 39
Private field 'util' could be made final; it is only initialized in the declaration or constructor. 40

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/formatter/JspTagConverter.java

Violation Line
Private field 'tagConverter' could be made final; it is only initialized in the declaration or constructor. 35
Private field 'tags' could be made final; it is only initialized in the declaration or constructor. 36
Prefer StringBuffer over += for concatenating strings 65
The String literal "</span>" appears 5 times in this file; the first occurrence is on line 65 65
Prefer StringBuffer over += for concatenating strings 67
Prefer StringBuffer over += for concatenating strings 72
Prefer StringBuffer over += for concatenating strings 75
Prefer StringBuffer over += for concatenating strings 80

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/formatter/SourceFormatter.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2869
Consider using varargs for methods or constructors which take an array the last parameter. 30
A method/constructor shouldnt explicitly throw java.lang.Exception 30
Avoid appending characters as strings in StringBuffer.append. 63

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/formatter/StringExpression.java

Violation Line
Private field 'string' could be made final; it is only initialized in the declaration or constructor. 36
Use ArrayList instead of Vector 57
Use ArrayList instead of Vector 58
Avoid using implementation types like 'Vector'; use the interface instead 82
Avoid using implementation types like 'Vector'; use the interface instead 82
String.indexOf(char) is faster than String.indexOf(String). 85
Avoid if (x != y) ..; else ..; 92104

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/info/ActivityList.java

Violation Line
Private field 'data' could be made final; it is only initialized in the declaration or constructor. 42
Avoid if (x != y) ..; else ..; 6367
Avoid if (x != y) ..; else ..; 7276

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/info/ActivityPhaseListener.java

Violation Line
Document empty constructor 3738
Document empty method 5354

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/nonfacesrequest/FishPond.java

Violation Line
Private field 'fishes' could be made final; it is only initialized in the declaration or constructor. 38
Avoid using redundant field initializer for 'selectedFishId' 40
Parameter 'selectedFishId' is not assigned and could be declared final 79

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/overview/OverviewController.java

Violation Line
Possible God class (WMC=48, ATFD=29, TCC=0.02275960170697013) 20303
Private field 'currencyItems' could be made final; it is only initialized in the declaration or constructor. 64
Do not add empty strings 115
Avoid instantiating new objects inside loops 120
Do not add empty strings 131
Avoid instantiating new objects inside loops 136
Avoid if (x != y) ..; else ..; 148152
The String literal "overview" appears 4 times in this file; the first occurrence is on line 180 180
Consider using varargs for methods or constructors which take an array the last parameter. 219

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/overview/SheetConfig.java

Violation Line
Private field 'sheetDirectLinkCountItems' could be made final; it is only initialized in the declaration or constructor. 37
Private field 'sheetPagingPositionItems' could be made final; it is only initialized in the declaration or constructor. 38
Consider using varargs for methods or constructors which take an array the last parameter. 67
Avoid instantiating new objects inside loops 71
Consider using varargs for methods or constructors which take an array the last parameter. 166
Parameter 'showDirectLinksArrows' is not assigned and could be declared final 182
Parameter 'showPageRangeArrows' is not assigned and could be declared final 190

Tobago Example Demo - org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java

Violation Line
This class has too many methods, consider refactoring it. 36263
Avoid instantiation through private constructors from outside of the constructors class. 62
Avoid instantiation through private constructors from outside of the constructors class. 82
Avoid instantiating new objects inside loops 132
Avoid instantiating new objects inside loops 149
Avoid instantiating new objects inside loops 166
Consider using varargs for methods or constructors which take an array the last parameter. 182
Avoid instantiation through private constructors from outside of the constructors class. 183
Do not add empty strings 183
Do not add empty strings 187
Do not add empty strings 189
Avoid if (x != y) ..; else ..; 201205
Private field 'n' could be made final; it is only initialized in the declaration or constructor. 215
Private field 'list' could be made final; it is only initialized in the declaration or constructor. 216

Tobago Example Test - org/apache/myfaces/tobago/example/test/Bootstrap.java

Violation Line
Overridable method 'reset' called during object construction 27

Tobago Example Test - org/apache/myfaces/tobago/example/test/ClientConfigController.java

Violation Line
Avoid instantiating new objects inside loops 55
Overridable method 'loadFromClientProperties' called during object construction 64
Avoid if (x != y) ..; else ..; 109113
Consider using varargs for methods or constructors which take an array the last parameter. 138
Avoid if (x != y) ..; else ..; 147151

Tobago Example Test - org/apache/myfaces/tobago/example/test/DateController.java

Violation Line
When instantiating a SimpleDateFormat object, specify a Locale 38
Parameter 'once' is not assigned and could be declared final 48

Tobago Example Test - org/apache/myfaces/tobago/example/test/DirectoryBrowser.java

Violation Line
The class 'DirectoryBrowser' has a Cyclomatic Complexity of 4 (Highest = 14). 33108
The class 'DirectoryBrowser' has a Standard Cyclomatic Complexity of 3 (Highest = 12). 33108
The class 'DirectoryBrowser' has a Modified Cyclomatic Complexity of 3 (Highest = 12). 33108
Private field 'tree' could be made final; it is only initialized in the declaration or constructor. 37
The method 'locateResourcesInWar' has a Standard Cyclomatic Complexity of 12. 4995
The method 'locateResourcesInWar' has a Cyclomatic Complexity of 14. 4995
The method 'locateResourcesInWar' has a Modified Cyclomatic Complexity of 12. 4995
The method locateResourcesInWar() has an NPath complexity of 252 4995
These nested if statements could be combined 7176
Deeply nested if..then statements are hard to read 7274
Avoid instantiating new objects inside loops 75
Avoid instantiating new objects inside loops 81

Tobago Example Test - org/apache/myfaces/tobago/example/test/DynamicBean.java

Violation Line
Private field 'panels' could be made final; it is only initialized in the declaration or constructor. 30
A switch statement does not contain a break 3447

Tobago Example Test - org/apache/myfaces/tobago/example/test/DynamicPanel.java

Violation Line
This abstract class does not have any abstract methods 2240

Tobago Example Test - org/apache/myfaces/tobago/example/test/Hidden.java

Violation Line
Avoid unused private fields such as 'LOG'. 31

Tobago Example Test - org/apache/myfaces/tobago/example/test/Immediate.java

Violation Line
Private field 'selectItems' could be made final; it is only initialized in the declaration or constructor. 35
Consider using varargs for methods or constructors which take an array the last parameter. 73

Tobago Example Test - org/apache/myfaces/tobago/example/test/MeasureBean.java

Violation Line
Private field 'value' could be made final; it is only initialized in the declaration or constructor. 84

Tobago Example Test - org/apache/myfaces/tobago/example/test/PageItem.java

Violation Line
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 31
Private field 'folder' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'disabled' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'todo' could be made final; it is only initialized in the declaration or constructor. 35
String.indexOf(char) is faster than String.indexOf(String). 45

Tobago Example Test - org/apache/myfaces/tobago/example/test/Partially.java

Violation Line
StringBuffer constructor is initialized with size 16, but has at least 32 characters appended. 31
Avoid appending characters as strings in StringBuffer.append. 42

Tobago Example Test - org/apache/myfaces/tobago/example/test/PopupReferenceController.java

Violation Line
Private field 'sheet' could be made final; it is only initialized in the declaration or constructor. 38
Avoid instantiating new objects inside loops 44

Tobago Example Test - org/apache/myfaces/tobago/example/test/Progress.java

Violation Line
Private field 'range' could be made final; it is only initialized in the declaration or constructor. 28
Private field 'emptyRange' could be made final; it is only initialized in the declaration or constructor. 29

Tobago Example Test - org/apache/myfaces/tobago/example/test/ScriptEvent.java

Violation Line
Private field 'items' could be made final; it is only initialized in the declaration or constructor. 28

Tobago Example Test - org/apache/myfaces/tobago/example/test/ScriptEventItem.java

Violation Line
Private field 'name' could be made final; it is only initialized in the declaration or constructor. 31
Private field 'time' could be made final; it is only initialized in the declaration or constructor. 32

Tobago Example Test - org/apache/myfaces/tobago/example/test/ScriptEventServlet.java

Violation Line
Position literals first in String comparisons 44
Position literals first in String comparisons 46
Position literals first in String comparisons 48

Tobago Example Test - org/apache/myfaces/tobago/example/test/SelectManyListboxBean.java

Violation Line
Private field 'currencyItems' could be made final; it is only initialized in the declaration or constructor. 42
Consider using varargs for methods or constructors which take an array the last parameter. 65
Consider using varargs for methods or constructors which take an array the last parameter. 97

Tobago Example Test - org/apache/myfaces/tobago/example/test/SheetController.java

Violation Line
Private field 'solarArray' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'solarArray3' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'undefined' could be made final; it is only initialized in the declaration or constructor. 35
System.arraycopy is more efficient 4345
Private field 'localeList' could be made final; it is only initialized in the declaration or constructor. 50
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 50

Tobago Example Test - org/apache/myfaces/tobago/example/test/SheetSortController.java

Violation Line
Avoid instantiating new objects inside loops 47
Avoid instantiation through private constructors from outside of the constructors class. 47
Avoid reassigning parameters such as 'i' 64
Avoid reassigning parameters such as 'i' 64
Avoid reassigning parameters such as 'i' 64
Avoid reassigning parameters such as 'i' 64
Avoid reassigning parameters such as 'i' 64
Do not add empty strings 65
Do not add empty strings 67
Do not add empty strings 69
Do not add empty strings 71
Do not add empty strings 82

Tobago Example Test - org/apache/myfaces/tobago/example/test/TestExceptionHandler.java

Violation Line
Private field 'wrapped' could be made final; it is only initialized in the declaration or constructor. 36
Avoid instantiating new objects inside loops 59

Tobago Example Test - org/apache/myfaces/tobago/example/test/TestExceptionHandlerFactory.java

Violation Line
Private field 'parent' could be made final; it is only initialized in the declaration or constructor. 27

Tobago Example Test - org/apache/myfaces/tobago/example/test/TestPageFilter.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 27132
This call to String.startsWith can be rewritten using String.charAt(0) 85

Tobago Example Test - org/apache/myfaces/tobago/example/test/TreeController.java

Violation Line
Private field 'tree' could be made final; it is only initialized in the declaration or constructor. 36
Private field 'small' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'state' could be made final; it is only initialized in the declaration or constructor. 40
Private field 'treeInSheet' could be made final; it is only initialized in the declaration or constructor. 42
Private field 'infinite' could be made final; it is only initialized in the declaration or constructor. 44

Tobago Example Test - org/apache/myfaces/tobago/example/test/UndefinedRowCountDataModel.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 28

Tobago Example Test - org/apache/myfaces/tobago/example/test/WaitFilter.java

Violation Line
Document empty method 4142
Document empty method 6263

Tobago Sandbox - org/apache/myfaces/tobago/internal/component/AbstractUISplitLayout.java

Violation Line
Avoid unused local variables such as 'firstComponent'. 39
Avoid unused local variables such as 'secondComponent'. 40
Avoid unused local variables such as 'oldPosition'. 41
Avoid unused local variables such as 'currentSize1'. 43
Avoid unused local variables such as 'currentSize2'. 44
Avoid reassigning parameters such as 'a' 66
Avoid reassigning parameters such as 'a' 66
Avoid reassigning parameters such as 'b' 66
Avoid reassigning parameters such as 'b' 66
An empty method in an abstract class should be abstract instead 100101
Document empty method 100101
Document empty method 113114
An empty method in an abstract class should be abstract instead 113114
Avoid if (x != y) ..; else ..; 122

Tobago Sandbox - org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java

Violation Line
Avoid unused private fields such as 'SLIDER_WIDTH_PERCENT'. 44
Avoid really long methods. 47156

Tobago Sandbox - org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java

Violation Line
Avoid unused method parameters such as 'layout'. 112
Avoid unused private methods such as 'calculateHandleStyle(AbstractUISplitLayout)'. 141
Avoid unused method parameters such as 'layout'. 141

Tobago Theme Example - org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java

Violation Line
Position literals first in String comparisons 50
Position literals first in String comparisons 56

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java

Violation Line
Avoid using redundant field initializer for 'index' 241
Local variable 'result' could be declared final 265
Consider using varargs for methods or constructors which take an array the last parameter. 274

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/css/TobagoClass.java

Violation Line
Parameter 'alignItems' is not assigned and could be declared final 88
Parameter 'justifyContent' is not assigned and could be declared final 110

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/AjaxClientBehaviorRenderer.java

Violation Line
Parameter 'behavior' is not assigned and could be declared final 46
Parameter 'behaviorContext' is not assigned and could be declared final 46
Local variable 'omit' could be declared final 6972
Avoid if (x != y) ..; else ..; 7781
Prefer StringBuffer over += for concatenating strings 78
Parameter 'behavior' is not assigned and could be declared final 103
Parameter 'component' is not assigned and could be declared final 103
Parameter 'context' is not assigned and could be declared final 103
Local variable 'ajaxBehavior' could be declared final 104
Parameter 'component' is not assigned and could be declared final 112
Parameter 'ajaxBehavior' is not assigned and could be declared final 112
Local variable 'event' could be declared final 114
Local variable 'isImmediate' could be declared final 115
Parameter 'ajaxBehavior' is not assigned and could be declared final 120
Parameter 'component' is not assigned and could be declared final 120
Parameter 'component' is not assigned and could be declared final 133
Parameter 'facesContext' is not assigned and could be declared final 133
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 141

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/Collapse.java

Violation Line
Private field 'action' could be made final; it is only initialized in the declaration or constructor. 24
Private field 'forId' could be made final; it is only initialized in the declaration or constructor. 25
Parameter 'action' is not assigned and could be declared final 27
Parameter 'forId' is not assigned and could be declared final 27

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/Command.java

Violation Line
Document empty constructor 5556
Avoid long parameter lists. 5861
Avoid reassigning parameters such as 'facetComponent' 88
Do not add empty strings 124
Parameter 'execute' is not assigned and could be declared final 177
Parameter 'render' is not assigned and could be declared final 187
Parameter 'collapse' is not assigned and could be declared final 221

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/CommandMap.java

Violation Line
Document empty constructor 4041
Position literals first in String comparisons 59
Avoid if (x != y) ..; else ..; 7377
Avoid if (x != y) ..; else ..; 8288
Local variable 'entry' could be declared final 85

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/JsonUtils.java

Violation Line
Possible God class (WMC=51, ATFD=26, TCC=0.0) 20292
The class 'JsonUtils' has a Modified Cyclomatic Complexity of 3 (Highest = 13). 36292
This class has too many methods, consider refactoring it. 36292
A class which only has private constructors should be final 36292
The class 'JsonUtils' has a Standard Cyclomatic Complexity of 3 (Highest = 13). 36292
The class 'JsonUtils' has a Cyclomatic Complexity of 4 (Highest = 15). 36292
Consider using varargs for methods or constructors which take an array the last parameter. 43
Avoid appending characters as strings in StringBuffer.append. 44
Avoid appending characters as strings in StringBuffer.append. 48
Parameter 'value' is not assigned and could be declared final 51
Consider using varargs for methods or constructors which take an array the last parameter. 51
Parameter 'builder' is not assigned and could be declared final 51
Avoid appending characters as strings in StringBuffer.append. 52
Avoid appending characters as strings in StringBuffer.append. 56
Avoid appending characters as strings in StringBuffer.append. 58
Avoid appending characters as strings in StringBuffer.append. 60
Avoid appending characters as strings in StringBuffer.append. 63
Parameter 'value' is not assigned and could be declared final 66
Parameter 'builder' is not assigned and could be declared final 66
Avoid appending characters as strings in StringBuffer.append. 67
Avoid appending characters as strings in StringBuffer.append. 71
Avoid appending characters as strings in StringBuffer.append. 76
Avoid appending characters as strings in StringBuffer.append. 80
Avoid appending characters as strings in StringBuffer.append. 84
Avoid appending characters as strings in StringBuffer.append. 88
Avoid appending characters as strings in StringBuffer.append. 92
Avoid reassigning parameters such as 'value' 95
Avoid appending characters as strings in StringBuffer.append. 97
Avoid appending characters as strings in StringBuffer.append. 106
Avoid appending characters as strings in StringBuffer.append. 126
The method encode() has an NPath complexity of 9216 130187
The method 'encode' has a Standard Cyclomatic Complexity of 13. 130187
The method 'encode' has a Modified Cyclomatic Complexity of 13. 130187
The method 'encode' has a Cyclomatic Complexity of 15. 130187
Avoid appending characters as strings in StringBuffer.append. 131
Avoid appending characters as strings in StringBuffer.append. 190
Avoid appending characters as strings in StringBuffer.append. 213
Avoid appending characters as strings in StringBuffer.append. 227
Consider using varargs for methods or constructors which take an array the last parameter. 231
Avoid appending characters as strings in StringBuffer.append. 250
Avoid appending characters as strings in StringBuffer.append. 269
Avoid reassigning parameters such as 'json' 272
Avoid reassigning parameters such as 'json' 272

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BarRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 49
Parameter 'component' is not assigned and could be declared final 49
Parameter 'component' is not assigned and could be declared final 79
Parameter 'facesContext' is not assigned and could be declared final 79
Local variable 'itemsToEncode' could be declared final 83
Local variable 'child' could be declared final 85
Parameter 'result' is not assigned and could be declared final 93
Local variable 'child' could be declared final 94
Parameter 'component' is not assigned and could be declared final 106
Parameter 'facesContext' is not assigned and could be declared final 106
Parameter 'facesContext' is not assigned and could be declared final 114
Parameter 'navbarId' is not assigned and could be declared final 114
Parameter 'bar' is not assigned and could be declared final 114
Parameter 'writer' is not assigned and could be declared final 114

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java

Violation Line
The class 'BoxRenderer' has a Cyclomatic Complexity of 6 (Highest = 11). 39109
The method 'encodeBegin' has a Cyclomatic Complexity of 11. 42100
The method encodeBegin() has an NPath complexity of 200 42100

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ButtonsRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 39
Parameter 'component' is not assigned and could be declared final 39
Parameter 'component' is not assigned and could be declared final 58
Parameter 'facesContext' is not assigned and could be declared final 58

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnRenderer.java

Violation Line
Avoid unused private methods such as 'isPure(UIColumn)'. 39

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20265
The class 'CommandRendererBase' has a Modified Cyclomatic Complexity of 4 (Highest = 14). 56265
The class 'CommandRendererBase' has a Cyclomatic Complexity of 4 (Highest = 14). 56265
The class 'CommandRendererBase' has a Standard Cyclomatic Complexity of 4 (Highest = 14). 56265
The method 'encodeBegin' has a Modified Cyclomatic Complexity of 14. 81202
The method encodeBegin() has an NPath complexity of 3264 81202
The method 'encodeBegin' has a Standard Cyclomatic Complexity of 14. 81202
Avoid really long methods. 81202
The method 'encodeBegin' has a Cyclomatic Complexity of 14. 81202
An empty method in an abstract class should be abstract instead 253255
Document empty method 254255
Parameter 'command' is not assigned and could be declared final 260

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandsRenderer.java

Violation Line
Parameter 'component' is not assigned and could be declared final 37
Parameter 'facesContext' is not assigned and could be declared final 37
Parameter 'component' is not assigned and could be declared final 51
Parameter 'facesContext' is not assigned and could be declared final 51
Local variable 'child' could be declared final 54
Avoid unused local variables such as 'commands'. 60
Parameter 'component' is not assigned and could be declared final 71
Parameter 'facesContext' is not assigned and could be declared final 71

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DateRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 61
Parameter 'component' is not assigned and could be declared final 61
Parameter 'component' is not assigned and could be declared final 74
Parameter 'facesContext' is not assigned and could be declared final 74

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/DecodingRendererBase.java

Violation Line
Local variable 'textarea' could be declared final 64
Deeply nested if..then statements are hard to read 6569

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.java

Violation Line
Parameter 'component' is not assigned and could be declared final 40
Parameter 'facesContext' is not assigned and could be declared final 40
Parameter 'component' is not assigned and could be declared final 56
Parameter 'facesContext' is not assigned and could be declared final 56

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20203
Parameter 'event' is not assigned and could be declared final 62
Local variable 'httpServletRequest' could be declared final 82
Local variable 'parts' could be declared final 84
Local variable 'part' could be declared final 85
Avoid instantiating new objects inside loops 89
Avoid instantiating new objects inside loops 91
Parameter 'component' is not assigned and could be declared final 113
Parameter 'facesContext' is not assigned and could be declared final 113
Local variable 'multiFormat' could be declared final 150
Local variable 'validator' could be declared final 182
Avoid appending characters as strings in StringBuffer.append. 186
Parameter 'component' is not assigned and could be declared final 199
Parameter 'facesContext' is not assigned and could be declared final 199

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlexLayoutRenderer.java

Violation Line
Local variable 'b' could be declared final 45
Local variable 'vertically' could be declared final 83

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 38
Parameter 'component' is not assigned and could be declared final 38
Parameter 'facesContext' is not assigned and could be declared final 53
Parameter 'component' is not assigned and could be declared final 53

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/GridLayoutRenderer.java

Violation Line
The class 'GridLayoutRenderer' has a Standard Cyclomatic Complexity of 5 (Highest = 10). 47159
The class 'GridLayoutRenderer' has a Cyclomatic Complexity of 5 (Highest = 10). 47159
The class 'GridLayoutRenderer' has a Modified Cyclomatic Complexity of 5 (Highest = 10). 47159
Avoid unused private fields such as 'LOG'. 49
StringBuffer constructor is initialized with size 16, but has at least 24 characters appended. 62
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 66
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 66
Avoid appending characters as strings in StringBuffer.append. 66
Avoid appending characters as strings in StringBuffer.append. 70
Avoid unused local variables such as 'column'. 76
Local variable 'column' could be declared final 76
The method 'encodeChildren' has a Modified Cyclomatic Complexity of 10. 85150
The method 'encodeChildren' has a Cyclomatic Complexity of 10. 85150
The method 'encodeChildren' has a Standard Cyclomatic Complexity of 10. 85150
Local variable 'builder' could be declared final 116
Avoid instantiating new objects inside loops 116
Avoid appending characters as strings in StringBuffer.append. 117
Avoid appending characters as strings in StringBuffer.append. 124
Avoid appending characters as strings in StringBuffer.append. 132
Avoid appending characters as strings in StringBuffer.append. 138

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 38
Parameter 'component' is not assigned and could be declared final 38
Parameter 'facesContext' is not assigned and could be declared final 57
Parameter 'component' is not assigned and could be declared final 57

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HiddenRenderer.java

Violation Line
Parameter 'component' is not assigned and could be declared final 39
Parameter 'facesContext' is not assigned and could be declared final 39
Avoid if (x != y) ..; else ..; 60
Parameter 'facesContext' is not assigned and could be declared final 64
Parameter 'component' is not assigned and could be declared final 64

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 5067

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java

Violation Line
The class 'InRenderer' has a Cyclomatic Complexity of 6 (Highest = 18). 50176
The class 'InRenderer' has a Standard Cyclomatic Complexity of 6 (Highest = 14). 50176
The class 'InRenderer' has a Modified Cyclomatic Complexity of 6 (Highest = 14). 50176
Parameter 'component' is not assigned and could be declared final 55
Parameter 'facesContext' is not assigned and could be declared final 55
The method 'encodeBeginField' has a Modified Cyclomatic Complexity of 14. 55146
The method encodeBeginField() has an NPath complexity of 69120 55146
The method 'encodeBeginField' has a Cyclomatic Complexity of 18. 55146
The method 'encodeBeginField' has a Standard Cyclomatic Complexity of 14. 55146
Avoid if (x != y) ..; else ..; 133137
Parameter 'writer' is not assigned and could be declared final 148
Parameter 'facesContext' is not assigned and could be declared final 148
Parameter 'addon' is not assigned and could be declared final 148
Local variable 'child' could be declared final 157
Document empty method 169170
Parameter 'component' is not assigned and could be declared final 169
Parameter 'facesContext' is not assigned and could be declared final 169
Document empty method 174175

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java

Violation Line
The class 'LabelLayoutRendererBase' has a Standard Cyclomatic Complexity of 4 (Highest = 11). 46219
The class 'LabelLayoutRendererBase' has a Cyclomatic Complexity of 4 (Highest = 11). 46219
The method encodeBeginSurrounding() has an NPath complexity of 480 96172
The method 'encodeBeginSurrounding' has a Standard Cyclomatic Complexity of 11. 96172
The method 'encodeBeginSurrounding' has a Cyclomatic Complexity of 11. 96172
Avoid declaring a variable if it is unreferenced before a possible exit point. 99
A switch statement does not contain a break 112122
A switch statement does not contain a break 154171
Parameter 'labelLayout' is not assigned and could be declared final 195
Parameter 'component' is not assigned and could be declared final 195
Parameter 'writer' is not assigned and could be declared final 195
Local variable 'labelWithAccessKey' could be declared final 204
Parameter 'component' is not assigned and could be declared final 213

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelRenderer.java

Violation Line
Parameter 'event' is not assigned and could be declared final 49
Avoid if (x != y) ..; else ..; 63

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/MediatorRenderer.java

Violation Line
Avoid unused private fields such as 'LOG'. 36

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/MessagesRenderer.java

Violation Line
The class 'MessagesRenderer' has a Cyclomatic Complexity of 10 (Highest = 10). 45177
The method 'encodeEnd' has a Cyclomatic Complexity of 10. 50145
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 65
Use equals() to compare object references. 90
Use equals() to compare object references. 94

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ObjectRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 5256

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java

Violation Line
Possible God class (WMC=59, ATFD=136, TCC=0.0) 20492
A high number of imports can indicate a high degree of coupling within an object. 20492
The class 'PageRenderer' has a Standard Cyclomatic Complexity of 6 (Highest = 29). 68492
The class 'PageRenderer' has a Cyclomatic Complexity of 7 (Highest = 31). 68492
The class 'PageRenderer' has a Modified Cyclomatic Complexity of 6 (Highest = 29). 68492
Avoid really long methods. 91300
The method encodeBegin() has an NPath complexity of 774230400 91300
The method 'encodeBegin' has a Standard Cyclomatic Complexity of 29. 91300
The method 'encodeBegin' has a Cyclomatic Complexity of 31. 91300
The method encodeBegin() has an NCSS line count of 129 91300
The method 'encodeBegin' has a Modified Cyclomatic Complexity of 29. 91300
Avoid if (x != y) ..; else ..; 156
Avoid if (x != y) ..; else ..; 182196
Local variable 'root' could be declared final 198
Local variable 'componentResources' could be declared final 199
Local variable 'childCount' could be declared final 201
Local variable 'child' could be declared final 202
Avoid unused private methods such as 'writeEventFunction(TobagoResponseWriter,Collection,String,boolean)'. 396398
Avoid if (x != y) ..; else ..; 414418

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java

Violation Line
Parameter 'component' is not assigned and could be declared final 39
Parameter 'facesContext' is not assigned and could be declared final 39
Parameter 'facesContext' is not assigned and could be declared final 75
Parameter 'component' is not assigned and could be declared final 75

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java

Violation Line
Avoid unused private fields such as 'LOG'. 40

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ScriptRenderer.java

Violation Line
Parameter 'event' is not assigned and could be declared final 36

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SectionRenderer.java

Violation Line
Local variable 'label' could be declared final 54
A switch statement does not contain a break 5674

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SegmentLayoutRenderer.java

Violation Line
Avoid unused private fields such as 'LOG'. 45
Avoid declaring a variable if it is unreferenced before a possible exit point. 66
Local variable 'child' could be declared final 79
Parameter 'generator' is not assigned and could be declared final 111
Parameter 'writer' is not assigned and could be declared final 111
Parameter 'child' is not assigned and could be declared final 111
Parameter 'facesContext' is not assigned and could be declared final 111

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java

Violation Line
The String literal "true" appears 4 times in this file; the first occurrence is on line 63 63
Parameter 'component' is not assigned and could be declared final 69
Parameter 'facesContext' is not assigned and could be declared final 69
Avoid if (x != y) ..; else ..; 116120
Parameter 'component' is not assigned and could be declared final 131
Parameter 'facesContext' is not assigned and could be declared final 131

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 9599

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 58
Avoid if (x != y) ..; else ..; 7680

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyRendererBase.java

Violation Line
Possible God class (WMC=116, ATFD=71, TCC=0.0) 20810
A high number of imports can indicate a high degree of coupling within an object. 20810
The class 'SelectManyRendererBase' has a Cyclomatic Complexity of 6 (Highest = 31). 57810
The class 'SelectManyRendererBase' has a Modified Cyclomatic Complexity of 6 (Highest = 28). 57810
The class 'SelectManyRendererBase' has a Standard Cyclomatic Complexity of 6 (Highest = 28). 57810
Avoid if (x != y) ..; else ..; 74
Parameter 'input' is not assigned and could be declared final 90
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 122
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 123
Parameter 'facesContext' is not assigned and could be declared final 125
Parameter 'component' is not assigned and could be declared final 125
Consider using varargs for methods or constructors which take an array the last parameter. 126
Parameter 'submittedValue' is not assigned and could be declared final 126
Parameter 'component' is not assigned and could be declared final 143
Avoid really long methods. 143320
Parameter 'facesContext' is not assigned and could be declared final 143
The method getConvertedUISelectManyValue() has an NPath complexity of 2760 143320
The method 'getConvertedUISelectManyValue' has a Cyclomatic Complexity of 31. 143320
The method 'getConvertedUISelectManyValue' has a Standard Cyclomatic Complexity of 28. 143320
The method 'getConvertedUISelectManyValue' has a Modified Cyclomatic Complexity of 28. 143320
Parameter 'submittedValue' is not assigned and could be declared final 144
Parameter 'considerValueType' is not assigned and could be declared final 144
Local variable 'expression' could be declared final 154
Avoid if (x != y) ..; else ..; 165297
Local variable 'modelType' could be declared final 166167
Local variable 'componentType' could be declared final 173
Local variable 'iterator' could be declared final 203
Local variable 'collectionTypeAttr' could be declared final 207208
Avoid if (x != y) ..; else ..; 209289
Local variable 'collectionType' could be declared final 210
Local variable 'componentValue' could be declared final 238239
Local variable 'cloneMethod' could be declared final 244245
Local variable 'clone' could be declared final 246247
Avoid if (x != y) ..; else ..; 260262
Local variable 'isArray' could be declared final 301
Avoid if (x != y) ..; else ..; 305310
Parameter 'facesContext' is not assigned and could be declared final 333
Avoid reassigning parameters such as 'attribute' 334
Parameter 'component' is not assigned and could be declared final 374
Parameter 'facesContext' is not assigned and could be declared final 374
Local variable 'valueTypeAttr' could be declared final 377
Local variable 'valueType' could be declared final 380
Parameter 'iterator' is not assigned and could be declared final 414
Parameter 'facesContext' is not assigned and could be declared final 414
Local variable 'item' could be declared final 421
Local variable 'groupIterator' could be declared final 423424
Local variable 'selectItemsType' could be declared final 427
Parameter 'component' is not assigned and could be declared final 452
Local variable 'builder' could be declared final 453
The String literal "{Component-Path : " appears 4 times in this file; the first occurrence is on line 456 456
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 456
Avoid appending characters as strings in StringBuffer.append. 464
Parameter 'component' is not assigned and could be declared final 469
Parameter 'builder' is not assigned and could be declared final 469
Local variable 'intBuilder' could be declared final 474
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 476
Avoid appending characters as strings in StringBuffer.append. 485
The class 'SelectItemsIterator' has a Cyclomatic Complexity of 6 (Highest = 27). 500779
The class 'SelectItemsIterator' has a Modified Cyclomatic Complexity of 6 (Highest = 23). 500779
The class 'SelectItemsIterator' has a Standard Cyclomatic Complexity of 6 (Highest = 23). 500779
Private field 'facesContext' could be made final; it is only initialized in the declaration or constructor. 518
Parameter 'selectItemsParent' is not assigned and could be declared final 520
Parameter 'facesContext' is not assigned and could be declared final 520
Avoid really long methods. 529639
The method 'hasNext' has a Standard Cyclomatic Complexity of 23. 529639
The method 'hasNext' has a Modified Cyclomatic Complexity of 23. 529639
The method 'hasNext' has a Cyclomatic Complexity of 27. 529639
The method hasNext() has an NPath complexity of 1662 529639
Local variable 'uiSelectItem' could be declared final 560
Local variable 'itemValue' could be declared final 564
Local variable 'description' could be declared final 566
Local variable 'disabled' could be declared final 567
Local variable 'escape' could be declared final 568
Local variable 'noSelectionOption' could be declared final 569
Local variable 'expression' could be declared final 575
Local variable 'value' could be declared final 585
Local variable 'length' could be declared final 594
Local variable 'items' could be declared final 595
Local variable 'map' could be declared final 606
Local variable 'items' could be declared final 607
Local variable 'entry' could be declared final 608
Avoid instantiating new objects inside loops 609
Local variable 'expression' could be declared final 618
Local variable 'objects' could be declared final 619623
Local variable 'message' could be declared final 624626
The method 'next' has a Standard Cyclomatic Complexity of 11. 642715
The method 'next' has a Modified Cyclomatic Complexity of 11. 642715
The method next() has an NPath complexity of 296 642715
The method 'next' has a Cyclomatic Complexity of 12. 642715
Local variable 'value' could be declared final 647
Local variable 'attributeMap' could be declared final 658
Local variable 'var' could be declared final 663
Local variable 'itemDisabled' could be declared final 690
Local variable 'itemLabelEscaped' could be declared final 691
Local variable 'noSelectionValue' could be declared final 692
Avoid if (x != y) ..; else ..; 703709
Parameter 'component' is not assigned and could be declared final 726
Parameter 'defaultValue' is not assigned and could be declared final 726
Parameter 'attrName' is not assigned and could be declared final 726
Local variable 'value' could be declared final 727
Parameter 'component' is not assigned and could be declared final 740
Local variable 'builder' could be declared final 741
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 744
Avoid appending characters as strings in StringBuffer.append. 752
Parameter 'component' is not assigned and could be declared final 757
Parameter 'builder' is not assigned and could be declared final 757
Local variable 'intBuilder' could be declared final 762
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 764
Avoid appending characters as strings in StringBuffer.append. 773

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java

Violation Line
Avoid unused local variables such as 'hasLabel'. 56
Avoid if (x != y) ..; else ..; 69
Avoid if (x != y) ..; else ..; 130134

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java

Violation Line
Parameter 'facesContext' is not assigned and could be declared final 47
Parameter 'component' is not assigned and could be declared final 47
Avoid if (x != y) ..; else ..; 6973
Parameter 'facesContext' is not assigned and could be declared final 82
Parameter 'component' is not assigned and could be declared final 82

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 57
Avoid if (x != y) ..; else ..; 7579
Parameter 'facesContext' is not assigned and could be declared final 86
Parameter 'component' is not assigned and could be declared final 86

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java

Violation Line
The class 'SelectOneRadioRenderer' has a Cyclomatic Complexity of 6 (Highest = 10). 42133
The class 'SelectOneRadioRenderer' has a Modified Cyclomatic Complexity of 6 (Highest = 10). 42133
The class 'SelectOneRadioRenderer' has a Standard Cyclomatic Complexity of 6 (Highest = 10). 42133
Parameter 'component' is not assigned and could be declared final 45
Parameter 'facesContext' is not assigned and could be declared final 45
The method encodeBeginField() has an NPath complexity of 482 45126
The method 'encodeBeginField' has a Modified Cyclomatic Complexity of 10. 45126
The method 'encodeBeginField' has a Cyclomatic Complexity of 10. 45126
The method 'encodeBeginField' has a Standard Cyclomatic Complexity of 10. 45126
Avoid if (x != y) ..; else ..; 98102
Local variable 'tobagoItem' could be declared final 106
Parameter 'component' is not assigned and could be declared final 129
Parameter 'facesContext' is not assigned and could be declared final 129

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectReferenceRenderer.java

Violation Line
Avoid unused private fields such as 'LOG'. 35

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java

Violation Line
Avoid if (x != y) ..; else ..; 4556

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java

Violation Line
Possible God class (WMC=212, ATFD=494, TCC=0.005263157894736842) 201192
A high number of imports can indicate a high degree of coupling within an object. 201192
This class has too many methods, consider refactoring it. 941192
Avoid really long classes. 941192
The class 'SheetRenderer' has a Cyclomatic Complexity of 10 (Highest = 82). 941192
The class 'SheetRenderer' has a Modified Cyclomatic Complexity of 9 (Highest = 76). 941192
The class 'SheetRenderer' has a Standard Cyclomatic Complexity of 9 (Highest = 76). 941192
The method 'encodeBegin' has a Cyclomatic Complexity of 10. 151212
Avoid if (x != y) ..; else ..; 168172
Avoid if (x != y) ..; else ..; 174178
Avoid appending characters as strings in StringBuffer.append. 209
The method 'encodeEnd' has a Standard Cyclomatic Complexity of 76. 220694
The method encodeEnd() has an NCSS line count of 333 220694
The method 'encodeEnd' has a Cyclomatic Complexity of 82. 220694
The method 'encodeEnd' has a Modified Cyclomatic Complexity of 76. 220694
The method encodeEnd() has an NPath complexity of 1798807808 220694
Avoid really long methods. 220694
Local variable 'sheetMarkup' could be declared final 236
Avoid if (x != y) ..; else ..; 236
Local variable 'column' could be declared final 255
Avoid if (x != y) ..; else ..; 308
Avoid if (x != y) ..; else ..; 335
Avoid appending characters as strings in StringBuffer.append. 382
Avoid instantiating new objects inside loops 408
Local variable 'selector' could be declared final 431
Avoid instantiating new objects inside loops 479
The String literal "tobago" appears 13 times in this file; the first occurrence is on line 520 520
Avoid if (x != y) ..; else ..; 523572
Avoid if (x != y) ..; else ..; 620667
Local variable 'column' could be declared final 702
Avoid if (x != y) ..; else ..; 716
Parameter 'column' is not assigned and could be declared final 723
The method 'encodeHeaderRows' has a Modified Cyclomatic Complexity of 22. 740910
The method 'encodeHeaderRows' has a Cyclomatic Complexity of 27. 740910
The method encodeHeaderRows() has an NPath complexity of 23191 740910
The method 'encodeHeaderRows' has a Standard Cyclomatic Complexity of 24. 740910
The method encodeHeaderRows() has an NCSS line count of 129 740910
Avoid really long methods. 740910
Avoid if (x != y) ..; else ..; 774790
A switch statement does not contain a break 775787
String.indexOf(char) is faster than String.indexOf(String). 803
Prefer StringBuffer over += for concatenating strings 817
Prefer StringBuffer over += for concatenating strings 819
Prefer StringBuffer over += for concatenating strings 836
These nested if statements could be combined 893895
Parameter 'isHeader' is not assigned and could be declared final 926
Local variable 'column' could be declared final 930
The method encodeLink() has an NPath complexity of 200 9821021
Parameter 'icon' is not assigned and could be declared final 984
Parameter 'target' is not assigned and could be declared final 984
Parameter 'liClass' is not assigned and could be declared final 984
Avoid if (x != y) ..; else ..; 10141018
The method 'encodeDirectPagingLinks' has a Cyclomatic Complexity of 23. 10361109
The method 'encodeDirectPagingLinks' has a Modified Cyclomatic Complexity of 20. 10361109
The method 'encodeDirectPagingLinks' has a Standard Cyclomatic Complexity of 20. 10361109
The method encodeDirectPagingLinks() has an NPath complexity of 648000 10361109
Avoid unused local variables such as 'command'. 1040
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1081
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1100
Parameter 'sheet' is not assigned and could be declared final 1133
Local variable 'reloadBehavior' could be declared final 1134
Parameter 'holder' is not assigned and could be declared final 1155
Local variable 'uiCommand' could be declared final 1172
Avoid instantiating new objects inside loops 1180

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/StyleRenderer.java

Violation Line
Parameter 'event' is not assigned and could be declared final 44

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SubviewRenderer.java

Violation Line
Document empty method 4547

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java

Violation Line
The class 'SuggestRenderer' has a Cyclomatic Complexity of 8 (Highest = 11). 49163
Parameter 'facesContext' is not assigned and could be declared final 54
Parameter 'component' is not assigned and could be declared final 54
Parameter 'facesContext' is not assigned and could be declared final 74
The method 'encodeBegin' has a Cyclomatic Complexity of 11. 74133
Parameter 'component' is not assigned and could be declared final 74
Avoid if (x != y) ..; else ..; 82106
Avoid if (x != y) ..; else ..; 116120
Avoid instantiating new objects inside loops 147

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20303
Possible God class (WMC=47, ATFD=93, TCC=0.0) 20303
The class 'TabGroupRenderer' has a Modified Cyclomatic Complexity of 6 (Highest = 19). 57303
The class 'TabGroupRenderer' has a Standard Cyclomatic Complexity of 6 (Highest = 19). 57303
The class 'TabGroupRenderer' has a Cyclomatic Complexity of 7 (Highest = 22). 57303
The method 'ensureRenderedActiveIndex' has a Modified Cyclomatic Complexity of 10. 121155
The method 'ensureRenderedActiveIndex' has a Cyclomatic Complexity of 10. 121155
The method 'ensureRenderedActiveIndex' has a Standard Cyclomatic Complexity of 10. 121155
Deeply nested if..then statements are hard to read 132134
Avoid if (x != y) ..; else ..; 149153
The method 'encodeHeader' has a Cyclomatic Complexity of 22. 157257
The method 'encodeHeader' has a Standard Cyclomatic Complexity of 19. 157257
Avoid really long methods. 157257
The method encodeHeader() has an NPath complexity of 103686 157257
The method 'encodeHeader' has a Modified Cyclomatic Complexity of 19. 157257
Avoid instantiating new objects inside loops 171
Avoid if (x != y) ..; else ..; 228232
Parameter 'writer' is not assigned and could be declared final 269
Parameter 'facesContext' is not assigned and could be declared final 269
Parameter 'tabGroup' is not assigned and could be declared final 269
Parameter 'activeIndex' is not assigned and could be declared final 270
Parameter 'switchType' is not assigned and could be declared final 270
Parameter 'tab' is not assigned and could be declared final 300
Parameter 'facesContext' is not assigned and could be declared final 300

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java

Violation Line
The class 'TextareaRenderer' has a Standard Cyclomatic Complexity of 8 (Highest = 13). 45137
The class 'TextareaRenderer' has a Modified Cyclomatic Complexity of 8 (Highest = 13). 45137
The class 'TextareaRenderer' has a Cyclomatic Complexity of 8 (Highest = 14). 45137
The method 'encodeBeginField' has a Cyclomatic Complexity of 14. 50130
The method 'encodeBeginField' has a Standard Cyclomatic Complexity of 13. 50130
The method 'encodeBeginField' has a Modified Cyclomatic Complexity of 13. 50130
The method encodeBeginField() has an NPath complexity of 1248 50130
Avoid if (x != y) ..; else ..; 101105
Prefer StringBuffer over += for concatenating strings 122
Prefer StringBuffer over += for concatenating strings 124
Prefer StringBuffer over += for concatenating strings 126
Parameter 'component' is not assigned and could be declared final 133
Parameter 'facesContext' is not assigned and could be declared final 133

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeIconRenderer.java

Violation Line
The class 'TreeIconRenderer' has a Standard Cyclomatic Complexity of 15 (Highest = 14). 40120
The class 'TreeIconRenderer' has a Cyclomatic Complexity of 15 (Highest = 14). 40120
The class 'TreeIconRenderer' has a Modified Cyclomatic Complexity of 15 (Highest = 14). 40120
The method 'encodeBegin' has a Cyclomatic Complexity of 14. 47119
The method encodeBegin() has an NPath complexity of 1296 47119
The method 'encodeBegin' has a Standard Cyclomatic Complexity of 14. 47119
The method 'encodeBegin' has a Modified Cyclomatic Complexity of 14. 47119
Avoid if (x != y) ..; else ..; 6876
Avoid if (x != y) ..; else ..; 6973
Avoid if (x != y) ..; else ..; 7886
Avoid if (x != y) ..; else ..; 7983
Avoid if (x != y) ..; else ..; 9098
Avoid if (x != y) ..; else ..; 9195

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeIndentRenderer.java

Violation Line
Avoid unused method parameters such as 'node'. 83
Avoid unused local variables such as 'blank'. 89
Avoid unused local variables such as 'perpendicular'. 90
Avoid unused local variables such as 'junction'. 93
Avoid long parameter lists. 109112
Avoid unused method parameters such as 'node'. 110
Avoid unused method parameters such as 'facesContext'. 110
Avoid unused method parameters such as 'showLines'. 111
Avoid unused local variables such as 'hasNextSibling'. 117

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeLabelRenderer.java

Violation Line
Avoid unused private fields such as 'LOG'. 42

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeListboxRenderer.java

Violation Line
The method encodeEnd() has an NPath complexity of 250 53141
Avoid if (x != y) ..; else ..; 100
Avoid if (x != y) ..; else ..; 101103
Avoid if (x != y) ..; else ..; 164173
Avoid if (x != y) ..; else ..; 168172

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeNodeRenderer.java

Violation Line
The class 'TreeNodeRenderer' has a Cyclomatic Complexity of 6 (Highest = 11). 52220
Avoid unused local variables such as 'expanded'. 77
Deeply nested if..then statements are hard to read 9092
Avoid if (x != y) ..; else ..; 98108
Avoid unused local variables such as 'markedValue'. 100
The method 'encodeBegin' has a Cyclomatic Complexity of 11. 113170
The method encodeBegin() has an NPath complexity of 217 113170
Parameter 'data' is not assigned and could be declared final 212
Parameter 'showRoot' is not assigned and could be declared final 212
Parameter 'level' is not assigned and could be declared final 212

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeRenderer.java

Violation Line
The class 'TreeRenderer' has a Cyclomatic Complexity of 4 (Highest = 10). 46159
The method encodeEnd() has an NPath complexity of 500 74158
The method 'encodeEnd' has a Cyclomatic Complexity of 10. 74158
Avoid declaring a variable if it is unreferenced before a possible exit point. 78
Avoid appending characters as strings in StringBuffer.append. 117
Avoid appending characters as strings in StringBuffer.append. 122

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java

Violation Line
The class 'TreeSelectRenderer' has a Cyclomatic Complexity of 5 (Highest = 11). 47163
Avoid declaring a variable if it is unreferenced before a possible exit point. 56
The method 'encodeBegin' has a Cyclomatic Complexity of 11. 83153
Avoid if (x != y) ..; else ..; 129133
Do not add empty strings 157
Do not add empty strings 157
Document empty method 161162

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/VerbatimRenderer.java

Violation Line
Avoid declaring a variable if it is unreferenced before a possible exit point. 37

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java

Violation Line
Possible God class (WMC=66, ATFD=69, TCC=0.0) 20351
A high number of imports can indicate a high degree of coupling within an object. 20351
This class has too many methods, consider refactoring it. 62351
The class 'HtmlRendererUtils' has a Modified Cyclomatic Complexity of 3 (Highest = 16). 62351
The class 'HtmlRendererUtils' has a Cyclomatic Complexity of 4 (Highest = 20). 62351
The class 'HtmlRendererUtils' has a Standard Cyclomatic Complexity of 3 (Highest = 16). 62351
Avoid unused private fields such as 'ERROR_FOCUS_KEY'. 65
Parameter 'label' is not assigned and could be declared final 106
Parameter 'image' is not assigned and could be declared final 106
Parameter 'writer' is not assigned and could be declared final 106
Parameter 'label' is not assigned and could be declared final 118
Avoid reassigning parameters such as 'image' 118
Parameter 'writer' is not assigned and could be declared final 118
Parameter 'facesContext' is not assigned and could be declared final 118
Parameter 'disabled' is not assigned and could be declared final 118
Avoid reassigning parameters such as 'title' 170
Avoid reassigning parameters such as 'title' 170
Avoid reassigning parameters such as 'title' 170
Avoid if (x != y) ..; else ..; 200
Avoid if (x != y) ..; else ..; 201
The method renderSelectItems() has an NPath complexity of 9006 204276
The method 'renderSelectItems' has a Standard Cyclomatic Complexity of 16. 204276
The method 'renderSelectItems' has a Modified Cyclomatic Complexity of 16. 204276
The method 'renderSelectItems' has a Cyclomatic Complexity of 20. 204276
Avoid instantiating new objects inside loops 254
The method 'renderCommandFacet' has a Cyclomatic Complexity of 10. 292316
Avoid instantiating new objects inside loops 308
Avoid instantiating new objects inside loops 310

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/util/HttpPartWrapper.java

Violation Line
Document empty constructor 3637
Parameter 'delegate' is not assigned and could be declared final 39
Parameter 'headerName' is not assigned and could be declared final 54
Parameter 'headerName' is not assigned and could be declared final 64
Parameter 'fileName' is not assigned and could be declared final 84
Local variable 'wrapped' could be declared final 89
Local variable 'm' could be declared final 91
Parameter 'context' is not assigned and could be declared final 107
Parameter 'state' is not assigned and could be declared final 112
Document empty method 112113
Parameter 'context' is not assigned and could be declared final 112
Document empty method 121122
Parameter 'newTransientValue' is not assigned and could be declared final 121

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/util/JQueryUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2232
Parameter 'id' is not assigned and could be declared final 24
Parameter 'id' is not assigned and could be declared final 28

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20313
Possible God class (WMC=62, ATFD=50, TCC=0.0) 20313
The class 'RenderUtils' has a Modified Cyclomatic Complexity of 5 (Highest = 11). 54313
The class 'RenderUtils' has a Cyclomatic Complexity of 5 (Highest = 11). 54313
The class 'RenderUtils' has a Standard Cyclomatic Complexity of 5 (Highest = 11). 54313
This class has too many methods, consider refactoring it. 54313
The method 'decodedStateOfTreeData' has a Standard Cyclomatic Complexity of 11. 138189
The method 'decodedStateOfTreeData' has a Cyclomatic Complexity of 11. 138189
The method decodedStateOfTreeData() has an NPath complexity of 330 138189
The method 'decodedStateOfTreeData' has a Modified Cyclomatic Complexity of 11. 138189
Avoid unused local variables such as 'viewHandler'. 210
Avoid declaring a variable if it is unreferenced before a possible exit point. 210
This call to String.startsWith can be rewritten using String.charAt(0) 218
Avoid appending characters as strings in StringBuffer.append. 232
Avoid appending characters as strings in StringBuffer.append. 235
Avoid appending characters as strings in StringBuffer.append. 238
Local variable 'behavior' could be declared final 270
Local variable 'clientBehavior' could be declared final 274
Local variable 'clientBehavior' could be declared final 304

Tobago Theme Standard - org/apache/myfaces/tobago/renderkit/util/SelectItemUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 45282
Avoid instantiation through private constructors from outside of the constructors class. 61
Local variable 'selectItem' could be declared final 80
The class 'SelectItemsIterator' has a Standard Cyclomatic Complexity of 8 (Highest = 19). 87280
The class 'SelectItemsIterator' has a Cyclomatic Complexity of 9 (Highest = 21). 87280
The class 'SelectItemsIterator' has a Modified Cyclomatic Complexity of 8 (Highest = 19). 87280
The method 'hasNext' has a Cyclomatic Complexity of 21. 102194
The method hasNext() has an NPath complexity of 864 102194
The method 'hasNext' has a Standard Cyclomatic Complexity of 19. 102194
The method 'hasNext' has a Modified Cyclomatic Complexity of 19. 102194
Local variable 'tobagoSelectItem' could be declared final 148149
Local variable 'expression' could be declared final 155
Local variable 'entry' could be declared final 186
Avoid instantiating new objects inside loops 187
The method 'next' has a Standard Cyclomatic Complexity of 12. 197274
The method 'next' has a Cyclomatic Complexity of 13. 197274
The method next() has an NPath complexity of 584 197274
The method 'next' has a Modified Cyclomatic Complexity of 12. 197274
Avoid unused local variables such as 'attributeMap'. 213
Avoid if (x != y) ..; else ..; 264268

Tobago Maven2 Theme Plugin - org/apache/myfaces/tobago/maven/plugin/IndexThemeMojo.java

Violation Line
The class 'IndexThemeMojo' has a Cyclomatic Complexity of 5 (Highest = 13). 37147
The class 'IndexThemeMojo' has a Standard Cyclomatic Complexity of 5 (Highest = 12). 37147
The class 'IndexThemeMojo' has a Modified Cyclomatic Complexity of 5 (Highest = 12). 37147
The method 'execute' has a Cyclomatic Complexity of 13. 61119
The method 'execute' has a Standard Cyclomatic Complexity of 12. 61119
The method execute() has an NPath complexity of 768 61119
The method 'execute' has a Modified Cyclomatic Complexity of 12. 61119
Avoid instantiation through private constructors from outside of the constructors class. 77
Avoid if (x != y) ..; else ..; 89118
These nested if statements could be combined 9294
Parameter 'file' is not assigned and could be declared final 121
Private field 'lastModified' could be made final; it is only initialized in the declaration or constructor. 131

Tobago Maven2 Theme Plugin - org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java

Violation Line
The class 'UnPackThemeMojo' has a Modified Cyclomatic Complexity of 11 (Highest = 23). 53230
The class 'UnPackThemeMojo' has a Standard Cyclomatic Complexity of 11 (Highest = 23). 53230
The class 'UnPackThemeMojo' has a Cyclomatic Complexity of 13 (Highest = 28). 53230
Position literals first in String comparisons 97
Position literals first in String comparisons 97
Avoid instantiating new objects inside loops 100
The method 'execute' has a Standard Cyclomatic Complexity of 23. 123216
The method 'execute' has a Modified Cyclomatic Complexity of 23. 123216
The method 'execute' has a Cyclomatic Complexity of 28. 123216
The method execute() has an NPath complexity of 4575 123216
Avoid instantiating new objects inside loops 136
Avoid instantiating new objects inside loops 142
Avoid if (x != y) ..; else ..; 144149
Deeply nested if..then statements are hard to read 147149
Avoid instantiating new objects inside loops 156
Deeply nested if..then statements are hard to read 158177
Avoid instantiating new objects inside loops 166
Avoid instantiating new objects inside loops 168
Deeply nested if..then statements are hard to read 183187
Avoid instantiating new objects inside loops 190
Deeply nested if..then statements are hard to read 192195
Deeply nested if..then statements are hard to read 196198
Avoid instantiating new objects inside loops 199

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/ClassInfo.java

Violation Line
Private field 'className' could be made final; it is only initialized in the declaration or constructor. 27
Private field 'packageName' could be made final; it is only initialized in the declaration or constructor. 28
Private field 'imports' could be made final; it is only initialized in the declaration or constructor. 29
Private field 'interfaces' could be made final; it is only initialized in the declaration or constructor. 31
Private field 'sourceClass' could be made final; it is only initialized in the declaration or constructor. 32
Avoid if (x != y) ..; else ..; 5156
Avoid if (x != y) ..; else ..; 7782

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/ClassUtils.java

Violation Line
A class which only has private constructors should be final 2571

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/ComponentInfo.java

Violation Line
Private field 'nonTransientProperties' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'transientProperties' could be made final; it is only initialized in the declaration or constructor. 31
Avoid using redundant field initializer for 'index' 35
Avoid using redundant field initializer for 'nonTransientIndex' 36
Avoid if (x != y) ..; else ..; 5561

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/Imports.java

Violation Line
Private field 'imports' could be made final; it is only initialized in the declaration or constructor. 28
Document empty constructor 3233
Avoid reassigning parameters such as 'qualifiedName' 39
These nested if statements could be combined 4149
Deeply nested if..then statements are hard to read 4345
Deeply nested if..then statements are hard to read 4648

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/PropertyInfo.java

Violation Line
Possible God class (WMC=54, ATFD=14, TCC=0.08478513356562137) 20262
Document empty constructor 4142
Position literals first in String comparisons 125
Consider using varargs for methods or constructors which take an array the last parameter. 135
Consider using varargs for methods or constructors which take an array the last parameter. 143

Tobago Tool Apt - org/apache/myfaces/tobago/apt/generate/TagInfo.java

Violation Line
Private field 'properties' could be made final; it is only initialized in the declaration or constructor. 27

Tobago Tool Apt - org/apache/myfaces/tobago/apt/processor/AbstractGenerator.java

Violation Line
The class 'AbstractGenerator' has a Modified Cyclomatic Complexity of 2 (Highest = 11). 40125
The class 'AbstractGenerator' has a Cyclomatic Complexity of 2 (Highest = 11). 40125
The class 'AbstractGenerator' has a Standard Cyclomatic Complexity of 2 (Highest = 11). 40125
The method 'process' has a Standard Cyclomatic Complexity of 11. 4695
The method 'process' has a Modified Cyclomatic Complexity of 11. 4695
The method 'process' has a Cyclomatic Complexity of 11. 4695
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 55
These nested if statements could be combined 6769
These nested if statements could be combined 7274
A method/constructor shouldnt explicitly throw java.lang.Exception 99

Tobago Tool Apt - org/apache/myfaces/tobago/apt/processor/CheckstyleConfigGenerator.java

Violation Line
Possible God class (WMC=49, ATFD=53, TCC=0.008333333333333333) 20350
A high number of imports can indicate a high degree of coupling within an object. 20350
The class 'CheckstyleConfigGenerator' has a Cyclomatic Complexity of 3 (Highest = 10). 69350
This class has too many methods, consider refactoring it. 69350
The String literal "name" appears 5 times in this file; the first occurrence is on line 95 95
Avoid if (x != y) ..; else ..; 151158
Avoid if (x != y) ..; else ..; 153158
The method 'addAttributesForTag' has a Cyclomatic Complexity of 10. 194234
Local variable 'attributes' could be declared final 199
Position literals first in String comparisons 228
Parameter 'attributes' is not assigned and could be declared final 330
Parameter 'taglib' is not assigned and could be declared final 330
Parameter 'tagName' is not assigned and could be declared final 330
StringBuffer constructor is initialized with size 16, but has at least 67 characters appended. 331
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 332
Avoid appending characters as strings in StringBuffer.append. 332
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 333
Avoid appending characters as strings in StringBuffer.append. 334
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 334
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 335
Local variable 'attribute' could be declared final 337
Local variable 'attribute' could be declared final 342

Tobago Tool Apt - org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20291
The class 'ClassesGenerator' has a Standard Cyclomatic Complexity of 4 (Highest = 12). 64291
The class 'ClassesGenerator' has a Cyclomatic Complexity of 4 (Highest = 13). 64291
The class 'ClassesGenerator' has a Modified Cyclomatic Complexity of 4 (Highest = 12). 64291
Private field 'renderer' could be made final; it is only initialized in the declaration or constructor. 68
A method/constructor shouldnt explicitly throw java.lang.Exception 93
Position literals first in String comparisons 128
Position literals first in String comparisons 128
The method addProperty() has an NPath complexity of 1403 212261
The method 'addProperty' has a Modified Cyclomatic Complexity of 12. 212261
The method 'addProperty' has a Cyclomatic Complexity of 13. 212261
The method 'addProperty' has a Standard Cyclomatic Complexity of 12. 212261
Deeply nested if..then statements are hard to read 219221
Deeply nested if..then statements are hard to read 224227
Deeply nested if..then statements are hard to read 235237

Tobago Tool Apt - org/apache/myfaces/tobago/apt/processor/FacesConfigGenerator.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20639
Possible God class (WMC=82, ATFD=89, TCC=0.047619047619047616) 20639
This class has too many methods, consider refactoring it. 74639
The class 'FacesConfigGenerator' has a Standard Cyclomatic Complexity of 4 (Highest = 11). 74639
The class 'FacesConfigGenerator' has a Cyclomatic Complexity of 4 (Highest = 11). 74639
The class 'FacesConfigGenerator' has a Modified Cyclomatic Complexity of 4 (Highest = 11). 74639
The method 'generate' has a Standard Cyclomatic Complexity of 11. 145243
The method 'generate' has a Modified Cyclomatic Complexity of 11. 145243
A method/constructor shouldnt explicitly throw java.lang.Exception 145
The method 'generate' has a Cyclomatic Complexity of 11. 145243
The method generate() has an NPath complexity of 241 145243
Avoid if (x != y) ..; else ..; 177183
Avoid if (x != y) ..; else ..; 179183
Avoid unused private methods such as 'getIndexAfter(org.jdom.Element,String)'. 315
These nested if statements could be combined 326330
These nested if statements could be combined 327329
Position literals first in String comparisons 360
Prefer StringBuffer over += for concatenating strings 392
Prefer StringBuffer over += for concatenating strings 518
Avoid instantiating new objects inside loops 563
Avoid instantiating new objects inside loops 566
Avoid instantiating new objects inside loops 570
Avoid instantiating new objects inside loops 573
Avoid instantiating new objects inside loops 574
Prefer StringBuffer over += for concatenating strings 578
A method/constructor shouldnt explicitly throw java.lang.Exception 589
Avoid if (x != y) ..; else ..; 596625

Tobago Tool Apt - org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 20522
Possible God class (WMC=79, ATFD=45, TCC=0.003952569169960474) 20522
This class has too many methods, consider refactoring it. 73522
The class 'TaglibGenerator' has a Standard Cyclomatic Complexity of 3 (Highest = 16). 73522
The class 'TaglibGenerator' has a Cyclomatic Complexity of 3 (Highest = 18). 73522
The class 'TaglibGenerator' has a Modified Cyclomatic Complexity of 3 (Highest = 16). 73522
Prefer StringBuffer over += for concatenating strings 155
Parameter 'functionName' is not assigned and could be declared final 171
Parameter 'document' is not assigned and could be declared final 171
Parameter 'functionClass' is not assigned and could be declared final 171
Parameter 'taglib' is not assigned and could be declared final 171
Parameter 'functionSignature' is not assigned and could be declared final 172
The method 'addDescription' has a Standard Cyclomatic Complexity of 16. 238306
The method 'addDescription' has a Cyclomatic Complexity of 18. 238306
The method addDescription() has an NPath complexity of 20880 238306
The method 'addDescription' has a Modified Cyclomatic Complexity of 16. 238306
StringBuffer constructor is initialized with size 16, but has at least 106 characters appended. 241
Avoid reassigning parameters such as 'string' 308
Avoid reassigning parameters such as 'string' 308
String.indexOf(char) is faster than String.indexOf(String). 316
Avoid unused private methods such as 'getInterfaceDeclaration(String)'. 326
StringBuffer constructor is initialized with size 16, but has at least 65 characters appended. 336
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 337
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 338
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 339
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 339
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 340
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 341
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 345
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. 350
Unnecessary use of fully qualified name 'org.w3c.dom.Element' due to existing import 'org.w3c.dom.Element' 422
Unnecessary use of fully qualified name 'org.w3c.dom.Element' due to existing import 'org.w3c.dom.Element' 428
Unnecessary use of fully qualified name 'org.w3c.dom.Element' due to existing import 'org.w3c.dom.Element' 429
Unnecessary use of fully qualified name 'org.w3c.dom.Element' due to existing import 'org.w3c.dom.Element' 435
Unnecessary use of fully qualified name 'org.w3c.dom.Element' due to existing import 'org.w3c.dom.Element' 436
Avoid if (x != y) ..; else ..; 493519