Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.5.0.

Violations By Priority

Priority 5

org/basepom/mojo/duplicatefinder/DuplicateFinderMojo.java

Rule Violation Line
TooManyFields Too many fields 87652
NcssCount The method 'execute()' has a NCSS line count of 72. 283
CognitiveComplexity The method 'execute()' has a cognitive complexity of 90, current threshold is 15 283
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 33. 283
NPathComplexity The method 'execute()' has an NPath complexity of 80259, current threshold is 200 283
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DuplicateFinderMojo': 'determineConflictState' is already in scope 480
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'CLASS' is already in scope because it is imported in this file 493
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictState': 'CONFLICT_CONTENT_DIFFERENT' is already in scope because it is imported in this file 505
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictState': 'CONFLICT_CONTENT_EQUAL' is already in scope because it is imported in this file 512
CloseResource Ensure that resources like this ZipFile object are closed after use 532
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'CLASS' is already in scope because it is imported in this file 563
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'RESOURCE' is already in scope because it is imported in this file 565
CyclomaticComplexity The method 'writeResultFile(File, ImmutableMap<String, Entry<ResultCollector, ClasspathDescriptor>>)' has a cyclomatic complexity of 10. 572
CollapsibleIfStatements This if statement could be combined with its parent 576578

org/basepom/mojo/duplicatefinder/ResultCollector.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ResultCollector': 'buildConflictName' is already in scope 123

org/basepom/mojo/duplicatefinder/artifact/ArtifactFileResolver.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ArtifactFileResolver': 'canonicalizeArtifact' is already in scope 92
CollapsibleIfStatements This if statement could be combined with its parent 141145
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 166
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 173
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 180

org/basepom/mojo/duplicatefinder/artifact/MavenCoordinates.java

Rule Violation Line
CyclomaticComplexity The method 'matches(MavenCoordinates)' has a cyclomatic complexity of 12. 121
NPathComplexity The method 'matches(MavenCoordinates)' has an NPath complexity of 360, current threshold is 200 121
CollapsibleIfStatements This if statement could be combined with its parent 131133

org/basepom/mojo/duplicatefinder/classpath/ClasspathDescriptor.java

Rule Violation Line
CyclomaticComplexity The method 'createClasspathDescriptor(MavenProject, Multimap<File, Artifact>, Collection<String>, Collection<String>, Collection<MavenCoordinates>, boolean, boolean, File[])' has a cyclomatic complexity of 10. 107
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'pse' on all code paths 198
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'pse' on all code paths 223
CognitiveComplexity The method 'addDirectory(Builder, File, PackageNameHolder)' has a cognitive complexity of 19, current threshold is 15 280
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 321

Files

org/basepom/mojo/duplicatefinder/DuplicateFinderMojo.java

Rule Violation Priority Line
TooManyFields Too many fields 5 87652
NcssCount The method 'execute()' has a NCSS line count of 72. 5 283
CognitiveComplexity The method 'execute()' has a cognitive complexity of 90, current threshold is 15 5 283
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 33. 5 283
NPathComplexity The method 'execute()' has an NPath complexity of 80259, current threshold is 200 5 283
UnnecessaryFullyQualifiedName Unnecessary qualifier 'DuplicateFinderMojo': 'determineConflictState' is already in scope 5 480
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'CLASS' is already in scope because it is imported in this file 5 493
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictState': 'CONFLICT_CONTENT_DIFFERENT' is already in scope because it is imported in this file 5 505
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictState': 'CONFLICT_CONTENT_EQUAL' is already in scope because it is imported in this file 5 512
CloseResource Ensure that resources like this ZipFile object are closed after use 5 532
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'CLASS' is already in scope because it is imported in this file 5 563
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ConflictType': 'RESOURCE' is already in scope because it is imported in this file 5 565
CyclomaticComplexity The method 'writeResultFile(File, ImmutableMap<String, Entry<ResultCollector, ClasspathDescriptor>>)' has a cyclomatic complexity of 10. 5 572
CollapsibleIfStatements This if statement could be combined with its parent 5 576578

org/basepom/mojo/duplicatefinder/ResultCollector.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ResultCollector': 'buildConflictName' is already in scope 5 123

org/basepom/mojo/duplicatefinder/artifact/ArtifactFileResolver.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'ArtifactFileResolver': 'canonicalizeArtifact' is already in scope 5 92
CollapsibleIfStatements This if statement could be combined with its parent 5 141145
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 5 166
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 5 173
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 5 180

org/basepom/mojo/duplicatefinder/artifact/MavenCoordinates.java

Rule Violation Priority Line
CyclomaticComplexity The method 'matches(MavenCoordinates)' has a cyclomatic complexity of 12. 5 121
NPathComplexity The method 'matches(MavenCoordinates)' has an NPath complexity of 360, current threshold is 200 5 121
CollapsibleIfStatements This if statement could be combined with its parent 5 131133

org/basepom/mojo/duplicatefinder/classpath/ClasspathDescriptor.java

Rule Violation Priority Line
CyclomaticComplexity The method 'createClasspathDescriptor(MavenProject, Multimap<File, Artifact>, Collection<String>, Collection<String>, Collection<MavenCoordinates>, boolean, boolean, File[])' has a cyclomatic complexity of 10. 5 107
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'pse' on all code paths 5 198
PreserveStackTrace Thrown exception does not preserve the stack trace of exception 'pse' on all code paths 5 223
CognitiveComplexity The method 'addDirectory(Builder, File, PackageNameHolder)' has a cognitive complexity of 19, current threshold is 15 5 280
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 5 321

Suppressed Violations

Filename Rule message Suppression type Reason
org/basepom/mojo/duplicatefinder/ConflictingDependency.java Returning 'matchingResources' may expose an internal array. @suppresswarnings