Fix 11 Eclipse warnings about fields whose values are never used
This commit is contained in:
parent
aaf66705e1
commit
934f8f524f
|
@ -287,8 +287,6 @@ public abstract class JDTJava2CAstTranslator<T extends Position> {
|
|||
|
||||
private final T fSourcePosition;
|
||||
|
||||
private final Set<CAstAnnotation> annotations;
|
||||
|
||||
public ClassEntity(ITypeBinding jdtType, String name, Collection<CAstQualifier> quals, Collection<CAstEntity> entities,
|
||||
T pos, Set<CAstAnnotation> annotations) {
|
||||
fName = name;
|
||||
|
@ -296,7 +294,6 @@ public abstract class JDTJava2CAstTranslator<T extends Position> {
|
|||
fEntities = entities;
|
||||
fJdtType = jdtType;
|
||||
fSourcePosition = pos;
|
||||
this.annotations = annotations;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -62,11 +62,8 @@ public class JavaScriptFunctionDotCallTargetSelector implements MethodTargetSele
|
|||
private static final TypeName CALL_TYPE_NAME = TypeName.findOrCreate("Lprologue.js/Function_prototype_call");
|
||||
private final MethodTargetSelector base;
|
||||
|
||||
private IAnalysisCacheView cache;
|
||||
|
||||
public JavaScriptFunctionDotCallTargetSelector(MethodTargetSelector base, IAnalysisCacheView cache2) {
|
||||
this.base = base;
|
||||
this.cache = cache2;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -83,10 +83,6 @@ public class AstCallGraph extends ExplicitCallGraph {
|
|||
public class AstCGNode extends ExplicitNode {
|
||||
private Set<Function<Object, Object>> callbacks;
|
||||
|
||||
private IR cachedIR;
|
||||
|
||||
private DefUse cachedDU;
|
||||
|
||||
private AstCGNode(IMethod method, Context context) {
|
||||
super(method, context);
|
||||
}
|
||||
|
|
|
@ -135,8 +135,6 @@ public class SSAConversion extends AbstractSSAConversion {
|
|||
private class CopyPropagationRecord {
|
||||
final int rhs;
|
||||
|
||||
final int lhs;
|
||||
|
||||
final int instructionIndex;
|
||||
|
||||
final Set<Object> renamedUses = HashSetFactory.make(2);
|
||||
|
@ -167,7 +165,6 @@ public class SSAConversion extends AbstractSSAConversion {
|
|||
if (DEBUG_UNDO)
|
||||
System.err.println(("new copy record for instruction #" + instructionIndex + ", rhs value is " + rhs));
|
||||
this.rhs = rhs;
|
||||
this.lhs = lhs;
|
||||
this.instructionIndex = instructionIndex;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,10 +201,7 @@ public class IntraprocNullPointerAnalysis<T extends ISSABasicBlock> {
|
|||
private class NegativeCFGBuilderVisitor implements IVisitor {
|
||||
|
||||
private final Graph<T> deleted;
|
||||
private final NullPointerSolver<T> solver;
|
||||
|
||||
private NegativeCFGBuilderVisitor(NullPointerSolver<T> solver) {
|
||||
this.solver = solver;
|
||||
this.deleted = new SparseNumberedGraph<T>(2);
|
||||
for (T bb : cfg) {
|
||||
deleted.addNode(bb);
|
||||
|
|
|
@ -50,13 +50,10 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
*/
|
||||
public class ICFGSupergraph implements ISupergraph<BasicBlockInContext<IExplodedBasicBlock>, CGNode> {
|
||||
|
||||
private final IAnalysisCacheView analysisCache;
|
||||
|
||||
private final ExplodedInterproceduralCFG icfg;
|
||||
|
||||
protected ICFGSupergraph(ExplodedInterproceduralCFG icfg, IAnalysisCacheView cache) {
|
||||
this.icfg = icfg;
|
||||
this.analysisCache = cache;
|
||||
}
|
||||
|
||||
public static ICFGSupergraph make(CallGraph cg, IAnalysisCacheView cache) {
|
||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.wala.analysis.reflection.CloneInterpreter;
|
||||
import com.ibm.wala.cfg.ControlFlowGraph;
|
||||
import com.ibm.wala.cfg.IBasicBlock;
|
||||
import com.ibm.wala.classLoader.ArrayClass;
|
||||
|
@ -72,7 +71,6 @@ import com.ibm.wala.ssa.SSAThrowInstruction;
|
|||
import com.ibm.wala.ssa.SymbolTable;
|
||||
import com.ibm.wala.types.FieldReference;
|
||||
import com.ibm.wala.types.MethodReference;
|
||||
import com.ibm.wala.types.Selector;
|
||||
import com.ibm.wala.types.TypeReference;
|
||||
import com.ibm.wala.util.CancelException;
|
||||
import com.ibm.wala.util.MonitorUtil;
|
||||
|
@ -141,16 +139,6 @@ public abstract class SSAPropagationCallGraphBuilder extends PropagationCallGrap
|
|||
*/
|
||||
protected final static boolean SHORT_CIRCUIT_SINGLE_USES = false;
|
||||
|
||||
/**
|
||||
* Should we change calls to clone() to assignments?
|
||||
*/
|
||||
private final boolean clone2Assign = false;
|
||||
|
||||
/**
|
||||
* Cache for efficiency
|
||||
*/
|
||||
private final static Selector cloneSelector = CloneInterpreter.CLONE.getSelector();
|
||||
|
||||
/**
|
||||
* set of class whose clinits have already been processed
|
||||
*/
|
||||
|
|
|
@ -146,8 +146,6 @@ public class ParameterAccessor {
|
|||
* @since 2013-10-19
|
||||
*/
|
||||
public static class Parameter extends SSAValue {
|
||||
/** Is Accessor constructed with IMethod or MethodReference */
|
||||
private final BasedOn basedOn;
|
||||
/** Implicit this or regular parameter? */
|
||||
private final ParamerterDisposition disp;
|
||||
/** Add to number to get position in descriptor */
|
||||
|
@ -205,7 +203,6 @@ public class ParameterAccessor {
|
|||
}
|
||||
|
||||
this.disp = disp;
|
||||
this.basedOn = basedOn;
|
||||
this.descriptorOffset = descriptorOffset;
|
||||
super.isAssigned();
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
*/
|
||||
package com.ibm.wala.dalvik.ipa.callgraph.propagation.cfa;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -58,7 +56,6 @@ import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
|
|||
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||
import com.ibm.wala.types.MethodReference;
|
||||
import com.ibm.wala.types.Selector;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
import com.ibm.wala.util.intset.EmptyIntSet;
|
||||
import com.ibm.wala.util.intset.IntSet;
|
||||
import com.ibm.wala.util.intset.IntSetUtil;
|
||||
|
@ -82,7 +79,6 @@ public class IntentContextSelector implements ContextSelector {
|
|||
private final IntentMap intents = new IntentMap();
|
||||
private final ContextSelector parent;
|
||||
private final IntentStarters intentStarters;
|
||||
private final Map<InstanceKey, AndroidContext> seenContext;
|
||||
|
||||
public IntentContextSelector(final IClassHierarchy cha) {
|
||||
this(null, cha);
|
||||
|
@ -93,7 +89,6 @@ public class IntentContextSelector implements ContextSelector {
|
|||
*/
|
||||
public IntentContextSelector(final ContextSelector parent, final IClassHierarchy cha) {
|
||||
this.parent = parent;
|
||||
this.seenContext = HashMapFactory.make();
|
||||
this.intentStarters = new IntentStarters(cha);
|
||||
}
|
||||
|
||||
|
@ -201,14 +196,12 @@ public class IntentContextSelector implements ContextSelector {
|
|||
final Selector calleeSel = callee.getSelector();
|
||||
|
||||
boolean isExplicit = false;
|
||||
final InstanceKey uriKey;
|
||||
final InstanceKey actionKey;
|
||||
{ // fetch actionKey, uriKey
|
||||
switch (callee.getNumberOfParameters()) {
|
||||
case 1:
|
||||
logger.debug("Handling Intent()");
|
||||
actionKey = null;
|
||||
uriKey = null;
|
||||
break;
|
||||
case 2:
|
||||
if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;)V"))) {
|
||||
|
@ -229,41 +222,34 @@ public class IntentContextSelector implements ContextSelector {
|
|||
logger.error("No handling implemented for: {}", callee);
|
||||
actionKey = null;
|
||||
}
|
||||
uriKey = null;
|
||||
break;
|
||||
case 3:
|
||||
if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;Landroid/net/Uri;)V"))) {
|
||||
logger.debug("Handling Intent(String action, Uri uri)");
|
||||
// TODO: Use Information of the URI...
|
||||
actionKey = actualParameters[1];
|
||||
uriKey = actualParameters[2];
|
||||
} else if (calleeSel.equals(Selector.make("<init>(Landroid/content/Context;Ljava/lang/Class;)V"))) {
|
||||
logger.debug("Handling Intent(Context, Class)");
|
||||
actionKey = actualParameters[2];
|
||||
uriKey = null;
|
||||
isExplicit = true;
|
||||
} else {
|
||||
logger.error("No handling implemented for: {}", callee);
|
||||
actionKey = null;
|
||||
uriKey = null;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;Landroid/net/Uri;Landroid/content/Context;Ljava/lang/Class;)V"))) {
|
||||
logger.debug("Handling Intent(String action, Uri uri, Context, Class)");
|
||||
actionKey = actualParameters[4];
|
||||
uriKey = actualParameters[2];
|
||||
isExplicit = true;
|
||||
} else {
|
||||
logger.error("No handling implemented for: {}", callee);
|
||||
actionKey = null;
|
||||
uriKey = null;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
logger.error("Can't extract Info from Intent-Constructor: {} (not implemented)", site);
|
||||
actionKey = null;
|
||||
uriKey = null;
|
||||
}
|
||||
} // of fetch actionKey
|
||||
|
||||
|
|
|
@ -56,11 +56,9 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
import com.ibm.wala.util.intset.IntSetAction;
|
||||
|
||||
public class TracingFlowFunction<E extends ISSABasicBlock> implements IUnaryFlowFunction {
|
||||
private final IFDSTaintDomain<E> domain;
|
||||
private final IUnaryFlowFunction function;
|
||||
|
||||
public TracingFlowFunction(IFDSTaintDomain<E> domain, IUnaryFlowFunction function) {
|
||||
this.domain = domain;
|
||||
this.function = function;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ public class StringBuilderUseAnalysis {
|
|||
|
||||
public final Map<ISSABasicBlock, ISSABasicBlock> blockOrdering;
|
||||
|
||||
private final InstanceKey sbik;
|
||||
private final CGNode node;
|
||||
private final PointerAnalysis<InstanceKey> pa;
|
||||
private final Set<LocalPointerKey> localPointerKeys = new HashSet<>();
|
||||
|
@ -83,7 +82,6 @@ public class StringBuilderUseAnalysis {
|
|||
public StringBuilderUseAnalysis(final InstanceKey ik, final PointerAnalysis<InstanceKey> pa) throws Exception {
|
||||
assert(ik.getConcreteType().getName().toString().equals("Ljava/lang/StringBuilder"));
|
||||
|
||||
this.sbik = ik;
|
||||
this.pa = pa;
|
||||
this.node = findCGNode(ik, pa);
|
||||
this.instructions = findInstructions();
|
||||
|
|
|
@ -63,8 +63,6 @@ final public class ClassInstrumenter {
|
|||
|
||||
private final ClassHierarchyProvider cha;
|
||||
|
||||
private final boolean reuseStackMaps;
|
||||
|
||||
/**
|
||||
* Create a class instrumenter from raw bytes.
|
||||
*/
|
||||
|
@ -99,7 +97,6 @@ final public class ClassInstrumenter {
|
|||
}
|
||||
this.cr = cr;
|
||||
this.cha = cha;
|
||||
this.reuseStackMaps = reuseStackMaps;
|
||||
methods = new MethodData[cr.getMethodCount()];
|
||||
oldCode = new CodeReader[methods.length];
|
||||
cpr = CTDecoder.makeConstantPoolReader(cr);
|
||||
|
|
Loading…
Reference in New Issue