Apache Commons logo Commons Math

SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.3

Threshold is

Effort is default

Summary

Classes Bugs Errors Missing Classes
823 12 0 0

Files

Class Bugs
org.apache.commons.math4.legacy.linear.MatrixUtils 2
org.apache.commons.math4.legacy.linear.RealVector 1
org.apache.commons.math4.legacy.optim.PointValuePair 1
org.apache.commons.math4.legacy.optim.linear.LinearConstraint 1
org.apache.commons.math4.legacy.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer 2
org.apache.commons.math4.legacy.special.BesselJ 1
org.apache.commons.math4.legacy.stat.Frequency$NaturalComparator 1
org.apache.commons.math4.legacy.stat.descriptive.rank.PSquarePercentile$FixedCapacityList 1
org.apache.commons.math4.legacy.stat.inference.MannWhitneyUTest 1
org.apache.commons.math4.legacy.stat.ranking.NaturalRanking$IntDoublePair 1

org.apache.commons.math4.legacy.linear.MatrixUtils

Bug Category Details Line Priority
Public method org.apache.commons.math4.legacy.linear.MatrixUtils.deserializeRealMatrix(Object, String, ObjectInputStream) uses reflection to modify a field it gets in its parameter which could increase the accessibility of any class. MALICIOUS_CODE REFLF_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_FIELD 799 Medium
Public method org.apache.commons.math4.legacy.linear.MatrixUtils.deserializeRealVector(Object, String, ObjectInputStream) uses reflection to modify a field it gets in its parameter which could increase the accessibility of any class. MALICIOUS_CODE REFLF_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_FIELD 693 Medium

org.apache.commons.math4.legacy.linear.RealVector

Bug Category Details Line Priority
org.apache.commons.math4.legacy.linear.RealVector.equals(Object) is unusual STYLE EQ_UNUSUAL 1099 Medium

org.apache.commons.math4.legacy.optim.PointValuePair

Bug Category Details Line Priority
org.apache.commons.math4.legacy.optim.PointValuePair overrides equals in org.apache.commons.math4.legacy.core.Pair and may not be symmetric CORRECTNESS EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC 82-90 Medium

org.apache.commons.math4.legacy.optim.linear.LinearConstraint

Bug Category Details Line Priority
Test for floating point equality in org.apache.commons.math4.legacy.optim.linear.LinearConstraint.equals(Object) STYLE FE_FLOATING_POINT_EQUALITY 185 High

org.apache.commons.math4.legacy.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer

Bug Category Details Line Priority
Switch statement found in org.apache.commons.math4.legacy.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer.bobyqb(double[], double[]) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 554-563 Medium
Switch statement found in org.apache.commons.math4.legacy.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer.trsbox(double, ArrayRealVector, ArrayRealVector, ArrayRealVector, ArrayRealVector, ArrayRealVector) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 1881-1884 Medium

org.apache.commons.math4.legacy.special.BesselJ

Bug Category Details Line Priority
Integral division result cast to double or float in org.apache.commons.math4.legacy.special.BesselJ.rjBesl(double, double, int) STYLE ICAST_IDIV_CAST_TO_DOUBLE 506 Medium

org.apache.commons.math4.legacy.stat.Frequency$NaturalComparator

Bug Category Details Line Priority
org.apache.commons.math4.legacy.stat.Frequency$NaturalComparator implements Comparator but not Serializable BAD_PRACTICE SE_COMPARATOR_SHOULD_BE_SERIALIZABLE 333-347 Medium

org.apache.commons.math4.legacy.stat.descriptive.rank.PSquarePercentile$FixedCapacityList

Bug Category Details Line Priority
org.apache.commons.math4.legacy.stat.descriptive.rank.PSquarePercentile$FixedCapacityList doesn't override java.util.ArrayList.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.apache.commons.math4.legacy.stat.inference.MannWhitneyUTest

Bug Category Details Line Priority
Integral division result cast to double or float in org.apache.commons.math4.legacy.stat.inference.MannWhitneyUTest.mannWhitneyU(double[], double[]) STYLE ICAST_IDIV_CAST_TO_DOUBLE 146 Medium

org.apache.commons.math4.legacy.stat.ranking.NaturalRanking$IntDoublePair

Bug Category Details Line Priority
org.apache.commons.math4.legacy.stat.ranking.NaturalRanking$IntDoublePair defines compareTo(NaturalRanking$IntDoublePair) and uses Object.equals() BAD_PRACTICE EQ_COMPARETO_USE_OBJECT_EQUALS 457 Medium