FindBugs Report

Project Information

Project:

FindBugs version: 2.0.1-rc3

Code analyzed:



Metrics

91274 lines of code analyzed, in 873 classes, in 15 packages.

Metric Total Density*
High Priority Warnings 1 0.01
Medium Priority Warnings 24 0.26
Total Warnings 25 0.27

(* Defects per Thousand lines of non-commenting source statements)



Contents

Summary

Warning Type Number
Bad practice Warnings 17
Correctness Warnings 1
Malicious code vulnerability Warnings 1
Performance Warnings 2
Dodgy code Warnings 4
Total 25

Warnings

Click on a warning row to see full context information.

Bad practice Warnings

Code Warning
Nm The class name edu.jas.application.FactorFactory shadows the simple name of the superclass edu.jas.ufd.FactorFactory
RV edu.jas.poly.PolynomialComparator.compare(GenPolynomial, GenPolynomial) negates the return value of edu.jas.poly.GenPolynomial.compareTo(GenPolynomial)
RV edu.jas.poly.TermOrder$69.compare(ExpVector, ExpVector) negates the return value of edu.jas.poly.TermOrder$EVComparator.compare(ExpVector, ExpVector)
RV edu.jas.poly.TermOrder$9.compare(ExpVector, ExpVector) negates the return value of edu.jas.poly.TermOrder$EVComparator.compare(ExpVector, ExpVector)
RV edu.jas.poly.Word.gradInvlexCompareTo(Word) negates the return value of edu.jas.poly.Word.compareTo(Word)
SnVI edu.jas.gb.GBProxy is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseDistributed is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseDistributedEC is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseDistributedHybrid is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseDistributedHybridEC is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseParallel is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseSeqPairDistributed is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.GroebnerBaseSeqPairParallel is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.SolvableGroebnerBaseParallel is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gb.SolvableGroebnerBaseSeqPairParallel is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.gbufd.GroebnerBasePseudoParallel is Serializable; consider declaring a serialVersionUID
SnVI edu.jas.ufd.GCDProxy is Serializable; consider declaring a serialVersionUID

Correctness Warnings

Code Warning
SA Self comparison of $L0 with itself edu.jas.ps.Examples.example11()

Malicious code vulnerability Warnings

Code Warning
MS edu.jas.kern.ComputerThreads.NO_THREADS isn't final and can't be protected from malicious code

Performance Warnings

Code Warning
WMI edu.jas.gb.OrderedSyzPairlist.put(GenPolynomial) makes inefficient use of keySet iterator instead of entrySet iterator
WMI edu.jas.poly.RelationTable.equalMaps(Map, Map) makes inefficient use of keySet iterator instead of entrySet iterator

Dodgy code Warnings

Code Warning
DB edu.jas.application.RingFactoryTokenizer.nextCoefficientRing() uses the same code for two branches
DB edu.jas.poly.GenPolynomialTokenizer.nextCoefficientRing() uses the same code for two branches
DLS Dead store to $L10 in edu.jas.ufd.GreatestCommonDivisorHensel.recursiveUnivariateGcd(GenPolynomial, GenPolynomial)
SF Switch statement found in edu.jas.poly.GenPolynomialTokenizer.nextPolynomial() where one case falls through to the next case

Details

DB_DUPLICATE_BRANCHES: Method uses the same code for two branches

This method uses the same code to implement two branches of a conditional branch. Check to ensure that this isn't a coding mistake.

DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

MS_CANNOT_BE_FINAL: Field isn't final and can't be protected from malicious code

A mutable static field could be changed by malicious code or by accident from another package. Unfortunately, the way the field is used doesn't allow any easy fix to this problem.

NM_SAME_SIMPLE_NAME_AS_SUPERCLASS: Class names shouldn't shadow simple name of superclass

This class has a simple name that is identical to that of its superclass, except that its superclass is in a different package (e.g., alpha.Foo extends beta.Foo). This can be exceptionally confusing, create lots of situations in which you have to look at import statements to resolve references and creates many opportunities to accidently define methods that do not override methods in their superclasses.

RV_NEGATING_RESULT_OF_COMPARETO: Negating the result of compareTo()/compare()

This code negatives the return value of a compareTo or compare method. This is a questionable or bad programming practice, since if the return value is Integer.MIN_VALUE, negating the return value won't negate the sign of the result. You can achieve the same intended result by reversing the order of the operands rather than by negating the results.

SA_LOCAL_SELF_COMPARISON: Self comparison of value with itself

This method compares a local variable with itself, and may indicate a typo or a logic error. Make sure that you are comparing the right things.

SF_SWITCH_FALLTHROUGH: Switch statement found where one case falls through to the next case

This method contains a switch statement where one case branch will fall through to the next case. Usually you need to end this case with a break or return.

SE_NO_SERIALVERSIONID: Class is Serializable, but doesn't define serialVersionUID

This class implements the Serializable interface, but does not define a serialVersionUID field.  A change as simple as adding a reference to a .class object will add synthetic fields to the class, which will unfortunately change the implicit serialVersionUID (e.g., adding a reference to String.class will generate a static field class$java$lang$String). Also, different source code to bytecode compilers may use different naming conventions for synthetic variables generated for references to class objects or inner classes. To ensure interoperability of Serializable across versions, consider adding an explicit serialVersionUID.

WMI_WRONG_MAP_ITERATOR: Inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.