SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.8.3

Threshold is medium

Effort is max

Summary

Classes Bugs Errors Missing Classes
73 111 0 3

Files

Class Bugs
amd.Quantize$Cube 1
org.carrot2.labs.smartsprites.SmartSpritesParameters 4
org.carrot2.labs.smartsprites.SmartSpritesParametersTest 1
org.carrot2.labs.smartsprites.SpriteBuilder 7
org.carrot2.labs.smartsprites.SpriteBuilderTest 32
org.carrot2.labs.smartsprites.SpriteDirectiveOccurrenceCollector 1
org.carrot2.labs.smartsprites.SpriteImage 2
org.carrot2.labs.smartsprites.SpriteImageBuilder 9
org.carrot2.labs.smartsprites.SpriteImageDirective 2
org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageFormat 1
org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageLayout 1
org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteUidType 1
org.carrot2.labs.smartsprites.SpriteLayoutProperties 7
org.carrot2.labs.smartsprites.SpriteLayoutProperties$SpriteAlignment 1
org.carrot2.labs.smartsprites.SpriteReferenceOccurrence 16
org.carrot2.labs.smartsprites.ant.SmartSpritesTask$FailureDetectorMessageSink 1
org.carrot2.labs.smartsprites.css.CssSyntaxUtils 2
org.carrot2.labs.smartsprites.message.LevelCounterMessageSink 2
org.carrot2.labs.smartsprites.message.Message 1
org.carrot2.labs.smartsprites.message.PrintStreamMessageSink 1
org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler 6
org.carrot2.labs.test.Assertions 2
org.carrot2.labs.test.BufferedImageAssertion 1
org.carrot2.labs.test.CssPropertyListAssertion 1
org.carrot2.labs.test.MessageListAssertion 3
org.carrot2.util.CollectionUtils 1
org.carrot2.util.FileUtils 2
org.carrot2.util.PathUtils 2

amd.Quantize$Cube

Bug Category Details Line Priority
Method amd.Quantize$Cube.classification() uses a Side Effect Constructor STYLE SEC_SIDE_EFFECT_CONSTRUCTOR 443 Medium

org.carrot2.labs.smartsprites.SmartSpritesParameters

Bug Category Details Line Priority
org.carrot2.labs.smartsprites.SmartSpritesParameters.getCssFiles() may expose internal representation by returning SmartSpritesParameters.cssFiles MALICIOUS_CODE EI_EXPOSE_REP 358 Medium
new org.carrot2.labs.smartsprites.SmartSpritesParameters(String, List, String, String, Message$MessageLevel, String, SmartSpritesParameters$PngDepth, String, boolean) may expose internal representation by storing an externally mutable object into SmartSpritesParameters.cssFiles MALICIOUS_CODE EI_EXPOSE_REP2 229 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 340 Medium

org.carrot2.labs.smartsprites.SmartSpritesParametersTest

