Add static private serialVersionUID fields to Serializable classes
We already have plenty of examples of Serializable classes with this field, and the vast majority of those fields have generated IDs rather than "1L". From this I infer that using proper serialVersionUID fields is considered appropriate WALA coding style.
This commit is contained in:
parent
f76b79b067
commit
d6ce679a72
|
@ -60,7 +60,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -433,6 +433,8 @@ public class FlowGraph implements Iterable<Vertex> {
|
|||
final PointerAnalysis<ObjectVertex> pa = this;
|
||||
class FieldBasedHeapGraph extends SlowSparseNumberedGraph<Object> implements HeapGraph<ObjectVertex> {
|
||||
|
||||
private static final long serialVersionUID = -3544629644808422215L;
|
||||
|
||||
private <X> X ensureNode(X n) {
|
||||
if (!containsNode(n)) {
|
||||
addNode(n);
|
||||
|
|
|
@ -61,7 +61,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -34,6 +34,7 @@ public interface TranslatorToCAst {
|
|||
public <C extends RewriteContext<K>, K extends CopyKey<K>> void addRewriter(CAstRewriterFactory<C, K> factory, boolean prepend);
|
||||
|
||||
public class Error extends WalaException {
|
||||
private static final long serialVersionUID = -8440950320425119751L;
|
||||
public final Set<Warning> warning;
|
||||
|
||||
public Error(Set<Warning> message) {
|
||||
|
|
|
@ -39,6 +39,7 @@ public class CAstFunctions {
|
|||
public static Iterator<CAstNode> iterateNodes(final CAstNode tree) {
|
||||
return new DFSDiscoverTimeIterator<CAstNode>() {
|
||||
|
||||
private static final long serialVersionUID = -627203481092871529L;
|
||||
private final Map<Object, Iterator<? extends CAstNode>> pendingChildren = HashMapFactory.make();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,6 +59,8 @@ public class CAstPattern {
|
|||
|
||||
public static class Segments extends TreeMap<String,Object> {
|
||||
|
||||
private static final long serialVersionUID = 4119719848336209576L;
|
||||
|
||||
public CAstNode getSingle(String name) {
|
||||
assert containsKey(name) : name;
|
||||
return (CAstNode) get(name);
|
||||
|
|
|
@ -60,7 +60,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -74,6 +74,8 @@ public class ContextSensitiveReachingDefs {
|
|||
private class ReachingDefsDomain extends MutableMapping<Pair<CGNode, Integer>> implements
|
||||
TabulationDomain<Pair<CGNode, Integer>, BasicBlockInContext<IExplodedBasicBlock>> {
|
||||
|
||||
private static final long serialVersionUID = 4014252274660361965L;
|
||||
|
||||
@Override
|
||||
public boolean hasPriorityOver(PathEdge<BasicBlockInContext<IExplodedBasicBlock>> p1,
|
||||
PathEdge<BasicBlockInContext<IExplodedBasicBlock>> p2) {
|
||||
|
|
|
@ -78,6 +78,8 @@ public class StaticInitializer {
|
|||
private class InitializerDomain extends MutableMapping<IClass> implements
|
||||
TabulationDomain<IClass, BasicBlockInContext<IExplodedBasicBlock>> {
|
||||
|
||||
private static final long serialVersionUID = -1897766113586243833L;
|
||||
|
||||
@Override
|
||||
public boolean hasPriorityOver(PathEdge<BasicBlockInContext<IExplodedBasicBlock>> p1,
|
||||
PathEdge<BasicBlockInContext<IExplodedBasicBlock>> p2) {
|
||||
|
|
|
@ -70,7 +70,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.ibm.wala.util.CancelException;
|
|||
*/
|
||||
public class TabulationCancelException extends CancelException {
|
||||
|
||||
private static final long serialVersionUID = 4073189707860241945L;
|
||||
private final Result result;
|
||||
|
||||
protected TabulationCancelException(Exception cause, Result r) {
|
||||
|
|
|
@ -17,6 +17,8 @@ import com.ibm.wala.util.intset.MutableMapping;
|
|||
*/
|
||||
public class UnorderedDomain<T, U> extends MutableMapping<T> implements TabulationDomain<T, U> {
|
||||
|
||||
private static final long serialVersionUID = -988075488958891635L;
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.dataflow.IFDS.TabulationDomain#isWeakerThan(int, int)
|
||||
*/
|
||||
|
|
|
@ -49,4 +49,6 @@ package com.ibm.wala.demandpa.alg.statemachine;
|
|||
*/
|
||||
public class StatesMergedException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 7769961571949421524L;
|
||||
|
||||
}
|
||||
|
|
|
@ -95,6 +95,8 @@ import com.ibm.wala.util.ref.ReferenceCleanser;
|
|||
*/
|
||||
public class SimpleDemandPointerFlowGraph extends SlowSparseNumberedGraph<Object> {
|
||||
|
||||
private static final long serialVersionUID = 5208052568163692029L;
|
||||
|
||||
private final static boolean DEBUG = false;
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,6 +20,8 @@ import com.ibm.wala.util.CancelException;
|
|||
*/
|
||||
public class CallGraphBuilderCancelException extends CancelException {
|
||||
|
||||
private static final long serialVersionUID = -3071193971009314659L;
|
||||
|
||||
private final CallGraph cg;
|
||||
|
||||
private final PointerAnalysis<InstanceKey> pointerAnalysis;
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.ibm.wala.ipa.cha.IClassHierarchy;
|
|||
*/
|
||||
public class AllApplicationEntrypoints extends HashSet<Entrypoint> {
|
||||
|
||||
private static final long serialVersionUID = 6541081454519490199L;
|
||||
private final static boolean DEBUG = false;
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,6 +20,8 @@ import com.ibm.wala.util.collections.Pair;
|
|||
*/
|
||||
public final class CallSite extends Pair<CallSiteReference, CGNode> {
|
||||
|
||||
private static final long serialVersionUID = -5277592800329960642L;
|
||||
|
||||
public CallSite(CallSiteReference site, CGNode node) {
|
||||
super(site, node);
|
||||
if (site == null) {
|
||||
|
|
|
@ -207,6 +207,8 @@ public class SDG<T extends InstanceKey> extends AbstractNumberedGraph<Statement>
|
|||
|
||||
private class Nodes extends SlowNumberedNodeManager<Statement> {
|
||||
|
||||
private static final long serialVersionUID = -1450214776332091211L;
|
||||
|
||||
@Override
|
||||
public boolean containsNode(Statement N) {
|
||||
if (super.containsNode(N)) {
|
||||
|
|
|
@ -236,6 +236,8 @@ public final class TypeName implements Serializable {
|
|||
* A key into the dictionary; this is just like a type name, but uses value equality instead of object equality.
|
||||
*/
|
||||
private final static class TypeNameKey implements Serializable {
|
||||
private static final long serialVersionUID = -8284030936836318929L;
|
||||
|
||||
/**
|
||||
* The package, like "java/lang". null means the unnamed package.
|
||||
*/
|
||||
|
|
|
@ -16,6 +16,8 @@ package com.ibm.wala.util;
|
|||
*/
|
||||
public class CancelRuntimeException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 5859062345002606705L;
|
||||
|
||||
protected CancelRuntimeException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -147,6 +147,8 @@ public class ProgressMaster implements IProgressMonitor {
|
|||
|
||||
public static class TooMuchMemoryUsed extends Exception {
|
||||
|
||||
private static final long serialVersionUID = -7174940833610292692L;
|
||||
|
||||
}
|
||||
|
||||
private class Timeout extends Thread {
|
||||
|
|
|
@ -54,6 +54,8 @@ package com.ibm.wala.util.ssa;
|
|||
* @author Tobias Blaschke <code@tobiasblaschke.de>
|
||||
*/
|
||||
public class ClassLookupException extends RuntimeException {
|
||||
private static final long serialVersionUID = 7551139209041666026L;
|
||||
|
||||
public ClassLookupException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.ibm.wala.ssa.IR;
|
|||
|
||||
public class CgPanel extends JSplitPane{
|
||||
|
||||
private static final long serialVersionUID = -4094408933344852549L;
|
||||
private final CallGraph cg;
|
||||
|
||||
public CgPanel(CallGraph cg) {
|
||||
|
|
|
@ -30,6 +30,7 @@ import com.ibm.wala.ipa.cha.IClassHierarchy;
|
|||
|
||||
public class ChaPanel extends JSplitPane {
|
||||
|
||||
private static final long serialVersionUID = -9058908127737757320L;
|
||||
private final IClassHierarchy cha;
|
||||
|
||||
public ChaPanel(IClassHierarchy cha) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.ibm.wala.ssa.IR;
|
|||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
|
||||
public class IrViewer extends JPanel{
|
||||
private static final long serialVersionUID = -5668847442988389016L;
|
||||
private JTextField methodName;
|
||||
private DefaultListModel<String> irLineList = new DefaultListModel<>();
|
||||
private JList<String> irLines;
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.ibm.wala.util.intset.OrdinalSetMapping;
|
|||
*/
|
||||
public class PaPanel extends JSplitPane {
|
||||
|
||||
private static final long serialVersionUID = 8120735305334110889L;
|
||||
protected final PointerAnalysis<InstanceKey> pa;
|
||||
protected final CallGraph cg;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import javax.swing.JScrollPane;
|
|||
import javax.swing.JTextField;
|
||||
|
||||
public class SourceViewer extends JPanel{
|
||||
private static final long serialVersionUID = -1688405955293925453L;
|
||||
private URL sourceURL;
|
||||
private JTextField sourceCodeLocation;
|
||||
private DefaultListModel<String> sourceCodeLinesList = new DefaultListModel<>();
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis;
|
|||
*/
|
||||
public class WalaViewer extends JFrame {
|
||||
|
||||
private static final long serialVersionUID = -8580178580211053765L;
|
||||
protected static final String DefaultMutableTreeNode = null;
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -63,6 +63,7 @@ import com.ibm.wala.util.strings.Atom;
|
|||
public class DefaultInstantiationBehavior extends IInstantiationBehavior {
|
||||
|
||||
/* package-private */ static final class BehviourValue implements Serializable {
|
||||
private static final long serialVersionUID = 190943987799306506L;
|
||||
public final InstanceBehavior behaviour;
|
||||
public final Exactness exactness;
|
||||
public final BehviourValue cacheFrom;
|
||||
|
@ -81,6 +82,7 @@ public class DefaultInstantiationBehavior extends IInstantiationBehavior {
|
|||
}
|
||||
|
||||
/* package-private */ static final class BehaviorKey<T> implements Serializable {
|
||||
private static final long serialVersionUID = -1932639921432060660L;
|
||||
// T is expected to be TypeName or Atom
|
||||
final T base;
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ import com.ibm.wala.types.TypeName;
|
|||
* @author Tobias Blaschke <code@tobiasblaschke.de>
|
||||
*/
|
||||
public abstract class IInstantiationBehavior implements Serializable {
|
||||
private static final long serialVersionUID = -3698760758700891479L;
|
||||
|
||||
/**
|
||||
* The handling for a variable occurring in the AndroidModel.
|
||||
*/
|
||||
|
|
|
@ -63,6 +63,7 @@ import com.ibm.wala.util.strings.Atom;
|
|||
public class LoadedInstantiationBehavior extends IInstantiationBehavior {
|
||||
|
||||
private static final class BehviourValue implements Serializable {
|
||||
private static final long serialVersionUID = -7558845015122601212L;
|
||||
public final InstanceBehavior behaviour;
|
||||
public final Exactness exactness;
|
||||
public final BehviourValue cacheFrom;
|
||||
|
@ -86,6 +87,8 @@ public class LoadedInstantiationBehavior extends IInstantiationBehavior {
|
|||
}
|
||||
|
||||
private static final class BehaviorKey<T> implements Serializable {
|
||||
private static final long serialVersionUID = 73530;
|
||||
|
||||
// T is expected to be TypeName or Atom
|
||||
final T base;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -46,7 +46,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -105,6 +105,8 @@ public class TaintTransferFunctions<E extends ISSABasicBlock> implements
|
|||
// Java, you need type aliases.
|
||||
private static class BlockPair<E extends ISSABasicBlock> extends
|
||||
Pair<BasicBlockInContext<E>, BasicBlockInContext<E>> {
|
||||
private static final long serialVersionUID = 6838579950051954781L;
|
||||
|
||||
protected BlockPair(BasicBlockInContext<E> fst,
|
||||
BasicBlockInContext<E> snd) {
|
||||
super(fst, snd);
|
||||
|
|
|
@ -60,7 +60,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
|
|
|
@ -17,6 +17,8 @@ package com.ibm.wala.util;
|
|||
@SuppressWarnings("javadoc")
|
||||
public class CancelException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 3728159810629412928L;
|
||||
|
||||
protected CancelException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ package com.ibm.wala.util;
|
|||
*/
|
||||
public class WalaRuntimeException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -272544923431659418L;
|
||||
/**
|
||||
* @param s a message describing the failure
|
||||
*/
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
|
||||
public class Pair<T,U> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1861211857872739247L;
|
||||
public final T fst;
|
||||
public final U snd;
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ import com.ibm.wala.util.intset.TunedMutableSparseIntSet;
|
|||
*/
|
||||
public class SparseVector<T> implements IVector<T>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6220164684358954867L;
|
||||
|
||||
private final static int DEF_INITIAL_SIZE = 5;
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,6 +22,8 @@ import com.ibm.wala.util.math.Logs;
|
|||
*/
|
||||
public class TwoLevelVector<T> implements IVector<T>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -835376054736611070L;
|
||||
|
||||
private static final int PAGE_SIZE = 4096;
|
||||
|
||||
private static final int LOG_PAGE_SIZE = Logs.log2(PAGE_SIZE);
|
||||
|
|
|
@ -20,6 +20,8 @@ import java.util.Set;
|
|||
*/
|
||||
public abstract class SetOfClasses implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3048222852073799533L;
|
||||
|
||||
public abstract boolean contains(String klassName);
|
||||
|
||||
public abstract void add(String klass);
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.ibm.wala.util.intset.SimpleIntVector;
|
|||
*/
|
||||
public class Path extends SimpleIntVector {
|
||||
|
||||
private static final long serialVersionUID = 5622964158500601280L;
|
||||
final int size;
|
||||
|
||||
private Path(int defaultValue, int size) {
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.ibm.wala.util.intset.MutableMapping;
|
|||
*/
|
||||
public class SlowNumberedNodeManager<T> implements NumberedNodeManager<T>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8956107128389624337L;
|
||||
/**
|
||||
* A bijection between integer <-> node
|
||||
*/
|
||||
|
|
|
@ -24,6 +24,8 @@ import com.ibm.wala.util.intset.BasicNaturalRelation;
|
|||
*/
|
||||
public class SlowSparseNumberedGraph<T> extends AbstractNumberedGraph<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7014361126159594838L;
|
||||
|
||||
private final SlowNumberedNodeManager<T> nodeManager = new SlowNumberedNodeManager<>();
|
||||
|
||||
private final SparseNumberedEdgeManager<T> edgeManager;
|
||||
|
|
|
@ -28,6 +28,8 @@ import com.ibm.wala.util.intset.IntSetAction;
|
|||
*/
|
||||
public final class SparseNumberedEdgeManager<T> implements NumberedEdgeManager<T>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6751048618312429623L;
|
||||
|
||||
private final NumberedNodeManager<T> nodeManager;
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,6 +28,8 @@ import com.ibm.wala.util.graph.Graph;
|
|||
*/
|
||||
public class DFSAllPathsFinder<T> extends DFSPathFinder<T> {
|
||||
|
||||
private static final long serialVersionUID = 5413569289853649240L;
|
||||
|
||||
public DFSAllPathsFinder(Graph<T> G, Iterator<T> nodes, Predicate<T> f) {
|
||||
super(G, nodes, f);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.ibm.wala.util.graph.NumberedGraph;
|
|||
*/
|
||||
public abstract class DFSDiscoverTimeIterator<T> extends ArrayList<T> implements Iterator<T> {
|
||||
|
||||
private static final long serialVersionUID = 4238700455408861924L;
|
||||
/**
|
||||
* an enumeration of all nodes to search from
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,8 @@ import com.ibm.wala.util.graph.Graph;
|
|||
*/
|
||||
public abstract class DFSFinishTimeIterator<T> extends ArrayList<T> implements Iterator<T> {
|
||||
|
||||
private static final long serialVersionUID = 8440061593631309429L;
|
||||
|
||||
/**
|
||||
* the current next element in finishing time order
|
||||
*/
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.ibm.wala.util.graph.Graph;
|
|||
|
||||
abstract class GraphDFSDiscoverTimeIterator<T> extends DFSDiscoverTimeIterator<T> {
|
||||
|
||||
private static final long serialVersionUID = -5673397879499010863L;
|
||||
/**
|
||||
* the graph being searched
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,8 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
*/
|
||||
public final class BasicNaturalRelation implements IBinaryNaturalRelation, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4483720230344867621L;
|
||||
|
||||
private final static boolean VERBOSE = false;
|
||||
|
||||
private final static boolean DEBUG = false;
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.ibm.wala.util.debug.UnimplementedError;
|
|||
*/
|
||||
public class BimodalMutableIntSet implements MutableIntSet {
|
||||
|
||||
private static final long serialVersionUID = 7332332295529936562L;
|
||||
MutableIntSet impl;
|
||||
|
||||
/*
|
||||
|
|
|
@ -18,6 +18,8 @@ import java.io.Serializable;
|
|||
@SuppressWarnings("rawtypes")
|
||||
abstract public class BitVectorBase<T extends BitVectorBase> implements Cloneable, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1151811022797406841L;
|
||||
|
||||
protected final static boolean DEBUG = false;
|
||||
|
||||
protected final static int LOG_BITS_PER_UNIT = 5;
|
||||
|
|
|
@ -20,6 +20,8 @@ import com.ibm.wala.util.debug.UnimplementedError;
|
|||
*/
|
||||
public final class BitVectorIntSet implements MutableIntSet {
|
||||
|
||||
private static final long serialVersionUID = 7477243071826223843L;
|
||||
|
||||
// population count of -1 means needs to be computed again.
|
||||
private int populationCount = 0;
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
*/
|
||||
class DebuggingMutableIntSet implements MutableIntSet {
|
||||
|
||||
private static final long serialVersionUID = 6879912730471879687L;
|
||||
|
||||
final MutableIntSet primaryImpl;
|
||||
|
||||
final MutableIntSet secondaryImpl;
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.util.NoSuchElementException;
|
|||
|
||||
public class EmptyIntSet implements IntSet {
|
||||
|
||||
private static final long serialVersionUID = 5116475799916663164L;
|
||||
public static EmptyIntSet instance = new EmptyIntSet();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,8 @@ import com.ibm.wala.util.collections.HashMapFactory;
|
|||
*/
|
||||
public class MutableMapping<T> implements OrdinalSetMapping<T>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4011751404163534418L;
|
||||
|
||||
private static final int INITIAL_CAPACITY = 20;
|
||||
|
||||
private final static int MAX_SIZE = Integer.MAX_VALUE / 4;
|
||||
|
|
|
@ -20,6 +20,8 @@ import com.ibm.wala.util.debug.UnimplementedError;
|
|||
*/
|
||||
public class MutableSharedBitVectorIntSet implements MutableIntSet {
|
||||
|
||||
private static final long serialVersionUID = -6630888692508092370L;
|
||||
|
||||
private final static boolean DEBUG = false;
|
||||
|
||||
private final static boolean PARANOID = false;
|
||||
|
|
|
@ -23,6 +23,8 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
*/
|
||||
public class MutableSparseIntSet extends SparseIntSet implements MutableIntSet {
|
||||
|
||||
private static final long serialVersionUID = 1479453398189400698L;
|
||||
|
||||
/**
|
||||
* If forced to grow the backing array .. then by how much
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,7 @@ package com.ibm.wala.util.intset;
|
|||
*/
|
||||
public final class OffsetBitVector extends BitVectorBase<OffsetBitVector> {
|
||||
|
||||
private static final long serialVersionUID = -5846568678514886375L;
|
||||
int offset;
|
||||
|
||||
private static int wordDiff(int offset1, int offset2) {
|
||||
|
|
|
@ -14,6 +14,8 @@ import com.ibm.wala.util.collections.CompoundIntIterator;
|
|||
import com.ibm.wala.util.collections.EmptyIntIterator;
|
||||
|
||||
public class SemiSparseMutableIntSet implements MutableIntSet {
|
||||
private static final long serialVersionUID = 8647721176321526013L;
|
||||
|
||||
private static final boolean DEBUG = true;
|
||||
|
||||
private static final double FIX_SPARSE_MOD = 12;
|
||||
|
|
|
@ -18,6 +18,8 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class SimpleIntVector implements IntVector, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7909547846468543777L;
|
||||
|
||||
private final static int MAX_SIZE = Integer.MAX_VALUE / 4;
|
||||
|
||||
private final static float GROWTH_FACTOR = 1.5f;
|
||||
|
|
|
@ -23,6 +23,8 @@ import com.ibm.wala.util.debug.UnimplementedError;
|
|||
*/
|
||||
public class SparseIntSet implements IntSet {
|
||||
|
||||
private static final long serialVersionUID = 2394141733718319022L;
|
||||
|
||||
private final static int SINGLETON_CACHE_SIZE = 5000;
|
||||
|
||||
private final static SparseIntSet[] singletonCache = new SparseIntSet[SINGLETON_CACHE_SIZE];
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
public class SparseIntVector implements IntVector, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2428993854689991888L;
|
||||
private final static int INITIAL_SIZE = 5;
|
||||
private final double EXPANSION = 1.5;
|
||||
int maxIndex = -1;
|
||||
|
|
|
@ -18,6 +18,8 @@ package com.ibm.wala.util.intset;
|
|||
*/
|
||||
public class TunedMutableSparseIntSet extends MutableSparseIntSet {
|
||||
|
||||
private static final long serialVersionUID = -1559172158241923881L;
|
||||
|
||||
private final int initialSize;
|
||||
|
||||
private final float expansion;
|
||||
|
|
|
@ -15,6 +15,8 @@ package com.ibm.wala.util.intset;
|
|||
*/
|
||||
public class TunedSimpleIntVector extends SimpleIntVector {
|
||||
|
||||
private static final long serialVersionUID = -1380867351543398351L;
|
||||
|
||||
private final int initialSize;
|
||||
|
||||
private final float expansion;
|
||||
|
|
|
@ -20,6 +20,8 @@ import com.ibm.wala.util.math.Logs;
|
|||
*/
|
||||
public class TwoLevelIntVector implements IntVector, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7383053435395846217L;
|
||||
|
||||
private static final int PAGE_SIZE = 4096;
|
||||
|
||||
private static final int LOG_PAGE_SIZE = Logs.log2(PAGE_SIZE);
|
||||
|
|
Loading…
Reference in New Issue