proj_name
stringclasses
131 values
relative_path
stringlengths
30
228
class_name
stringlengths
1
68
func_name
stringlengths
1
48
masked_class
stringlengths
78
9.82k
func_body
stringlengths
46
9.61k
len_input
int64
29
2.01k
len_output
int64
14
1.94k
total
int64
55
2.05k
relevant_context
stringlengths
0
38.4k
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/JavaNetInetAddressImplNative.java
JavaNetInetAddressImplNative
simulateMethod
class JavaNetInetAddressImplNative extends NativeMethodClass { public JavaNetInetAddressImplNative(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMethod(SootMeth...
String subSignature = method.getSubSignature(); if (subSignature.equals("java.lang.String getLocalHostName()")) { java_net_InetAddressImpl_getLocalHostName(method, thisVar, returnVar, params); return; } else if (subSignature.equals("java.lang.String getHostByAddress(int)")) { java_net_...
482
153
635
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/JavaSecurityAccessControllerNative.java
JavaSecurityAccessControllerNative
simulateMethod
class JavaSecurityAccessControllerNative extends NativeMethodClass { public JavaSecurityAccessControllerNative(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMet...
String subSignature = method.getSubSignature(); if (subSignature.equals("java.lang.Object doPrivileged(java.security.PrivilegedAction)")) { java_security_AccessController_doPrivileged(method, thisVar, returnVar, params); return; } else if (subSignature.equals("java.lang.Object doPrivileged(j...
630
436
1,066
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/JavaUtilJarJarFileNative.java
JavaUtilJarJarFileNative
simulateMethod
class JavaUtilJarJarFileNative extends NativeMethodClass { public JavaUtilJarJarFileNative(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMethod(SootMethod metho...
String subSignature = method.getSubSignature(); if (subSignature.equals("java.lang.String[] getMetaInfoEntryNames()")) { java_util_jar_JarFile_getMetaInfoEntryNames(method, thisVar, returnVar, params); return; } else { defaultMethod(method, thisVar, returnVar, params); return; ...
249
101
350
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/JavaUtilZipCRC32Native.java
JavaUtilZipCRC32Native
simulateMethod
class JavaUtilZipCRC32Native extends NativeMethodClass { public JavaUtilZipCRC32Native(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMethod(SootMethod method, R...
String subSignature = method.getSubSignature(); /* TODO */ { defaultMethod(method, thisVar, returnVar, params); return; }
195
48
243
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/JavaUtilZipZipEntryNative.java
JavaUtilZipZipEntryNative
simulateMethod
class JavaUtilZipZipEntryNative extends NativeMethodClass { public JavaUtilZipZipEntryNative(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMethod(SootMethod met...
String subSignature = method.getSubSignature(); { defaultMethod(method, thisVar, returnVar, params); return; }
115
43
158
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/NativeMethodClass.java
NativeMethodClass
defaultMethod
class NativeMethodClass { private static final Logger logger = LoggerFactory.getLogger(NativeMethodClass.class); private static final boolean DEBUG = false; protected NativeHelper helper; public NativeMethodClass(NativeHelper helper) { this.helper = helper; } /* * If a native method has no side ef...
if (DEBUG) { logger.debug("No side effects : " + method.toString()); }
186
29
215
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/nativemethods/SunMiscUnsafeNative.java
SunMiscUnsafeNative
simulateMethod
class SunMiscUnsafeNative extends NativeMethodClass { public SunMiscUnsafeNative(NativeHelper helper) { super(helper); } /** * Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures. */ public void simulateMethod(SootMethod method, Referen...
String subSignature = method.getSubSignature(); if (subSignature.equals("java.lang.Object allocateInstance(java.lang.Class)")) { sun_misc_Unsafe_allocateInstance(method, thisVar, returnVar, params); return; } { defaultMethod(method, thisVar, returnVar, params); return; }...
182
101
283
<methods>public void <init>(soot.jimple.toolkits.pointer.util.NativeHelper) ,public static void defaultMethod(soot.SootMethod, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable, soot.jimple.toolkits.pointer.representations.ReferenceVariable[])...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/pointer/util/NativeMethodDriver.java
NativeMethodDriver
process
class NativeMethodDriver { private static final Logger logger = LoggerFactory.getLogger(NativeMethodDriver.class); public NativeMethodDriver(NativeHelper helper) { cnameToSim.put("java.lang.Object", new JavaLangObjectNative(helper)); cnameToSim.put("java.lang.System", new JavaLangSystemNative(helper)); ...
String cname = method.getDeclaringClass().getName(); NativeMethodClass clsSim = cnameToSim.get(cname); // logger.debug(""+method.toString()); if (clsSim == null) { // logger.warn("it is unsafe to simulate the method "); // logger.debug(" "+method.toString()); // throw new NativeMeth...
1,318
207
1,525
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/reflection/ConstantInvokeMethodBaseTransformer.java
ConstantInvokeMethodBaseTransformer
internalTransform
class ConstantInvokeMethodBaseTransformer extends SceneTransformer { private static final Logger logger = LoggerFactory.getLogger(ConstantInvokeMethodBaseTransformer.class); private final static String INVOKE_SIG = "<java.lang.reflect.Method: java.lang.Object invoke(java.lang.Object,java.lang.Object[])>"; ...
final boolean verbose = options.containsKey("verbose"); final Jimple jimp = Jimple.v(); for (SootClass sootClass : Scene.v().getApplicationClasses()) { // In some rare cases we will have application classes that are not resolved due to being located in excluded packages // (e.g., the ServiceCo...
198
462
660
<methods>public non-sealed void <init>() ,public final void transform(java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(java.lang.String) ,public final void transform() <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/AbstractStaticnessCorrector.java
AbstractStaticnessCorrector
isTypeLoaded
class AbstractStaticnessCorrector extends BodyTransformer { protected static boolean isClassLoaded(SootClass sc) { return sc.resolvingLevel() >= SootClass.SIGNATURES; } protected static boolean isTypeLoaded(Type tp) {<FILL_FUNCTION_BODY>} }
if (tp instanceof RefType) { RefType rt = (RefType) tp; if (rt.hasSootClass()) { return isClassLoaded(rt.getSootClass()); } } return false;
82
65
147
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/ConditionalBranchFolder.java
ConditionalBranchFolder
internalTransform
class ConditionalBranchFolder extends BodyTransformer { private static final Logger logger = LoggerFactory.getLogger(ConditionalBranchFolder.class); public ConditionalBranchFolder(Singletons.Global g) { } public static ConditionalBranchFolder v() { return G.v().soot_jimple_toolkits_scalar_ConditionalBranc...
StmtBody stmtBody = (StmtBody) body; if (Options.v().verbose()) { logger.debug("[" + stmtBody.getMethod().getName() + "] Folding conditional branches..."); } int numTrue = 0, numFalse = 0; Chain<Unit> units = stmtBody.getUnits(); for (Iterator<Unit> it = units.snapshotIterator(); it.has...
147
383
530
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/ConstantPropagatorAndFolder.java
ConstantPropagatorAndFolder
internalTransform
class ConstantPropagatorAndFolder extends BodyTransformer { private static final Logger logger = LoggerFactory.getLogger(ConstantPropagatorAndFolder.class); public ConstantPropagatorAndFolder(Singletons.Global g) { } public static ConstantPropagatorAndFolder v() { return G.v().soot_jimple_toolkits_scalar_...
int numFolded = 0; int numPropagated = 0; if (Options.v().verbose()) { logger.debug("[" + b.getMethod().getName() + "] Propagating and folding constants..."); } UnitGraph g = ExceptionalUnitGraphFactory.createExceptionalUnitGraph(b); LocalDefs localDefs = G.v().soot_toolkits_scalar_Loca...
147
645
792
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/DefaultLocalCreation.java
DefaultLocalCreation
newLocal
class DefaultLocalCreation extends LocalCreation { /** if no prefix is given, this one's used */ public static final String DEFAULT_PREFIX = "soot"; private final Set<String> locals; private int counter; /** * all actions are done on the given locals-chain. as prefix the <code>DEFAULT-PREFIX</code> will...
int suffix = prefix.equals(this.prefix) ? this.counter : 0; while (this.locals.contains(prefix + suffix)) { suffix++; } if (prefix.equals(this.prefix)) { this.counter = suffix + 1; } String newName = prefix + suffix; Local newLocal = Jimple.v().newLocal(newName, type); this....
382
133
515
<methods>public void <init>(Collection<soot.Local>, java.lang.String) ,public abstract soot.Local newLocal(soot.Type) ,public abstract soot.Local newLocal(java.lang.String, soot.Type) <variables>protected final non-sealed Collection<soot.Local> localChain,protected final non-sealed java.lang.String prefix
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/EmptySwitchEliminator.java
EmptySwitchEliminator
internalTransform
class EmptySwitchEliminator extends BodyTransformer { public EmptySwitchEliminator(Singletons.Global g) { } public static EmptySwitchEliminator v() { return G.v().soot_jimple_toolkits_scalar_EmptySwitchEliminator(); } @Override protected void internalTransform(Body b, String phaseName, Map<String, St...
final Chain<Unit> units = b.getUnits(); for (Iterator<Unit> it = units.snapshotIterator(); it.hasNext();) { Unit u = it.next(); if (u instanceof LookupSwitchStmt) { LookupSwitchStmt sw = (LookupSwitchStmt) u; if (sw.getTargetCount() == 0) { Unit defaultTarget = sw.getDefau...
121
154
275
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/EqualLocalsAnalysis.java
EqualLocalsAnalysis
flowThrough
class EqualLocalsAnalysis extends ForwardFlowAnalysis<Unit, FlowSet<Object>> { protected Local l = null; protected Stmt s = null; public EqualLocalsAnalysis(UnitGraph g) { super(g); // analysis is done on-demand, not now } /** Returns a list of EquivalentValue wrapped Locals and Refs that must alw...
in.copy(out); // get list of definitions at this unit List<EquivalentValue> newDefs = new ArrayList<EquivalentValue>(); for (ValueBox next : unit.getDefBoxes()) { newDefs.add(new EquivalentValue(next.getValue())); } // If the local of interest was defined in this statement, then we must...
456
659
1,115
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/Evaluator.java
Evaluator
getConstantValueOf
class Evaluator { public static boolean isValueConstantValued(Value op) { if (op instanceof Constant) { return true; } else if (op instanceof UnopExpr) { Value innerOp = ((UnopExpr) op).getOp(); if (innerOp == NullConstant.v()) { // operations on null will throw an exception and the...
if (!isValueConstantValued(op)) { return null; } if (op instanceof Constant) { return op; } else if (op instanceof UnopExpr) { Value c = getConstantValueOf(((UnopExpr) op).getOp()); if (op instanceof NegExpr) { return ((NumericConstant) c).negate(); } } else i...
521
1,152
1,673
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/FastAvailableExpressionsAnalysis.java
FastAvailableExpressionsAnalysis
flowThrough
class FastAvailableExpressionsAnalysis extends ForwardFlowAnalysis<Unit, FlowSet<Value>> { protected final FlowSet<Value> emptySet = new ToppedSet<Value>(new ArraySparseSet<Value>()); protected final SideEffectTester st; /** maps an rhs to its containing stmt. object equality in rhs. */ protected final Map<Va...
in.copy(out); if (((ToppedSet<Value>) in).isTop()) { return; } // Perform generation out.union(unitToGenerateSet.get(u), out); // Perform kill. if (((ToppedSet<Value>) out).isTop()) { throw new RuntimeException("trying to kill on topped set!"); } // iterate over thing...
663
254
917
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/FieldStaticnessCorrector.java
FieldStaticnessCorrector
internalTransform
class FieldStaticnessCorrector extends AbstractStaticnessCorrector { public FieldStaticnessCorrector(Singletons.Global g) { } public static FieldStaticnessCorrector v() { return G.v().soot_jimple_toolkits_scalar_FieldStaticnessCorrector(); } @Override protected void internalTransform(Body b, String p...
// Some apps reference static fields as instance fields. We need to fix // this for not breaking the client analysis. for (Unit u : b.getUnits()) { if (u instanceof AssignStmt) { AssignStmt assignStmt = (AssignStmt) u; if (assignStmt.containsFieldRef()) { FieldRef ref = assi...
125
322
447
<methods>public non-sealed void <init>() <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/IdentityCastEliminator.java
IdentityCastEliminator
internalTransform
class IdentityCastEliminator extends BodyTransformer { public IdentityCastEliminator(Singletons.Global g) { } public static IdentityCastEliminator v() { return G.v().soot_jimple_toolkits_scalar_IdentityCastEliminator(); } @Override protected void internalTransform(Body b, String phaseName, Map<String...
for (Iterator<Unit> unitIt = b.getUnits().iterator(); unitIt.hasNext();) { Unit curUnit = unitIt.next(); if (curUnit instanceof AssignStmt) { final AssignStmt assignStmt = (AssignStmt) curUnit; final Value leftOp = assignStmt.getLeftOp(); final Value rightOp = assignStmt.getRigh...
121
264
385
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/MethodStaticnessCorrector.java
MethodStaticnessCorrector
internalTransform
class MethodStaticnessCorrector extends AbstractStaticnessCorrector { private static final Logger logger = LoggerFactory.getLogger(MethodStaticnessCorrector.class); public MethodStaticnessCorrector(Singletons.Global g) { } public static MethodStaticnessCorrector v() { return G.v().soot_jimple_toolkits_sca...
for (Iterator<Unit> unitIt = b.getUnits().snapshotIterator(); unitIt.hasNext();) { Unit u = unitIt.next(); if (u instanceof Stmt) { Stmt s = (Stmt) u; if (s.containsInvokeExpr()) { InvokeExpr iexpr = s.getInvokeExpr(); if (iexpr instanceof StaticInvokeExpr) { ...
342
305
647
<methods>public non-sealed void <init>() <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/SlowAvailableExpressionsAnalysis.java
SlowAvailableExpressionsAnalysis
flowThrough
class SlowAvailableExpressionsAnalysis extends ForwardFlowAnalysis<Unit, FlowSet<Value>> { protected final Map<Unit, BoundedFlowSet<Value>> unitToGenerateSet; protected final Map<Unit, BoundedFlowSet<Value>> unitToPreserveSet; /** maps an rhs to its containing stmt. object equality in rhs. */ protected final M...
// Perform kill in.intersection(unitToPreserveSet.get(unit), out); // Perform generation out.union(unitToGenerateSet.get(unit));
1,747
51
1,798
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/pre/BusyCodeMotion.java
BusyCodeMotion
internalTransform
class BusyCodeMotion extends BodyTransformer { private static final Logger logger = LoggerFactory.getLogger(BusyCodeMotion.class); private static final String PREFIX = "$bcm"; public BusyCodeMotion(Singletons.Global g) { } public static BusyCodeMotion v() { return G.v().soot_jimple_toolkits_scalar_pre_...
final BCMOptions options = new BCMOptions(opts); if (Options.v().verbose()) { logger.debug("[" + b.getMethod().getName() + "] performing Busy Code Motion..."); } CriticalEdgeRemover.v().transform(b, phaseName + ".cer"); UnitGraph graph = new BriefUnitGraph(b); /* Map each unit to ...
237
1,075
1,312
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/pre/DownSafetyAnalysis.java
DownSafetyAnalysis
flowThrough
class DownSafetyAnalysis extends BackwardFlowAnalysis<Unit, FlowSet<EquivalentValue>> { private final SideEffectTester sideEffect; private final Map<Unit, EquivalentValue> unitToGenerateMap; private final BoundedFlowSet<EquivalentValue> set; /** * This constructor should not be used, and will throw a runti...
in.copy(out); /* Perform kill */ // iterate over things (avail) in out set. for (Iterator<EquivalentValue> outIt = out.iterator(); outIt.hasNext();) { EquivalentValue equiVal = outIt.next(); Value avail = equiVal.getValue(); if (avail instanceof FieldRef) { if (sideEffect.uni...
831
250
1,081
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/pre/NotIsolatedAnalysis.java
NotIsolatedAnalysis
flowThrough
class NotIsolatedAnalysis extends BackwardFlowAnalysis<Unit, FlowSet<EquivalentValue>> { private final LatestComputation unitToLatest; private final Map<Unit, EquivalentValue> unitToGen; private final FlowSet<EquivalentValue> set; /** * Automatically performs the Isolation-analysis on the graph <code>dg</c...
in.copy(out); // Perform generation EquivalentValue rhs = (EquivalentValue) unitToGen.get(unit); if (rhs != null) { out.add(rhs); } // perform kill FlowSet<EquivalentValue> latest = unitToLatest.getFlowBefore(unit); out.difference(latest);
798
99
897
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/scalar/pre/UpSafetyAnalysis.java
UpSafetyAnalysis
flowThrough
class UpSafetyAnalysis extends ForwardFlowAnalysis<Unit, FlowSet<EquivalentValue>> { private final SideEffectTester sideEffect; private final Map<Unit, EquivalentValue> unitToGenerateMap; private final BoundedFlowSet<EquivalentValue> set; /** * This constructor should not be used, and will throw a runtime-...
in.copy(out); // Perform generation EquivalentValue add = unitToGenerateMap.get(u); if (add != null) { out.add(add, out); } /* Perform kill */ // iterate over things (avail) in out set. for (Iterator<EquivalentValue> outIt = out.iterator(); outIt.hasNext();) { EquivalentVa...
844
252
1,096
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/EncapsulatedObjectAnalysis.java
EncapsulatedObjectAnalysis
isMethodPureOnObject
class EncapsulatedObjectAnalysis // extends ForwardFlowAnalysis { private static final Logger logger = LoggerFactory.getLogger(EncapsulatedObjectAnalysis.class); List cachedClasses; List<SootMethod> objectPureMethods; List<SootMethod> objectPureInitMethods; public EncapsulatedObjectAnalysis() { cachedCla...
if (!cachedClasses.contains(sm.getDeclaringClass()) && sm.isConcrete()) // NOT A COMPLETE SOLUTION (ignores subclassing) { SootMethod initMethod = null; Collection methods = sm.getDeclaringClass().getMethods(); Iterator methodsIt = methods.iterator(); List<SootMethod> mayBePureMethods =...
297
361
658
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/CompactSequentNodes.java
CompactSequentNodes
compactStartChain
class CompactSequentNodes { long compactNodes = 0; long add = 0; public CompactSequentNodes(PegGraph pg) { Chain mainPegChain = pg.getMainPegChain(); compactGraph(mainPegChain, pg); compactStartChain(pg); // PegToDotFile printer = new PegToDotFile(pg, false, "sequence"); System.err.println("c...
Set maps = graph.getStartToThread().entrySet(); for (Iterator iter = maps.iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); List runMethodChainList = (List) entry.getValue(); Iterator it = runMethodChainList.iterator(); while (it.hasNext()) { Chain chain ...
1,707
119
1,826
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/CompactStronglyConnectedComponents.java
CompactStronglyConnectedComponents
compactGraph
class CompactStronglyConnectedComponents { long compactNodes = 0; long add = 0; public CompactStronglyConnectedComponents(PegGraph pg) { Chain mainPegChain = pg.getMainPegChain(); compactGraph(mainPegChain, pg); compactStartChain(pg); // PegToDotFile printer = new PegToDotFile(pg, false, "compac...
Set canNotBeCompacted = peg.getCanNotBeCompacted(); // testCan(speg.getMainPegChain(), canNotBeCompacted); // SCC scc = new SCC(chain, peg); SCC scc = new SCC(chain.iterator(), peg); List<List<Object>> sccList = scc.getSccList(); // testSCC(sccList); Iterator<List<Object>> sccListIt = sccL...
1,340
239
1,579
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/DfsForBackEdge.java
DfsForBackEdge
visitNode
class DfsForBackEdge { private final Map<Object, Object> backEdges = new HashMap<Object, Object>(); private final Set<Object> gray = new HashSet<Object>(); private final Set<Object> black = new HashSet<Object>(); private final DominatorsFinder domFinder; DfsForBackEdge(Chain chain, DirectedGraph peg) { ...
// System.out.println("s is: "+ s); gray.add(s); Iterator it = g.getSuccsOf(s).iterator(); if (g.getSuccsOf(s).size() > 0) { while (it.hasNext()) { Object succ = it.next(); if (!gray.contains(succ)) { visitNode(g, succ); } else { // if the color of th...
495
281
776
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/LoopBodyFinder.java
LoopBodyFinder
findLoopBody
class LoopBodyFinder { private final FastStack<Object> stack = new FastStack<Object>(); private final Set<Set<Object>> loops = new HashSet<Set<Object>>(); LoopBodyFinder(Map<Object, Object> backEdges, DirectedGraph g) { findLoopBody(backEdges, g); } private void findLoopBody(Map<Object, Object> backEdg...
Set maps = backEdges.entrySet(); for (Iterator iter = maps.iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); Object tail = entry.getKey(); // Tag tag = (Tag)key.getTags().get(0); // System.out.println("---key= "+tag+" "+key); Object head = entry.getValue();...
339
138
477
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/LoopFinder.java
LoopFinder
testLoops
class LoopFinder { private final Map<Chain, Set<Set<Object>>> chainToLoop = new HashMap<Chain, Set<Set<Object>>>(); LoopFinder(PegGraph peg) { Chain chain = peg.getMainPegChain(); DfsForBackEdge dfsForBackEdge = new DfsForBackEdge(chain, peg); Map<Object, Object> backEdges = dfsForBackEdge.getBackEdges...
System.out.println("====loops==="); Iterator<Set<Object>> it = loopBody.iterator(); while (it.hasNext()) { Set loop = it.next(); Iterator loopIt = loop.iterator(); System.out.println("---loop---"); while (loopIt.hasNext()) { JPegStmt o = (JPegStmt) loopIt.next(); Tag...
218
159
377
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/MethodExtentBuilder.java
MethodExtentBuilder
propagate
class MethodExtentBuilder { // private List inlineSites = new ArrayList(); private final Set<Object> methodsNeedingInlining = new HashSet<Object>(); public MethodExtentBuilder(Body unitBody, PegCallGraph pcg, CallGraph cg) { // testCallGraph(cg); build(pcg, cg); // checkMethodNeedExtent(); Check...
/* * if a method is not in methodsNeedingInlining, use DFS to find out if it's parents need inlining. If so, add it to * methodsNeedingInlining */ Set<Object> gray = new HashSet<Object>(); Iterator it = cg.iterator(); while (it.hasNext()) { Object o = it.next(); if (methodsN...
1,155
224
1,379
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/MonitorDepth.java
MonitorDepth
decreaseDepth
class MonitorDepth { private String objName; private int depth; MonitorDepth(String s, int d) { objName = s; depth = d; } protected String getObjName() { return objName; } protected void SetObjName(String s) { objName = s; } protected int getDepth() { return depth; } prote...
if (depth > 0) { depth = depth - 1; } else { throw new RuntimeException("Error! You can not decrease a monitor depth of " + depth); }
168
50
218
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/PegCallGraphToDot.java
PegCallGraphToDot
getNodeOrder
class PegCallGraphToDot { /* * make all control fields public, allow other soot class dump the graph in the middle */ public static boolean isBrief = false; private static final Map<Object, String> listNodeName = new HashMap<Object, String>(); /* in one page or several pages of 8.5x11 */ public stati...
Integer index = nodeindex.get(node); if (index == null) { index = new Integer(nodecount++); nodeindex.put(node, index); } // System.out.println("order is:"+index.intValue()); return index.intValue();
1,234
76
1,310
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/RunMethodsPred.java
RunMethodsPred
want
class RunMethodsPred implements EdgePredicate { /** Returns true iff the edge e is wanted. */ public boolean want(Edge e) {<FILL_FUNCTION_BODY>} }
String tgtSubSignature = e.tgt().getSubSignature(); if (tgtSubSignature.equals("void run()")) { return true; } return false;
48
50
98
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/findobject/MultiCalledMethods.java
MultiCalledMethods
finder2
class MultiCalledMethods { Set<SootMethod> multiCalledMethods = new HashSet<SootMethod>(); MultiCalledMethods(PegCallGraph pcg, Set<SootMethod> mcm) { multiCalledMethods = mcm; byMCalledS0(pcg); finder1(pcg); finder2(pcg); propagate(pcg); } private void byMCalledS0(PegCallGraph pcg) { ...
pcg.trim(); Set<SootMethod> first = new HashSet<SootMethod>(); Set<SootMethod> second = new HashSet<SootMethod>(); // Visit each node Iterator it = pcg.iterator(); while (it.hasNext()) { SootMethod s = (SootMethod) it.next(); if (!second.contains(s)) { visitNode(s, pcg, f...
1,016
126
1,142
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/findobject/MultiRunStatementsFinder.java
MultiRunStatementsFinder
findMultiCalledMethodsIntra
class MultiRunStatementsFinder extends ForwardFlowAnalysis<Unit, BitSet> { Set<Unit> multiRunStatements = new HashSet<Unit>(); protected Map<Object, Integer> nodeToIndex; protected int lastIndex = 0; // add soot method here just for debug public MultiRunStatementsFinder(UnitGraph g, SootMethod sm, Set<SootM...
Iterator<Unit> it = multiRunStatements.iterator(); while (it.hasNext()) { Stmt stmt = (Stmt) it.next(); if (stmt.containsInvokeExpr()) { InvokeExpr invokeExpr = stmt.getInvokeExpr(); List<SootMethod> targetList = new ArrayList<SootMethod>(); SootMethod method = invokeExpr....
730
298
1,028
<methods>public void <init>(DirectedGraph<soot.Unit>) <variables>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/mhp/stmt/JPegStmt.java
JPegStmt
testToString
class JPegStmt extends AbstractHost // public class JPegStmt implements CommunicationStmt // public class JPegStmt extends AbstractStmt implements CommunicationStm // public class JPegStmt extends AbstractStm { protected String object; protected String name; protected String caller; protected Unit unit = nul...
if (containUnit()) { if (sootMethod != null) { return "(" + getObject() + ", " + getName() + ", " + getCaller() + ", " + getUnit() + "," + sootMethod + ")"; } else { return "(" + getObject() + ", " + getName() + ", " + getCaller() + ", " + getUnit() + ")"; } } else { ret...
965
142
1,107
<methods>public non-sealed void <init>() ,public void addAllTagsOf(soot.tagkit.Host) ,public void addTag(soot.tagkit.Tag) ,public int getJavaSourceStartColumnNumber() ,public int getJavaSourceStartLineNumber() ,public soot.tagkit.Tag getTag(java.lang.String) ,public List<soot.tagkit.Tag> getTags() ,public boolean hasTa...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/synchronization/CriticalSectionGroup.java
CriticalSectionGroup
mergeGroups
class CriticalSectionGroup implements Iterable<CriticalSection> { int groupNum; // Information about the group members List<CriticalSection> criticalSections; // Group read/write set RWSet rwSet; // Information about the selected lock(s) public boolean isDynamicLock; // is lockObject actually dynamic? ...
if (other == this) { return; } Iterator<CriticalSection> tnIt = other.criticalSections.iterator(); while (tnIt.hasNext()) { CriticalSection tn = tnIt.next(); add(tn); } other.criticalSections.clear();
410
87
497
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/synchronization/DeadlockAvoidanceEdge.java
DeadlockAvoidanceEdge
equals
class DeadlockAvoidanceEdge extends NewStaticLock { public DeadlockAvoidanceEdge(SootClass sc) { super(sc); } /** Clones the object. */ public Object clone() { return new DeadlockAvoidanceEdge(sc); } public boolean equals(Object c) {<FILL_FUNCTION_BODY>} public String toString() { return "d...
if (c instanceof DeadlockAvoidanceEdge) { return ((DeadlockAvoidanceEdge) c).idnum == idnum; } return false;
125
45
170
<methods>public void <init>(soot.SootClass) ,public void apply(soot.util.Switch) ,public java.lang.Object clone() ,public boolean equals(java.lang.Object) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public soot.SootClass getLockClass() ,public soot.Type getType() ,public List<soot.ValueBox> g...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/synchronization/NewStaticLock.java
NewStaticLock
equals
class NewStaticLock implements Value { SootClass sc; // The class to which to add a static lock. static int nextidnum = 1; int idnum; public NewStaticLock(SootClass sc) { this.sc = sc; this.idnum = nextidnum++; } public SootClass getLockClass() { return sc; } @Override public List<Value...
if (c instanceof NewStaticLock) { return ((NewStaticLock) c).idnum == idnum; } return false;
401
38
439
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/thread/synchronization/SynchronizedRegionFlowPair.java
SynchronizedRegionFlowPair
toString
class SynchronizedRegionFlowPair { private static final Logger logger = LoggerFactory.getLogger(SynchronizedRegionFlowPair.class); // Information about the transactional region public CriticalSection tn; public boolean inside; SynchronizedRegionFlowPair(CriticalSection tn, boolean inside) { this.tn = tn;...
return "[" + (inside ? "in," : "out,") + tn.toString() + "]";
337
31
368
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/ClassHierarchy.java
ClassHierarchy
typeNode
class ClassHierarchy { /** Map: Scene -> ClassHierarchy **/ public final TypeNode OBJECT; public final TypeNode CLONEABLE; public final TypeNode SERIALIZABLE; public final TypeNode NULL; public final TypeNode INT; // public final TypeNode UNKNOWN; // public final TypeNode ERROR; /** All type node in...
if (type == null) { throw new InternalTypingException(); } type = transform.toInt(type); TypeNode typeNode = typeNodeMap.get(type); if (typeNode == null) { int id = typeNodeList.size(); typeNodeList.add(null); typeNode = make.typeNode(id, type, this); typeNodeList.s...
1,272
136
1,408
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/ConstraintCheckerBV.java
RuntimeTypeException
handleInvokeExpr
class RuntimeTypeException extends RuntimeException { RuntimeTypeException(String message) { super(message); } } static void error(String message) { throw new RuntimeTypeException(message); } private void handleInvokeExpr(InvokeExpr ie, Stmt invokestmt) {<FILL_FUNCTION_BODY>
if (ie instanceof InterfaceInvokeExpr) { InterfaceInvokeExpr invoke = (InterfaceInvokeExpr) ie; SootMethodRef method = invoke.getMethodRef(); Value base = invoke.getBase(); if (base instanceof Local) { Local local = (Local) base; if (!hierarchy.typeNode(local.getType()).h...
90
1,272
1,362
<methods>public non-sealed void <init>() ,public void caseAssignStmt(soot.jimple.AssignStmt) ,public void caseBreakpointStmt(soot.jimple.BreakpointStmt) ,public void caseEnterMonitorStmt(soot.jimple.EnterMonitorStmt) ,public void caseExitMonitorStmt(soot.jimple.ExitMonitorStmt) ,public void caseGotoStmt(soot.jimple.Got...
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/Util.java
Util
findLastIdentityUnit
class Util { /** * A new "normal" statement cannot be inserted in the middle of special "identity statements" (a = @parameter or b = @this * in Jimple). * * This method returns the last "identity statement" of the method. * * @param b * @param s * @return */ public static Unit findLastId...
final Chain<Unit> units = b.getUnits(); Unit u2 = s; for (Unit u1 = u2; u1 instanceof IdentityStmt;) { u2 = u1; u1 = units.getSuccOf(u1); } return u2;
254
79
333
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/AugEvalFunction.java
AugEvalFunction
eval_
class AugEvalFunction implements IEvalFunction { private final JimpleBody jb; public AugEvalFunction(JimpleBody jb) { this.jb = jb; } public static Type eval_(Typing tg, Value expr, Stmt stmt, JimpleBody jb) {<FILL_FUNCTION_BODY>} @Override public Collection<Type> eval(Typing tg, Value expr, Stmt st...
if (expr instanceof ThisRef) { return ((ThisRef) expr).getType(); } else if (expr instanceof ParameterRef) { return ((ParameterRef) expr).getType(); } else if (expr instanceof Local) { // Changed to prevent null pointer exception in case of phantom classes where a null typing is // ...
158
1,869
2,027
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/IntUtils.java
IntUtils
getTypeByWidth
class IntUtils { /** * Returns an appropriate integer for a given maximum element. * * Throws an exception in case of an unsupported size. * * @param maxValue * the max value * @return the integer */ public static IntegerType getTypeByWidth(int maxValue) {<FILL_FUNCTION_BODY>} ...
switch (maxValue) { case 1: return Integer1Type.v(); case 127: return Integer127Type.v(); case 32767: return Integer32767Type.v(); case Integer.MAX_VALUE: return IntType.v(); default: throw new RuntimeException("Unsupported width: " + maxValue);...
291
108
399
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/QueuedSet.java
QueuedSet
addLast
class QueuedSet<E> { private final Set<E> hs; private final LinkedList<E> ll; public QueuedSet() { this.hs = new HashSet<E>(); this.ll = new LinkedList<E>(); } public QueuedSet(List<E> os) { this(); for (E o : os) { this.ll.addLast(o); this.hs.add(o); } } public QueuedS...
int r = 0; for (E o : os) { if (this.addLast(o)) { r++; } } return r;
309
48
357
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/SingletonList.java
SingletonList
get
class SingletonList<E> extends AbstractList<E> { private final E e; public SingletonList(E e) { this.e = e; } @Override public E get(int index) {<FILL_FUNCTION_BODY>} @Override public int size() { return 1; } }
if (index != 0) { throw new IndexOutOfBoundsException(); } else { return this.e; }
96
38
134
<methods>public boolean add(E) ,public void add(int, E) ,public boolean addAll(int, Collection<? extends E>) ,public void clear() ,public boolean equals(java.lang.Object) ,public abstract E get(int) ,public int hashCode() ,public int indexOf(java.lang.Object) ,public Iterator<E> iterator() ,public int lastIndexOf(java....
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/TypeResolver.java
TypeDecision
applyAssignmentConstraints
class TypeDecision { // Record type decision for different type tuples. List<TypeContainer> containers; TypeDecision() { containers = new ArrayList<>(); } public void addTypeDecision(TypeContainer container) { for (TypeContainer c : this.containers) { if ((typesEqual(container...
final int numAssignments = this.assignments.size(); if (numAssignments == 0) { return Collections.emptyList(); } ArrayDeque<WorklistElement> sigma = createSigmaQueue(); List<Typing> r = createResultList(); final ITypingStrategy typingStrategy = getTypingStrategy(); BitSet wl = new ...
458
1,231
1,689
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/jimple/toolkits/typing/fast/Typing.java
Typing
toString
class Typing { protected HashMap<Local, Type> map; public Typing(Collection<Local> vs) { this.map = new HashMap<Local, Type>(vs.size()); } public Typing(Typing tg) { this.map = new HashMap<Local, Type>(tg.map); } public Map<Local, Type> getMap() { return map; } public Type get(Local v) ...
StringBuilder sb = new StringBuilder(); sb.append('{'); for (Map.Entry<Local, Type> e : this.map.entrySet()) { sb.append(e.getKey()); sb.append(':'); sb.append(e.getValue()); sb.append(','); } sb.append('}'); return sb.toString();
249
98
347
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/plugins/model/PhasePluginDescription.java
PhasePluginDescription
toString
class PhasePluginDescription extends PluginDescription { /** * Name of phase. Make sure it consists of '&lt;pack&gt;.&lt;phase&gt;'. */ private String phaseName; /** * Name of the plugin class that has to implement {@link SootPhasePlugin}. */ private String className; @XmlAttribute(name = "class...
return "<PhasePluginDescription name=" + getPhaseName() + " class= " + getClassName() + ">";
231
35
266
<methods>public non-sealed void <init>() <variables>
soot-oss_soot
soot/src/main/java/soot/rtlib/tamiflex/ReflectiveCalls.java
ReflectiveCalls
knownMethodInvoke
class ReflectiveCalls { private final static Set<String> classForName = new HashSet<String>(); private final static Set<String> classNewInstance = new HashSet<String>(); private final static Set<String> constructorNewInstance = new HashSet<String>(); private final static Set<String> methodInvoke = new HashSet<...
if (!methodInvoke.contains(contextId + SootSig.sootSignature(o, m))) { UnexpectedReflectiveCall.methodInvoke(o, m); }
506
51
557
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/rtlib/tamiflex/SootSig.java
SootSig
sootSignature
class SootSig { private static final Logger logger = LoggerFactory.getLogger(SootSig.class); // TODO should be a map with soft keys, actually private static Map<Constructor<?>, String> constrCache = new ConcurrentHashMap<Constructor<?>, String>(); // TODO should be a map with soft keys, actually private stat...
Class<?> receiverClass = Modifier.isStatic(m.getModifiers()) ? m.getDeclaringClass() : receiver.getClass(); try { // resolve virtual call Method resolved = null; Class<?> c = receiverClass; do { try { resolved = c.getDeclaredMethod(m.getName(), m.getParameterTypes()); ...
800
303
1,103
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/shimple/DefaultShimpleFactory.java
DefaultShimpleFactory
getReverseDominanceFrontier
class DefaultShimpleFactory implements ShimpleFactory { protected final Body body; protected UnitGraph ug; protected BlockGraph bg; protected DominatorsFinder<Block> dFinder; protected DominatorTree<Block> dTree; protected DominanceFrontier<Block> dFrontier; protected GlobalValueNumberer gvn; protec...
DominanceFrontier<Block> rdFrontier = this.rdFrontier; if (rdFrontier == null) { rdFrontier = new CytronDominanceFrontier<Block>(getReverseDominatorTree()); this.rdFrontier = rdFrontier; } return rdFrontier;
1,265
96
1,361
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/shimple/ShimpleTransformer.java
ShimpleTransformer
internalTransform
class ShimpleTransformer extends SceneTransformer { private static final Logger logger = LoggerFactory.getLogger(ShimpleTransformer.class); public ShimpleTransformer(Singletons.Global g) { } public static ShimpleTransformer v() { return G.v().soot_shimple_ShimpleTransformer(); } @Override protected...
if (Options.v().verbose()) { logger.debug("Transforming all classes in the Scene to Shimple..."); } // *** FIXME: Add debug output to indicate which class/method is being shimplified. // *** FIXME: Is ShimpleTransformer the right solution? The call graph may deem // some classes unreachable. ...
128
309
437
<methods>public non-sealed void <init>() ,public final void transform(java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(java.lang.String) ,public final void transform() <variables>
soot-oss_soot
soot/src/main/java/soot/shimple/internal/SPiExpr.java
SPiExpr
equivTo
class SPiExpr implements PiExpr { protected ValueUnitPair argBox; protected Object targetKey; public SPiExpr(Value v, Unit u, Object o) { this.argBox = new SValueUnitPair(v, u); this.targetKey = o; } @Override public ValueUnitPair getArgBox() { return argBox; } @Override public Value g...
if (o instanceof SPiExpr) { return getArgBox().equivTo(((SPiExpr) o).getArgBox()); } else { return false; }
648
48
696
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/shimple/toolkits/scalar/SConstantPropagatorAndFolder.java
SConstantPropagatorAndFolder
internalTransform
class SConstantPropagatorAndFolder extends BodyTransformer { private static final Logger logger = LoggerFactory.getLogger(SConstantPropagatorAndFolder.class); public SConstantPropagatorAndFolder(Singletons.Global g) { } public static SConstantPropagatorAndFolder v() { return G.v().soot_shimple_toolkits_sc...
if (!(b instanceof ShimpleBody)) { throw new RuntimeException("SConstantPropagatorAndFolder requires a ShimpleBody."); } ShimpleBody castBody = (ShimpleBody) b; if (!castBody.isSSA()) { throw new RuntimeException("ShimpleBody is not in proper SSA form as required by SConstantPropagatorAndFo...
892
322
1,214
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/shimple/toolkits/scalar/SEvaluator.java
SEvaluator
getFuzzyConstantValueOf
class SEvaluator { /** * Returns true if given value is determined to be constant valued, false otherwise **/ public static boolean isValueConstantValued(Value op) { if (op instanceof PhiExpr) { Constant firstConstant = null; for (Value arg : ((PhiExpr) op).getValues()) { if (!(arg ins...
if (v instanceof Constant) { return (Constant) v; } else if (v instanceof Local) { return localToConstant.get((Local) v); } else if (!(v instanceof Expr)) { return BottomConstant.v(); } /* clone expr and update the clone with our assumptions */ Expr expr = (Expr) v.clone(); ...
1,228
252
1,480
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/shimple/toolkits/scalar/ShimpleLocalDefs.java
ShimpleLocalDefs
getDefsOfAt
class ShimpleLocalDefs implements LocalDefs { protected Map<Value, List<Unit>> localToDefs; /** * Build a LocalDefs interface from a ShimpleBody. Proper SSA form is required, otherwise correct behaviour is not * guaranteed. **/ public ShimpleLocalDefs(ShimpleBody sb) { // Instead of rebuilding the ...
// For consistency with SimpleLocalDefs, check that the local is indeed used // in the given Unit. This neatly sidesteps the problem of checking whether // the local is actually defined at the given point in the program. { boolean defined = false; for (ValueBox vb : s.getUseBoxes()) { ...
595
167
762
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/sootify/TypeTemplatePrinter.java
TypeTemplatePrinter
caseArrayType
class TypeTemplatePrinter extends TypeSwitch { private String varName; private final TemplatePrinter p; public void printAssign(String v, Type t) { String oldName = varName; varName = v; t.apply(this); varName = oldName; } public TypeTemplatePrinter(TemplatePrinter p) { this.p = p; } ...
printAssign("baseType", t.getElementType()); p.println("int numDimensions=" + t.numDimensions + ';'); emit("ArrayType.v(baseType, numDimensions)");
774
58
832
<methods>public non-sealed void <init>() ,public void caseAnySubType(soot.AnySubType) ,public void caseArrayType(soot.ArrayType) ,public void caseBooleanType(soot.BooleanType) ,public void caseByteType(soot.ByteType) ,public void caseCharType(soot.CharType) ,public void caseDefault(soot.Type) ,public void caseDoubleTyp...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationClassElem.java
AnnotationClassElem
equals
class AnnotationClassElem extends AnnotationElem { private final String desc; /** * * @param typeName * type name * @param elementName * name of element */ public AnnotationClassElem(String typeName, String elementName) { this(typeName, 'c', elementName); } public An...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } AnnotationClassElem other = (AnnotationClassElem) obj; if (this.desc == null) { if (other.desc != null) { return false; } } else if (!this.desc....
309
131
440
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationDoubleElem.java
AnnotationDoubleElem
hashCode
class AnnotationDoubleElem extends AnnotationElem { private final double value; public AnnotationDoubleElem(double v, String name) { this(v, 'D', name); } public AnnotationDoubleElem(double v, char kind, String name) { super(kind, name); this.value = v; } @Override public String toString()...
final int prime = 31; int result = super.hashCode(); long temp = Double.doubleToLongBits(value); result = prime * result + (int) (temp ^ (temp >>> 32)); return result;
317
64
381
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationFloatElem.java
AnnotationFloatElem
equals
class AnnotationFloatElem extends AnnotationElem { private final float value; public AnnotationFloatElem(float v, String name) { this(v, 'F', name); } public AnnotationFloatElem(float v, char kind, String name) { super(kind, name); this.value = v; } @Override public String toString() { ...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } AnnotationFloatElem other = (AnnotationFloatElem) obj; return Float.floatToIntBits(this.value) == Float.floatToIntBits(other.value);
265
100
365
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationIntElem.java
AnnotationIntElem
equals
class AnnotationIntElem extends AnnotationElem { private final int value; /** * Annotation int element * * @param v * value of type int * @param kind * I: int; B: byte; Z: boolean; C: char; S: short; * @param name */ public AnnotationIntElem(int v, char kind, String na...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } AnnotationIntElem other = (AnnotationIntElem) obj; return this.value == other.value;
416
81
497
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationLongElem.java
AnnotationLongElem
equals
class AnnotationLongElem extends AnnotationElem { private final long value; public AnnotationLongElem(long v, String name) { this(v, 'J', name); } public AnnotationLongElem(long v, char kind, String name) { super(kind, name); this.value = v; } @Override public String toString() { retur...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } AnnotationLongElem other = (AnnotationLongElem) obj; return this.value == other.value;
268
81
349
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/AnnotationStringElem.java
AnnotationStringElem
equals
class AnnotationStringElem extends AnnotationElem { private final String value; public AnnotationStringElem(String s, String name) { this(s, 's', name); } public AnnotationStringElem(String s, char kind, String name) { super(kind, name); this.value = s; } @Override public String toString()...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } AnnotationStringElem other = (AnnotationStringElem) obj; if (this.value == null) { if (other.value != null) { return false; } } else if (!this.v...
268
131
399
<methods>public void <init>(char, java.lang.String) ,public boolean equals(java.lang.Object) ,public char getKind() ,public java.lang.String getName() ,public int hashCode() ,public void setName(java.lang.String) ,public java.lang.String toString() <variables>private final non-sealed char kind,private java.lang.String ...
soot-oss_soot
soot/src/main/java/soot/tagkit/Base64.java
Base64
decode
class Base64 { // // code characters for values 0..63 // private static final char[] alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".toCharArray(); // // lookup table for converting base64 characters to value in range 0..63 // private static final byte[] codes = new byte...
// as our input could contain non-BASE64 data (newlines, // whitespace of any sort, whatever) we must first adjust // our count of USABLE data so that... // (a) we don't misallocate the output array, and // (b) think that we miscalculated our data length // just because of extraneous throw-away...
859
665
1,524
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/BytecodeOffsetTag.java
BytecodeOffsetTag
getValue
class BytecodeOffsetTag implements Tag { public static final String NAME = "BytecodeOffsetTag"; /** * The index of the last byte-code instruction. */ protected final int offset; /** * Constructs a tag from the index offset. */ public BytecodeOffsetTag(int offset) { this.offset = offset; } ...
byte[] v = new byte[4]; v[0] = (byte) ((offset >> 24) % 256); v[1] = (byte) ((offset >> 16) % 256); v[2] = (byte) ((offset >> 8) % 256); v[3] = (byte) (offset % 256); return v;
235
105
340
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/ConstantValueTag.java
ConstantValueTag
equals
class ConstantValueTag implements Tag { protected final byte[] bytes; // encoded constant protected ConstantValueTag(byte[] bytes) { this.bytes = bytes; } @Override public byte[] getValue() { return bytes; } public abstract Constant getConstant(); @Override public abstract String toString...
if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } ConstantValueTag other = (ConstantValueTag) obj; return Arrays.equals(bytes, other.bytes);
170
77
247
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/DoubleConstantValueTag.java
DoubleConstantValueTag
equals
class DoubleConstantValueTag extends ConstantValueTag { public static final String NAME = "DoubleConstantValueTag"; private final double value; public DoubleConstantValueTag(double val) { super(null); this.value = val; } public double getDoubleValue() { return value; } @Override public ...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } DoubleConstantValueTag other = (DoubleConstantValueTag) obj; return Double.doubleToLongBits(this.value) == Double.doubleToLongBits(other.value);
267
97
364
<methods>public boolean equals(java.lang.Object) ,public abstract soot.jimple.Constant getConstant() ,public byte[] getValue() ,public int hashCode() ,public abstract java.lang.String toString() <variables>protected final non-sealed byte[] bytes
soot-oss_soot
soot/src/main/java/soot/tagkit/FloatConstantValueTag.java
FloatConstantValueTag
equals
class FloatConstantValueTag extends ConstantValueTag { public static final String NAME = "FloatConstantValueTag"; private final float value; public FloatConstantValueTag(float value) { super(null); this.value = value; } public float getFloatValue() { return value; } @Override public Str...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } FloatConstantValueTag other = (FloatConstantValueTag) obj; return Float.floatToIntBits(this.value) == Float.floatToIntBits(other.value);
254
100
354
<methods>public boolean equals(java.lang.Object) ,public abstract soot.jimple.Constant getConstant() ,public byte[] getValue() ,public int hashCode() ,public abstract java.lang.String toString() <variables>protected final non-sealed byte[] bytes
soot-oss_soot
soot/src/main/java/soot/tagkit/ImportantTagAggregator.java
ImportantTagAggregator
considerTag
class ImportantTagAggregator extends TagAggregator { /** Decide whether this tag should be aggregated by this aggregator. */ @Override public void considerTag(Tag t, Unit u, LinkedList<Tag> tags, LinkedList<Unit> units) {<FILL_FUNCTION_BODY>} }
Inst i = (Inst) u; if (i.containsInvokeExpr() || i.containsFieldRef() || i.containsArrayRef() || i.containsNewExpr()) { units.add(u); tags.add(t); }
77
65
142
<methods>public non-sealed void <init>() ,public abstract java.lang.String aggregatedName() ,public abstract void considerTag(soot.tagkit.Tag, soot.Unit, LinkedList<soot.tagkit.Tag>, LinkedList<soot.Unit>) ,public void fini() ,public abstract boolean wantTag(soot.tagkit.Tag) <variables>
soot-oss_soot
soot/src/main/java/soot/tagkit/InnerClassAttribute.java
InnerClassAttribute
add
class InnerClassAttribute implements Tag { public static final String NAME = "InnerClassAttribute"; private ArrayList<InnerClassTag> list; public InnerClassAttribute() { this.list = null; } public InnerClassAttribute(ArrayList<InnerClassTag> list) { this.list = list; } public String getClassS...
ArrayList<InnerClassTag> this_list = this.list; if (this_list == null) { this.list = this_list = new ArrayList<InnerClassTag>(); } else { String newt_inner = newt.getInnerClass(); int newt_accessFlags = newt.getAccessFlags(); for (InnerClassTag ict : this_list) { if (newt_in...
382
342
724
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/InnerClassTagAggregator.java
InnerClassTagAggregator
internalTransform
class InnerClassTagAggregator extends SceneTransformer { public InnerClassTagAggregator(Singletons.Global g) { } public static InnerClassTagAggregator v() { return G.v().soot_tagkit_InnerClassTagAggregator(); } public String aggregatedName() { return "InnerClasses"; } @Override public void i...
for (SootClass nextSc : Scene.v().getApplicationClasses()) { ArrayList<InnerClassTag> list = new ArrayList<InnerClassTag>(); for (Tag t : nextSc.getTags()) { if (t instanceof InnerClassTag) { list.add((InnerClassTag) t); } } if (!list.isEmpty()) { nextSc.ad...
131
116
247
<methods>public non-sealed void <init>() ,public final void transform(java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(java.lang.String) ,public final void transform() <variables>
soot-oss_soot
soot/src/main/java/soot/tagkit/LineNumberTag.java
LineNumberTag
getValue
class LineNumberTag implements Tag { public static final String NAME = "LineNumberTag"; /* it is a u2 value representing line number. */ protected int line_number; public LineNumberTag(int ln) { this.line_number = ln; } @Override public String getName() { return NAME; } @Override public...
byte[] v = new byte[2]; v[0] = (byte) (line_number / 256); v[1] = (byte) (line_number % 256); return v;
193
59
252
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/LongConstantValueTag.java
LongConstantValueTag
equals
class LongConstantValueTag extends ConstantValueTag { public static final String NAME = "LongConstantValueTag"; private final long value; public LongConstantValueTag(long value) { super(new byte[] { (byte) ((value >> 56) & 0xff), (byte) ((value >> 48) & 0xff), (byte) ((value >> 40) & 0xff), (byte) ...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } LongConstantValueTag other = (LongConstantValueTag) obj; return this.value == other.value;
382
80
462
<methods>public boolean equals(java.lang.Object) ,public abstract soot.jimple.Constant getConstant() ,public byte[] getValue() ,public int hashCode() ,public abstract java.lang.String toString() <variables>protected final non-sealed byte[] bytes
soot-oss_soot
soot/src/main/java/soot/tagkit/PositionTag.java
PositionTag
toString
class PositionTag implements Tag { public static final String NAME = "PositionTag"; /* it is a value representing end offset. */ private final int endOffset; /* it is a value representing start offset. */ private final int startOffset; public PositionTag(int start, int end) { this.startOffset = star...
return "Jimple pos tag: spos: " + startOffset + " epos: " + endOffset;
208
30
238
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/SourceLnPosTag.java
SourceLnPosTag
getValue
class SourceLnPosTag implements Tag { public static final String NAME = "SourceLnPosTag"; private final int startLn; private final int endLn; private final int startPos; private final int endPos; public SourceLnPosTag(int sline, int eline, int spos, int epos) { this.startLn = sline; this.endLn = ...
byte[] v = new byte[2]; v[0] = (byte) (startLn / 256); v[1] = (byte) (startLn % 256); return v;
369
59
428
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/tagkit/StringConstantValueTag.java
StringConstantValueTag
equals
class StringConstantValueTag extends ConstantValueTag { public static final String NAME = "StringConstantValueTag"; private final String value; public StringConstantValueTag(String value) { super(AsmUtil.toUtf8(value)); this.value = value; } public String getStringValue() { return value; } ...
if (this == obj) { return true; } if (!super.equals(obj) || (this.getClass() != obj.getClass())) { return false; } StringConstantValueTag other = (StringConstantValueTag) obj; if (this.value == null) { if (other.value != null) { return false; } } else if (!th...
257
130
387
<methods>public boolean equals(java.lang.Object) ,public abstract soot.jimple.Constant getConstant() ,public byte[] getValue() ,public int hashCode() ,public abstract java.lang.String toString() <variables>protected final non-sealed byte[] bytes
soot-oss_soot
soot/src/main/java/soot/tagkit/TagAggregator.java
TagAggregator
internalTransform
class TagAggregator extends BodyTransformer { /** Decide whether this tag should be aggregated by this aggregator. */ public abstract boolean wantTag(Tag t); /** Aggregate the given tag assigned to the given unit */ public abstract void considerTag(Tag t, Unit u, LinkedList<Tag> tags, LinkedList<Unit> units);...
BafBody body = (BafBody) b; LinkedList<Tag> tags = new LinkedList<Tag>(); LinkedList<Unit> units = new LinkedList<Unit>(); /* aggregate all tags */ for (Unit unit : body.getUnits()) { for (Tag tag : unit.getTags()) { if (wantTag(tag)) { considerTag(tag, unit, tags, units);...
178
174
352
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/tagkit/TagManager.java
TagManager
getTagFor
class TagManager { public TagManager(Singletons.Global g) { } public static TagManager v() { return G.v().soot_tagkit_TagManager(); } private TagPrinter tagPrinter = new StdTagPrinter(); /** * Returns the Tag class with the given name. * * (This does not seem to be necessary.) */ public...
try { Class<?> cc = Class.forName("soot.tagkit." + tagName); return (Tag) cc.newInstance(); } catch (ClassNotFoundException e) { return null; } catch (IllegalAccessException e) { throw new RuntimeException(); } catch (InstantiationException e) { throw new RuntimeException(...
241
102
343
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/toDex/ConstantVisitor.java
ConstantVisitor
defaultCase
class ConstantVisitor extends AbstractConstantSwitch { private StmtVisitor stmtV; private Register destinationReg; private Stmt origStmt; public ConstantVisitor(StmtVisitor stmtV) { this.stmtV = stmtV; } public void setDestination(Register destinationReg) { this.destinationReg = destinationReg;...
// const* opcodes not used since there seems to be no point in doing so: // CONST_HIGH16, CONST_WIDE_HIGH16 throw new Error("unknown Object (" + o.getClass() + ") as Constant: " + o);
903
69
972
<methods>public non-sealed void <init>() ,public void caseClassConstant(soot.jimple.ClassConstant) ,public void caseDoubleConstant(soot.jimple.DoubleConstant) ,public void caseFloatConstant(soot.jimple.FloatConstant) ,public void caseIntConstant(soot.jimple.IntConstant) ,public void caseLongConstant(soot.jimple.LongCon...
soot-oss_soot
soot/src/main/java/soot/toDex/Debug.java
Debug
printDbg
class Debug { public static boolean TODEX_DEBUG; public static void printDbg(String s, Object... objects) {<FILL_FUNCTION_BODY>} public static void printDbg(boolean c, String s, Object... objects) { if (c) { printDbg(s, objects); } } }
TODEX_DEBUG = Options.v().verbose(); if (TODEX_DEBUG) { for (Object o : objects) { s += o.toString(); } System.out.println(s); }
90
62
152
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/toDex/FastDexTrapTightener.java
FastDexTrapTightener
internalTransform
class FastDexTrapTightener extends BodyTransformer { public FastDexTrapTightener(Singletons.Global g) { } public static FastDexTrapTightener v() { return soot.G.v().soot_toDex_FastDexTrapTightener(); } @Override protected void internalTransform(Body b, String phaseName, Map<String, String> options) {...
for (Iterator<Trap> trapIt = b.getTraps().snapshotIterator(); trapIt.hasNext();) { Trap t = trapIt.next(); Unit beginUnit; while (!isDexInstruction(beginUnit = t.getBeginUnit()) && t.getBeginUnit() != t.getEndUnit()) { t.setBeginUnit(b.getUnits().getSuccOf(beginUnit)); } // ...
206
156
362
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyM...
soot-oss_soot
soot/src/main/java/soot/toDex/Register.java
Register
equals
class Register implements Cloneable { public static final int MAX_REG_NUM_UNCONSTRAINED = 65535; public static final int MAX_REG_NUM_SHORT = 255; public static final int MAX_REG_NUM_BYTE = 15; public static final Register EMPTY_REGISTER = new Register(IntType.v(), 0); private static boolean fitsInto(int ...
if (this == obj) { return true; } if ((obj == null) || (getClass() != obj.getClass())) { return false; } Register other = (Register) obj; if (number != other.number) { return false; } if (type == null) { if (other.type != null) { return false; } ...
928
136
1,064
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/toDex/TemporaryRegisterLocal.java
TemporaryRegisterLocal
equivHashCode
class TemporaryRegisterLocal implements Local { private static final long serialVersionUID = 1L; private Type type; public TemporaryRegisterLocal(Type regType) { setType(regType); } public Local clone() { throw new RuntimeException("Not implemented"); } @Override public final List<ValueBox> g...
final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.hashCode()); return result;
415
46
461
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/AbstractInsn.java
AbstractInsn
getMinimumRegsNeeded
class AbstractInsn implements Insn { protected Opcode opc; protected List<Register> regs; public AbstractInsn(Opcode opc) { if (opc == null) { throw new IllegalArgumentException("opcode must not be null"); } this.opc = opc; regs = new ArrayList<Register>(); } public Opcode getOpcode(...
BitSet incompatRegs = getIncompatibleRegs(); int resultNeed = 0; int miscRegsNeed = 0; boolean hasResult = opc.setsRegister(); if (hasResult && incompatRegs.get(0)) { resultNeed = SootToDexUtils.getDexWords(regs.get(0).getType()); } for (int i = hasResult ? 1 : 0; i < regs.size(); i++...
386
318
704
<no_super_class>
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn11x.java
Insn11x
getIncompatibleRegs
class Insn11x extends AbstractInsn implements OneRegInsn { public Insn11x(Opcode opc, Register regA) { super(opc); regs.add(regA); } public Register getRegA() { return regs.get(REG_A_IDX); } @Override protected BuilderInstruction getRealInsn0(LabelAssigner assigner) { return new BuilderIn...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
168
57
225
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn12x.java
Insn12x
getIncompatibleRegs
class Insn12x extends AbstractInsn implements TwoRegInsn { public Insn12x(Opcode opc, Register regA, Register regB) { super(opc); regs.add(regA); regs.add(regB); } public Register getRegA() { return regs.get(REG_A_IDX); } public Register getRegB() { return regs.get(REG_B_IDX); } @O...
BitSet incompatRegs = new BitSet(2); if (!getRegA().fitsByte()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsByte()) { incompatRegs.set(REG_B_IDX); } return incompatRegs;
220
88
308
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn21c.java
Insn21c
getIncompatibleRegs
class Insn21c extends AbstractInsn implements OneRegInsn { private Reference referencedItem; public Insn21c(Opcode opc, Register regA, Reference referencedItem) { super(opc); regs.add(regA); this.referencedItem = referencedItem; } public Register getRegA() { return regs.get(REG_A_IDX); } ...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
227
57
284
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn21s.java
Insn21s
getIncompatibleRegs
class Insn21s extends AbstractInsn implements OneRegInsn { private short litB; public Insn21s(Opcode opc, Register regA, short litB) { super(opc); regs.add(regA); this.litB = litB; } public Register getRegA() { return regs.get(REG_A_IDX); } public short getLitB() { return litB; } ...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
249
57
306
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn21t.java
Insn21t
getIncompatibleRegs
class Insn21t extends InsnWithOffset implements OneRegInsn { public Insn21t(Opcode opc, Register regA) { super(opc); regs.add(regA); } public Register getRegA() { return regs.get(REG_A_IDX); } @Override protected BuilderInstruction getRealInsn0(LabelAssigner assigner) { return new Builder...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
208
57
265
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public abstract int getMaxJumpOffset() ,public soot.jimple.Stmt getTarget() ,public void setTarget(soot.jimple.Stmt) <variables>protected soot.jimple.Stmt target
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn22b.java
Insn22b
getIncompatibleRegs
class Insn22b extends AbstractInsn implements TwoRegInsn { private byte litC; public Insn22b(Opcode opc, Register regA, Register regB, byte litC) { super(opc); regs.add(regA); regs.add(regB); this.litC = litC; } public Register getRegA() { return regs.get(REG_A_IDX); } public Registe...
BitSet incompatRegs = new BitSet(2); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsShort()) { incompatRegs.set(REG_B_IDX); } return incompatRegs;
301
88
389
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn22s.java
Insn22s
getIncompatibleRegs
class Insn22s extends AbstractInsn implements TwoRegInsn { private short litC; public Insn22s(Opcode opc, Register regA, Register regB, short litC) { super(opc); regs.add(regA); regs.add(regB); this.litC = litC; } public Register getRegA() { return regs.get(REG_A_IDX); } public Regis...
BitSet incompatRegs = new BitSet(2); if (!getRegA().fitsByte()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsByte()) { incompatRegs.set(REG_B_IDX); } return incompatRegs;
301
88
389
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn22x.java
Insn22x
getIncompatibleRegs
class Insn22x extends AbstractInsn implements TwoRegInsn { public Insn22x(Opcode opc, Register regA, Register regB) { super(opc); regs.add(regA); regs.add(regB); } public Register getRegA() { return regs.get(REG_A_IDX); } public Register getRegB() { return regs.get(REG_B_IDX); } pr...
BitSet incompatRegs = new BitSet(2); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsUnconstrained()) { incompatRegs.set(REG_B_IDX); } return incompatRegs;
213
90
303
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn23x.java
Insn23x
getIncompatibleRegs
class Insn23x extends AbstractInsn implements ThreeRegInsn { public Insn23x(Opcode opc, Register regA, Register regB, Register regC) { super(opc); regs.add(regA); regs.add(regB); regs.add(regC); } public Register getRegA() { return regs.get(REG_A_IDX); } public Register getRegB() { ...
BitSet incompatRegs = new BitSet(3); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsShort()) { incompatRegs.set(REG_B_IDX); } if (!getRegC().fitsShort()) { incompatRegs.set(REG_C_IDX); } return incompatRegs;
274
119
393
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn31i.java
Insn31i
getIncompatibleRegs
class Insn31i extends AbstractInsn implements OneRegInsn { private int litB; public Insn31i(Opcode opc, Register regA, int litB) { super(opc); regs.add(regA); this.litB = litB; } public Register getRegA() { return regs.get(REG_A_IDX); } public int getLitB() { return litB; } @Ove...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
249
57
306
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn31t.java
Insn31t
getIncompatibleRegs
class Insn31t extends InsnWithOffset implements OneRegInsn { public AbstractPayload payload = null; public Insn31t(Opcode opc, Register regA) { super(opc); regs.add(regA); } public Register getRegA() { return regs.get(REG_A_IDX); } public void setPayload(AbstractPayload payload) { this.p...
BitSet incompatRegs = new BitSet(1); if (!getRegA().fitsShort()) { incompatRegs.set(REG_A_IDX); } return incompatRegs;
247
57
304
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public abstract int getMaxJumpOffset() ,public soot.jimple.Stmt getTarget() ,public void setTarget(soot.jimple.Stmt) <variables>protected soot.jimple.Stmt target
soot-oss_soot
soot/src/main/java/soot/toDex/instructions/Insn32x.java
Insn32x
getIncompatibleRegs
class Insn32x extends AbstractInsn implements TwoRegInsn { public Insn32x(Opcode opc, Register regA, Register regB) { super(opc); regs.add(regA); regs.add(regB); } public Register getRegA() { return regs.get(REG_A_IDX); } public Register getRegB() { return regs.get(REG_B_IDX); } @O...
BitSet incompatRegs = new BitSet(2); if (!getRegA().fitsUnconstrained()) { incompatRegs.set(REG_A_IDX); } if (!getRegB().fitsUnconstrained()) { incompatRegs.set(REG_B_IDX); } return incompatRegs;
214
92
306
<methods>public void <init>(org.jf.dexlib2.Opcode) ,public java.util.BitSet getIncompatibleRegs() ,public int getMinimumRegsNeeded() ,public org.jf.dexlib2.Opcode getOpcode() ,public org.jf.dexlib2.builder.BuilderInstruction getRealInsn(soot.toDex.LabelAssigner) ,public List<soot.toDex.Register> getRegs() ,public int g...