Bug Category Details Line Priority
This API (java/io/File.<init>(Ljava/lang/String;Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 278 Medium

org.carrot2.labs.smartsprites.SpriteBuilder

Bug Category Details Line Priority
new org.carrot2.labs.smartsprites.SpriteBuilder(SmartSpritesParameters, MessageLog, ResourceHandler) may expose internal representation by storing an externally mutable object into SpriteBuilder.messageLog MALICIOUS_CODE EI_EXPOSE_REP2 115 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 146 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 184 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilder.buildSprites() does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 165 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilder.buildSprites(Collection) does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 216 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilder.createProcessedCss(String, Map, Map) passes constant String of length 1 to character overridden method PERFORMANCE UCPM_USE_CHARACTER_PARAMETERIZED_METHOD 343 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilder.createProcessedCss(String, Map, Map) passes constant String of length 1 to character overridden method PERFORMANCE UCPM_USE_CHARACTER_PARAMETERIZED_METHOD 344 Medium

org.carrot2.labs.smartsprites.SpriteBuilderTest

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testAbsoluteImageUrl() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 349-362 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testCssFileApiInvocation() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 891-906 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testCssOutputDir() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 467-484 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testCssSubfolders() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 867-878 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testFractionalScaledSpriteImage() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 434-455 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testIndexedColor() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 515-528 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testIndexedForcedDirectColor() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 540-555 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testIndexedForcedIndexedColor() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 567-588 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testLargeRepeat() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 224-236 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testLayoutPropertiesFromSpriteImageDirective() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 185-192 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testMatteColor() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 600-625 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testMatteColorForcedIndex() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 637-666 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testMissingImages() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 248-264 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testMultipleCssFiles() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 204-212 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testNoSpriteDeclarations() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 92-98 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testNoSpriteReferences() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 110-115 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testNonDefaultOutputDir() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 374-395 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testOverridingCssProperties() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 324-337 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testRepeatedImageReferences() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 496-503 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testScaledSpriteImage() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 407-422 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testSimpleHorizontalSprite() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 147-154 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testSimpleHorizontalSpriteImportant() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 166-173 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testSpriteCentering() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 843-855 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testSpriteImageUidSha512() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 678-690 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testSpriteMargins() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 819-831 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testTargetSpriteImageDirNotExists() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 127-135 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testUnsupportedIndividualImageFormat() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 276-285 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.testUnsupportedSpriteProperties() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 297-312 Medium
Method org.carrot2.labs.smartsprites.SpriteBuilderTest.variableSubstitutionInSpriteImagePath() declares throwing two or more exceptions related by inheritance CORRECTNESS BED_HIERARCHICAL_EXCEPTION_DECLARATION 703-720 Medium
This API (java/io/File.<init>(Ljava/lang/String;Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 926 Medium
This API (java/io/File.<init>(Ljava/lang/String;Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 930 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 1026 Medium

org.carrot2.labs.smartsprites.SpriteDirectiveOccurrenceCollector

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteDirectiveOccurrenceCollector.extractSpriteReferenceCssProperty(String) makes literal string comparisons passing the literal as an argument STYLE LSC_LITERAL_STRING_COMPARISON 342 High

org.carrot2.labs.smartsprites.SpriteImage

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImage.resolveImagePath(byte[], String) concatenates the result of a toString() call CORRECTNESS ISB_TOSTRING_APPENDING 143 Medium
Primitive field org.carrot2.labs.smartsprites.SpriteImage.resolvedPath is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. BAD_PRACTICE PA_PUBLIC_PRIMITIVE_ATTRIBUTE 159 Medium

org.carrot2.labs.smartsprites.SpriteImageBuilder

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.buildSpriteImage(SpriteImageOccurrence, Map, MessageLog) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 298 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.calculateLeastCommonMultiple(Map, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 388 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.calculateLeastCommonMultiple(Map, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 389 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.writeSprite(SpriteImage, BufferedImage) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 221 Medium
Load of known null value in org.carrot2.labs.smartsprites.SpriteImageBuilder.buildSpriteReplacements(SpriteImageOccurrence, Collection) STYLE NP_LOAD_OF_KNOWN_NULL_VALUE 179 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.buildSpriteImage(SpriteImageOccurrence, Map, MessageLog) does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 341 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.getSpriteImageOccurrencesByLineNumber(Collection) does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 433 Medium
Method org.carrot2.labs.smartsprites.SpriteImageBuilder.getSpriteReplacementsByLineNumber(Collection) does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 414 Medium
Redundant nullcheck of is which is known to be null in org.carrot2.labs.smartsprites.SpriteImageBuilder.buildSpriteReplacements(SpriteImageOccurrence, Collection) STYLE RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE 179 Medium

org.carrot2.labs.smartsprites.SpriteImageDirective

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImageDirective.parse(String, MessageLog) appears to call the same method on the same object redundantly PERFORMANCE PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS 383 Medium
The regular expression "([^${}]*|\\$\\{[^}]*\\})*" is vulnerable to a denial of service attack (ReDOS) SECURITY REDOS 268 Medium

org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageFormat

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageFormat.valuesAsString() performs algorithmic operations on the result of a toString() call CORRECTNESS ITU_INAPPROPRIATE_TOSTRING_USE 220 Medium

org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageLayout

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteImageLayout.valuesAsString() performs algorithmic operations on the result of a toString() call CORRECTNESS ITU_INAPPROPRIATE_TOSTRING_USE 121 Medium

org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteUidType

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteImageDirective$SpriteUidType.valuesAsString() performs algorithmic operations on the result of a toString() call CORRECTNESS ITU_INAPPROPRIATE_TOSTRING_USE 170 Medium

org.carrot2.labs.smartsprites.SpriteLayoutProperties

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteLayoutProperties.correctAlignment(SpriteImageDirective$SpriteImageLayout, SpriteLayoutProperties$SpriteAlignment, MessageLog) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 278 Medium
Method org.carrot2.labs.smartsprites.SpriteLayoutProperties.correctAlignment(SpriteImageDirective$SpriteImageLayout, SpriteLayoutProperties$SpriteAlignment, MessageLog) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 279 Medium
Method org.carrot2.labs.smartsprites.SpriteLayoutProperties.correctAlignment(SpriteImageDirective$SpriteImageLayout, SpriteLayoutProperties$SpriteAlignment, MessageLog) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 283 Medium
Method org.carrot2.labs.smartsprites.SpriteLayoutProperties.getDefaultAlignment(SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 300 Medium
This method org.carrot2.labs.smartsprites.SpriteLayoutProperties.getMargin(String, Map, int, MessageLog) parses a String that is a field STYLE STT_STRING_PARSING_A_FIELD 328 Medium

org.carrot2.labs.smartsprites.SpriteLayoutProperties$SpriteAlignment

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteLayoutProperties$SpriteAlignment.valuesAsString() performs algorithmic operations on the result of a toString() call CORRECTNESS ITU_INAPPROPRIATE_TOSTRING_USE 144 Medium

org.carrot2.labs.smartsprites.SpriteReferenceOccurrence

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.buildReplacement(SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 196 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.buildReplacement(SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 198 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.buildReplacement(SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 200 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.buildReplacement(SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 209 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.buildReplacement(SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 211 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.getRequiredHeight(BufferedImage, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 113 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.getRequiredHeight(BufferedImage, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 114 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.getRequiredWidth(BufferedImage, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 92 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.getRequiredWidth(BufferedImage, SpriteImageDirective$SpriteImageLayout) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 93 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 137 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 140 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 144 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 148 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 161 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 165 Medium
Method org.carrot2.labs.smartsprites.SpriteReferenceOccurrence.render(BufferedImage, SpriteImageDirective$SpriteImageLayout, int) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 169 Medium

org.carrot2.labs.smartsprites.ant.SmartSpritesTask$FailureDetectorMessageSink

Bug Category Details Line Priority
Method new org.carrot2.labs.smartsprites.ant.SmartSpritesTask$FailureDetectorMessageSink(SmartSpritesTask) sets an enum reference to null CORRECTNESS ENMI_NULL_ENUM_VALUE 244 Medium

org.carrot2.labs.smartsprites.css.CssSyntaxUtils

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.css.CssSyntaxUtils.hasNonBlankValue(Map, String) checks a map with containsKey(), before using get() CORRECTNESS MUI_CONTAINSKEY_BEFORE_GET 169 Medium
Method org.carrot2.labs.smartsprites.css.CssSyntaxUtils.propertiesAsMap(Collection) does not presize the allocation of a collection PERFORMANCE PSC_PRESIZE_COLLECTIONS 134 Medium

org.carrot2.labs.smartsprites.message.LevelCounterMessageSink

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.message.LevelCounterMessageSink.add(Message) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 54 Medium
Method org.carrot2.labs.smartsprites.message.LevelCounterMessageSink.add(Message) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 58 Medium

org.carrot2.labs.smartsprites.message.Message

Bug Category Details Line Priority
Method org.carrot2.labs.smartsprites.message.Message.toString() passes constant String of length 1 to character overridden method PERFORMANCE UCPM_USE_CHARACTER_PARAMETERIZED_METHOD 428 Medium

org.carrot2.labs.smartsprites.message.PrintStreamMessageSink

Bug Category Details Line Priority
new org.carrot2.labs.smartsprites.message.PrintStreamMessageSink(PrintStream, Message$MessageLevel) may expose internal representation by storing an externally mutable object into PrintStreamMessageSink.printStream MALICIOUS_CODE EI_EXPOSE_REP2 75 Medium

org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler

Bug Category Details Line Priority
new org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler(String, String, MessageLog) may expose internal representation by storing an externally mutable object into FileSystemResourceHandler.messageLog MALICIOUS_CODE EI_EXPOSE_REP2 89 Medium
Constrained method org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsReader(String) converts checked exception to unchecked instead of another allowable checked exception STYLE EXS_EXCEPTION_SOFTENING_HAS_CHECKED 104 Medium
Constrained method org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsWriter(String) converts checked exception to unchecked instead of another allowable checked exception STYLE EXS_EXCEPTION_SOFTENING_HAS_CHECKED 124 Medium
Method org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsInputStream(String) uses a FileInputStream or FileOutputStream constructor PERFORMANCE IOI_USE_OF_FILE_STREAM_CONSTRUCTORS 95 Medium
Method org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsOutputStream(String) uses a FileInputStream or FileOutputStream constructor PERFORMANCE IOI_USE_OF_FILE_STREAM_CONSTRUCTORS 115 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 111 Medium

org.carrot2.labs.test.Assertions

Bug Category Details Line Priority
Class org.carrot2.labs.test.Assertions has a circular dependency with other classes CORRECTNESS FCCD_FIND_CLASS_CIRCULAR_DEPENDENCY 48-107 Medium
Class org.carrot2.labs.test.Assertions has a circular dependency with other classes CORRECTNESS FCCD_FIND_CLASS_CIRCULAR_DEPENDENCY 48-107 Medium

org.carrot2.labs.test.BufferedImageAssertion

Bug Category Details Line Priority
new org.carrot2.labs.test.BufferedImageAssertion(BufferedImage) may expose internal representation by storing an externally mutable object into BufferedImageAssertion.actual MALICIOUS_CODE EI_EXPOSE_REP2 65 Medium

org.carrot2.labs.test.CssPropertyListAssertion

Bug Category Details Line Priority
new org.carrot2.labs.test.CssPropertyListAssertion(List) may expose internal representation by storing an externally mutable object into CssPropertyListAssertion.actual MALICIOUS_CODE EI_EXPOSE_REP2 64 Medium

org.carrot2.labs.test.MessageListAssertion

Bug Category Details Line Priority
new org.carrot2.labs.test.MessageListAssertion(List) may expose internal representation by storing an externally mutable object into MessageListAssertion.actual MALICIOUS_CODE EI_EXPOSE_REP2 67 Medium
Method org.carrot2.labs.test.MessageListAssertion.doesNotHaveMessagesOfLevel(Message$MessageLevel) calls equals on an enum instance CORRECTNESS ENMI_EQUALS_ON_ENUM 183 Medium
Method org.carrot2.labs.test.MessageListAssertion.doesNotHaveMessagesOfLevel(Message$MessageLevel) concatenates the result of a toString() call CORRECTNESS ISB_TOSTRING_APPENDING 189 Medium

org.carrot2.util.CollectionUtils

Bug Category Details Line Priority
Method org.carrot2.util.CollectionUtils.toString(Collection) concatenates the result of a toString() call CORRECTNESS ISB_TOSTRING_APPENDING 64 Medium

org.carrot2.util.FileUtils

Bug Category Details Line Priority
Method org.carrot2.util.FileUtils.deleteThrowingExceptions(File[]) concatenates the result of a toString() call CORRECTNESS ISB_TOSTRING_APPENDING 147 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 68 Medium

org.carrot2.util.PathUtils

Bug Category Details Line Priority
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 94 Medium
This API (java/io/File.<init>(Ljava/lang/String;)V) reads a file whose location might be specified by user input SECURITY PATH_TRAVERSAL_IN 95 Medium