PMD Results

The following document contains the results of PMD 4.2.5.

Files

org/apache/myfaces/tobago/maven/plugin/AbstractThemeMojo.java

ViolationLine
Parameter 'sourceDir' is not assigned and could be declared final52
Local variable 'scanner' could be declared final53

org/apache/myfaces/tobago/maven/plugin/IndexThemeMojo.java

ViolationLine
The class 'IndexThemeMojo' has a Cyclomatic Complexity of 7 (Highest = 12).37 - 135
The class 'IndexThemeMojo' has a Cyclomatic Complexity of 7 (Highest = 12).37 - 135
The method 'execute' has a Cyclomatic Complexity of 12.58 - 112
The method execute() has an NPath complexity of 62458 - 112
The method 'execute' has a Cyclomatic Complexity of 12.58 - 112
Avoid instantiation through private constructors from outside of the constructor's class.74
Local variable 'scanner' could be declared final74
Local variable 'fileNames' could be declared final80
Avoid if (x != y) ..; else ..;86 - 111
Local variable 'metaInf' could be declared final87
These nested if statements could be combined89 - 91
These nested if statements could be combined89 - 91
Local variable 'stringWriter' could be declared final95
Private field 'lastModified' could be made final; it is only initialized in the declaration or constructor.119
Parameter 'lastModified' is not assigned and could be declared final122
Parameter 'file' is not assigned and could be declared final127
Parameter 'name' is not assigned and could be declared final127
Local variable 'lastModified' could be declared final128

org/apache/myfaces/tobago/maven/plugin/UnPackThemeMojo.java

ViolationLine
The class 'UnPackThemeMojo' has a Cyclomatic Complexity of 13 (Highest = 28).53 - 231
The class 'UnPackThemeMojo' has a Cyclomatic Complexity of 13 (Highest = 28).53 - 231
Parameter 'jarFile' is not assigned and could be declared final86
The method 'getThemeDescriptor' has a Cyclomatic Complexity of 9.86 - 121
Local variable 'files' could be declared final90
Local variable 'nextEntry' could be declared final92
Local variable 'name' could be declared final96
Position literals first in String comparisons97
Position literals first in String comparisons97
Local variable 'stringWriter' could be declared final100
Avoid instantiating new objects inside loops100
Avoid empty catch blocks115 - 117
Avoid empty catch blocks115 - 117
The method 'execute' has a Cyclomatic Complexity of 28.123 - 217
The method execute() has an NPath complexity of 4575123 - 217
The method 'execute' has a Cyclomatic Complexity of 28.123 - 217
Local variable 'artifacts' could be declared final125
Local variable 'artifact' could be declared final131
Local variable 'file' could be declared final136
Avoid instantiating new objects inside loops136
Local variable 'descriptor' could be declared final138
Local variable 'name' could be declared final141
Local variable 'tempLocation' could be declared final142
Avoid instantiating new objects inside loops142
Avoid if (x != y) ..; else ..;144 - 149
Deeply nested if..then statements are hard to read147 - 149
Local variable 'xpp3Dom' could be declared final156
Avoid instantiating new objects inside loops156
Local variable 'themeDefinitions' could be declared final157
Deeply nested if..then statements are hard to read158 - 177
Local variable 'versionedDom' could be declared final160
Local variable 'versioned' could be declared final162
Local variable 'resourcePathDom' could be declared final164
Local variable 'properties' could be declared final166
Avoid instantiating new objects inside loops166
Local variable 'metaInf' could be declared final167
Avoid instantiating new objects inside loops168
Deeply nested if..then statements are hard to read183 - 187
Local variable 'fileNames' could be declared final188
Local variable 'fileNamesLength' could be declared final189
Local variable 'fileName' could be declared final190
Local variable 'fromFile' could be declared final191
Avoid instantiating new objects inside loops191
Deeply nested if..then statements are hard to read193 - 196
Deeply nested if..then statements are hard to read197 - 199
Local variable 'toFile' could be declared final200
Avoid instantiating new objects inside loops200
Parameter 'location' is not assigned and could be declared final219
Parameter 'file' is not assigned and could be declared final219
Local variable 'archiveExt' could be declared final221
Local variable 'unArchiver' could be declared final223