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/dexpler/TrapMinimizer.java | TrapMinimizer | internalTransform | class TrapMinimizer extends TrapTransformer {
public TrapMinimizer(Singletons.Global g) {
}
public static TrapMinimizer v() {
return soot.G.v().soot_dexpler_TrapMinimizer();
}
@Override
protected void internalTransform(Body b, String phaseName, Map<String, String> options) {<FILL_FUNCTION_BODY>}
} |
// If we have less then two traps, there's nothing to do here
if (b.getTraps().size() == 0) {
return;
}
ExceptionalUnitGraph eug = ExceptionalUnitGraphFactory.createExceptionalUnitGraph(b, DalvikThrowAnalysis.v(),
Options.v().omit_excepting_unit_edges());
Set<Unit> unitsWithMonitor =... | 116 | 1,097 | 1,213 | <methods>public non-sealed void <init>() ,public Set<soot.Unit> getUnitsWithMonitor(soot.toolkits.graph.UnitGraph) <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/AgetInstruction.java | AgetInstruction | jimplify | class AgetInstruction extends DexlibAbstractInstruction {
public AgetInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) throws InvalidDalvikBytecodeException {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(i... |
if (!(instruction instanceof Instruction23x)) {
throw new IllegalArgumentException("Expected Instruction23x but got: " + instruction.getClass());
}
Instruction23x aGetInstr = (Instruction23x) instruction;
int dest = aGetInstr.getRegisterA();
Local arrayBase = body.getRegisterLocal(aGetInstr... | 142 | 322 | 464 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/AputInstruction.java | AputInstruction | jimplify | class AputInstruction extends FieldInstruction {
public AputInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
protected Type getTargetType(DexBody body) {
Instruction23x aPutInstr ... |
if (!(instruction instanceof Instruction23x)) {
throw new IllegalArgumentException("Expected Instruction23x but got: " + instruction.getClass());
}
Instruction23x aPutInstr = (Instruction23x) instruction;
int source = aPutInstr.getRegisterA();
Local arrayBase = body.getRegisterLocal(aPutIns... | 181 | 320 | 501 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public Set<soot.Type> introducedTypes() <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/Binop2addrInstruction.java | Binop2addrInstruction | getExpression | class Binop2addrInstruction extends TaggedInstruction {
public Binop2addrInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
if (!(instruction instanceof Instruction12x)) {
throw new IllegalArgumentException("Exp... |
Opcode opcode = instruction.getOpcode();
switch (opcode) {
case ADD_LONG_2ADDR:
setTag(new LongOpTag());
return Jimple.v().newAddExpr(source1, source2);
case ADD_FLOAT_2ADDR:
setTag(new FloatOpTag());
return Jimple.v().newAddExpr(source1, source2);
case ADD_DOU... | 528 | 1,380 | 1,908 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/BinopInstruction.java | BinopInstruction | getExpression | class BinopInstruction extends TaggedInstruction {
public BinopInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
if (!(instruction instanceof Instruction23x)) {
throw new IllegalArgumentException("Expected Inst... |
Opcode opcode = instruction.getOpcode();
switch (opcode) {
case ADD_LONG:
setTag(new LongOpTag());
return Jimple.v().newAddExpr(source1, source2);
case ADD_FLOAT:
setTag(new FloatOpTag());
return Jimple.v().newAddExpr(source1, source2);
case ADD_DOUBLE:
... | 539 | 1,252 | 1,791 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/BinopLitInstruction.java | BinopLitInstruction | getExpression | class BinopLitInstruction extends TaggedInstruction {
public BinopLitInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
if (!(instruction instanceof Instruction22s) && !(instruction instanceof Instruction22b)) {
... |
Opcode opcode = instruction.getOpcode();
switch (opcode) {
case ADD_INT_LIT16:
setTag(new IntOpTag());
case ADD_INT_LIT8:
setTag(new IntOpTag());
return Jimple.v().newAddExpr(source1, source2);
case RSUB_INT:
setTag(new IntOpTag());
case RSUB_INT_LIT8:
... | 611 | 677 | 1,288 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/CastInstruction.java | CastInstruction | jimplify | class CastInstruction extends TaggedInstruction {
public CastInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
/**
* Return the appropriate target type for the covered opcodes.
*
* Note... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
int source = i.getRegisterB();
Type targetType = getTargetType();
CastExpr cast = Jimple.v().newCastExpr(body.getRegisterLocal(source), targetType);
AssignStmt assign = Jimple.v().newAssignStmt(body.ge... | 698 | 215 | 913 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/CheckCastInstruction.java | CheckCastInstruction | jimplify | class CheckCastInstruction extends DexlibAbstractInstruction {
public CheckCastInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
public Set<Type> introducedTypes() {
ReferenceInstr... |
if (!(instruction instanceof Instruction21c)) {
throw new IllegalArgumentException("Expected Instruction21c but got: " + instruction.getClass());
}
Instruction21c checkCastInstr = (Instruction21c) instruction;
Local castValue = body.getRegisterLocal(checkCastInstr.getRegisterA());
Type chec... | 156 | 261 | 417 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/CmpInstruction.java | CmpInstruction | jimplify | class CmpInstruction extends TaggedInstruction {
public CmpInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(int register) {
ThreeRegisterInstruction i = ... |
if (!(instruction instanceof Instruction23x)) {
throw new IllegalArgumentException("Expected Instruction23x but got: " + instruction.getClass());
}
Instruction23x cmpInstr = (Instruction23x) instruction;
int dest = cmpInstr.getRegisterA();
Local first = body.getRegisterLocal(cmpInstr.getReg... | 132 | 676 | 808 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ConditionalJumpInstruction.java | ConditionalJumpInstruction | getComparisonExpr | class ConditionalJumpInstruction extends JumpInstruction implements DeferableInstruction {
public ConditionalJumpInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
/**
* Return an if statement depending on the instruction.
*/
protected abstract IfStmt ifStatemen... |
Opcode opcode = instruction.getOpcode();
switch (opcode) {
case IF_EQ:
case IF_EQZ:
return Jimple.v().newEqExpr(one, other);
case IF_NE:
case IF_NEZ:
return Jimple.v().newNeExpr(one, other);
case IF_LT:
case IF_LTZ:
return Jimple.v().newLtExpr(one, o... | 628 | 239 | 867 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) <variables>protected soot.Unit markerUnit,protected soot.dexpler.instructions.DexlibAbstractInstruction targetInstruction |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ConstClassInstruction.java | ConstClassInstruction | jimplify | class ConstClassInstruction extends DexlibAbstractInstruction {
public ConstClassInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(int register) {
OneRegi... |
if (!(instruction instanceof Instruction21c)) {
throw new IllegalArgumentException("Expected Instruction21c but got: " + instruction.getClass());
}
ReferenceInstruction constClass = (ReferenceInstruction) this.instruction;
TypeReference tidi = (TypeReference) (constClass.getReference());
Co... | 209 | 262 | 471 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ConstStringInstruction.java | ConstStringInstruction | jimplify | class ConstStringInstruction extends DexlibAbstractInstruction {
public ConstStringInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(int register) {
OneRe... |
int dest = ((OneRegisterInstruction) instruction).getRegisterA();
String s;
if (instruction instanceof Instruction21c) {
Instruction21c i = (Instruction21c) instruction;
s = ((StringReference) (i.getReference())).getString();
} else if (instruction instanceof Instruction31c) {
Instruc... | 133 | 271 | 404 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ExecuteInlineInstruction.java | ExecuteInlineInstruction | getUsedRegistersNums | class ExecuteInlineInstruction extends MethodInvocationInstruction implements OdexInstruction {
private Method targetMethod = null;
public ExecuteInlineInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
@Override
public void deOdex(DexFile parentFile, Method meth... |
if (instruction instanceof Instruction35mi) {
return getUsedRegistersNums((Instruction35mi) instruction);
} else if (instruction instanceof Instruction3rmi) {
return getUsedRegistersNums((Instruction3rmi) instruction);
}
throw new RuntimeException("Instruction is not an ExecuteInline");
| 418 | 89 | 507 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public void finalize(soot.dexpler.DexBody, soot.dexpler.instructions.DexlibAbstractInstruction) ,public Set<soot.Type> introducedTypes() <variables>protected soot.jimple.AssignStmt assign,protected soot.jimple.InvokeExpr invocation |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/FieldInstruction.java | FieldInstruction | sourceRegister | class FieldInstruction extends DexlibAbstractInstruction {
public FieldInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
/**
* Return a static SootFieldRef for a dexlib FieldReference.
*
* @param item
* the dexlib FieldReference.
*/
protected ... |
// I hate smali's API ..
if (instruction instanceof Instruction23x) {
return ((Instruction23x) instruction).getRegisterA();
} else if (instruction instanceof Instruction22c) {
return ((Instruction22c) instruction).getRegisterA();
} else if (instruction instanceof Instruction21c) {
ret... | 960 | 135 | 1,095 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/FillArrayDataInstruction.java | FillArrayDataInstruction | computeDataOffsets | class FillArrayDataInstruction extends PseudoInstruction {
private static final Logger logger = LoggerFactory.getLogger(FillArrayDataInstruction.class);
public FillArrayDataInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody bod... |
if (!(instruction instanceof Instruction31t)) {
throw new IllegalArgumentException("Expected Instruction31t but got: " + instruction.getClass());
}
Instruction31t fillArrayInstr = (Instruction31t) instruction;
int offset = fillArrayInstr.getCodeOffset();
int targetAddress = codeAddress + off... | 1,473 | 561 | 2,034 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public abstract void computeDataOffsets(soot.dexpler.DexBody) ,public byte[] getData() ,public int getDataFirstByte() ,public int getDataLastByte() ,public int getDataSize() ,public boolean isLoaded() ,public void setLoaded(boolean) <variab... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/FilledArrayInstruction.java | FilledArrayInstruction | finalize | class FilledArrayInstruction extends DexlibAbstractInstruction implements DanglingInstruction {
public FilledArrayInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
public void finalize(DexBody body, DexlibAbstractInstruction successor) {<FILL_FUNCTION_BODY>}
@Over... |
// // defer final jimplification to move result
// if (successor instanceof MoveResultInstruction) {
// MoveResultInstruction i = (MoveResultInstruction)successor;
// i.setLocalToMove(arrayLocal);
// if (lineNumber != -1)
// i.setTag(new SourceLineNumberTag(lineNumber));
// }
| 166 | 94 | 260 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/GotoInstruction.java | GotoInstruction | jimplify | class GotoInstruction extends JumpInstruction implements DeferableInstruction {
public GotoInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
public void deferredJimplify(DexBody body) {
body.getBody().getU... |
// check if target instruction has been jimplified
if (getTargetInstruction(body).getUnit() != null) {
body.add(gotoStatement());
return;
}
// set marker unit to swap real gotostmt with otherwise
body.addDeferredJimplification(this);
markerUnit = Jimple.v().newNopStmt();
addTags... | 180 | 119 | 299 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) <variables>protected soot.Unit markerUnit,protected soot.dexpler.instructions.DexlibAbstractInstruction targetInstruction |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/IfTestInstruction.java | IfTestInstruction | ifStatement | class IfTestInstruction extends ConditionalJumpInstruction {
public IfTestInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
protected IfStmt ifStatement(DexBody body) {<FILL_FUNCTION_BODY>}
} |
Instruction22t i = (Instruction22t) instruction;
Local one = body.getRegisterLocal(i.getRegisterA());
Local other = body.getRegisterLocal(i.getRegisterB());
BinopExpr condition = getComparisonExpr(one, other);
IfStmt jif = Jimple.v().newIfStmt(condition, targetInstruction.getUnit());
// setUnit... | 81 | 214 | 295 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public void deferredJimplify(soot.dexpler.DexBody) ,public void jimplify(soot.dexpler.DexBody) <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/IgetInstruction.java | IgetInstruction | overridesRegister | class IgetInstruction extends FieldInstruction {
public IgetInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
int ... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
return register == dest;
| 302 | 37 | 339 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public Set<soot.Type> introducedTypes() <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/InstanceOfInstruction.java | InstanceOfInstruction | overridesRegister | class InstanceOfInstruction extends DexlibAbstractInstruction {
public InstanceOfInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
Instruction22c i = (Instruction22c) instruction;
int dest = i.getRegisterA();
... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
return register == dest;
| 356 | 37 | 393 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/InvokePolymorphicInstruction.java | InvokePolymorphicInstruction | jimplify | class InvokePolymorphicInstruction extends MethodInvocationInstruction {
public InvokePolymorphicInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
/*
* Instruction Format for invoke-polymorphic invoke-polymorphic MH.invoke, prototype, {mh, [args]} - MH.invoke - a ... |
SootMethodRef ref = getVirtualSootMethodRef();
if (ref.declaringClass().isInterface()) {
ref = getInterfaceSootMethodRef();
}
// The invoking object will always be included in the parameter types here
List<Local> temp = buildParameters(body,
((MethodProtoReference) ((DualReferenceIns... | 806 | 527 | 1,333 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public void finalize(soot.dexpler.DexBody, soot.dexpler.instructions.DexlibAbstractInstruction) ,public Set<soot.Type> introducedTypes() <variables>protected soot.jimple.AssignStmt assign,protected soot.jimple.InvokeExpr invocation |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/IputInstruction.java | IputInstruction | jimplify | class IputInstruction extends FieldInstruction {
public IputInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
protected Type getTargetType(DexBody body) {
FieldReference f = (Field... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int source = i.getRegisterA();
int object = i.getRegisterB();
FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();
InstanceFieldRef instanceField = Jimple.v().newInstanceFieldRef(body.getRegisterLoc... | 135 | 231 | 366 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public Set<soot.Type> introducedTypes() <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/JumpInstruction.java | JumpInstruction | getTargetInstruction | class JumpInstruction extends DexlibAbstractInstruction {
protected DexlibAbstractInstruction targetInstruction;
protected Unit markerUnit;
public JumpInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
protected DexlibAbstractInstruction getTargetInstruction(DexBody... |
int offset = ((OffsetInstruction) instruction).getCodeOffset();
int targetAddress = codeAddress + offset;
targetInstruction = body.instructionAtAddress(targetAddress);
return targetInstruction;
| 102 | 53 | 155 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/MonitorExitInstruction.java | MonitorExitInstruction | jimplify | class MonitorExitInstruction extends DexlibAbstractInstruction {
public MonitorExitInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
} |
int reg = ((OneRegisterInstruction) instruction).getRegisterA();
Local object = body.getRegisterLocal(reg);
ExitMonitorStmt exitMonitorStmt = Jimple.v().newExitMonitorStmt(object);
setUnit(exitMonitorStmt);
addTags(exitMonitorStmt);
body.add(exitMonitorStmt);
if (IDalvikTyper.ENABLE_DVKTYP... | 80 | 176 | 256 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/MoveInstruction.java | MoveInstruction | overridesRegister | class MoveInstruction extends DexlibAbstractInstruction {
public MoveInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA(... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
return register == dest;
| 404 | 37 | 441 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/MoveResultInstruction.java | MoveResultInstruction | jimplify | class MoveResultInstruction extends DexlibAbstractInstruction {
// private Local local;
// private Expr expr;
public MoveResultInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
// public void ... |
// if (local != null && expr != null)
// throw new RuntimeException("Both local and expr are set to move.");
int dest = ((OneRegisterInstruction) instruction).getRegisterA();
// if (local != null)
// assign = Jimple.v().newAssignStmt(body.getRegisterLocal(dest), local);
// else if (expr != nu... | 199 | 279 | 478 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/NewArrayInstruction.java | NewArrayInstruction | jimplify | class NewArrayInstruction extends DexlibAbstractInstruction {
public NewArrayInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(int register) {
TwoRegister... |
if (!(instruction instanceof Instruction22c)) {
throw new IllegalArgumentException("Expected Instruction22c but got: " + instruction.getClass());
}
Instruction22c newArray = (Instruction22c) instruction;
int dest = newArray.getRegisterA();
Value size = body.getRegisterLocal(newArray.getReg... | 209 | 321 | 530 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/NewInstanceInstruction.java | NewInstanceInstruction | overridesRegister | class NewInstanceInstruction extends DexlibAbstractInstruction {
public NewInstanceInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
Instruction21c i = (Instruction21c) instruction;
int dest = i.getRegisterA();
... |
OneRegisterInstruction i = (OneRegisterInstruction) instruction;
int dest = i.getRegisterA();
return register == dest;
| 391 | 37 | 428 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/PackedSwitchInstruction.java | PackedSwitchInstruction | switchStatement | class PackedSwitchInstruction extends SwitchInstruction {
public PackedSwitchInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
protected Stmt switchStatement(DexBody body, Instruction targetData, Local key) {<FILL_FUNCTION_BODY>}
@Override
public void ... |
PackedSwitchPayload i = (PackedSwitchPayload) targetData;
List<? extends SwitchElement> seList = i.getSwitchElements();
// the default target always follows the switch statement
int defaultTargetAddress = codeAddress + instruction.getCodeUnits();
Unit defaultTarget = body.instructionAtAddress(defa... | 111 | 286 | 397 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public void deferredJimplify(soot.dexpler.DexBody) ,public void jimplify(soot.dexpler.DexBody) <variables>protected soot.Unit markerUnit |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/PseudoInstruction.java | PseudoInstruction | getDataLastByte | class PseudoInstruction extends DexlibAbstractInstruction {
public PseudoInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
protected int dataFirstByte = -1;
protected int dataLastByte = -1;
protected int dataSize = -1;
protected byte[] data = null;
protected ... |
if (dataLastByte == -1) {
throw new RuntimeException("Error: dataLastByte was not set!");
}
return dataLastByte;
| 415 | 42 | 457 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ReturnInstruction.java | ReturnInstruction | jimplify | class ReturnInstruction extends DexlibAbstractInstruction {
public ReturnInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
} |
Instruction11x returnInstruction = (Instruction11x) this.instruction;
Local l = body.getRegisterLocal(returnInstruction.getRegisterA());
ReturnStmt returnStmt = Jimple.v().newReturnStmt(l);
setUnit(returnStmt);
addTags(returnStmt);
body.add(returnStmt);
if (IDalvikTyper.ENABLE_DVKTYPER) {
... | 78 | 200 | 278 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/SgetInstruction.java | SgetInstruction | jimplify | class SgetInstruction extends FieldInstruction {
public SgetInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
boolean overridesRegister(int register) {
OneRegisterInstruction i = (... |
int dest = ((OneRegisterInstruction) instruction).getRegisterA();
FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();
StaticFieldRef r = Jimple.v().newStaticFieldRef(getStaticSootFieldRef(f));
AssignStmt assign = Jimple.v().newAssignStmt(body.getRegisterLocal(dest),... | 130 | 169 | 299 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public Set<soot.Type> introducedTypes() <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/SparseSwitchInstruction.java | SparseSwitchInstruction | computeDataOffsets | class SparseSwitchInstruction extends SwitchInstruction {
public SparseSwitchInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
protected Stmt switchStatement(DexBody body, Instruction targetData, Local key) {
SparseSwitchPayload i = (SparseSwitchPayload... |
// System.out.println("class of instruction: "+ instruction.getClass());
// int offset = ((OffsetInstruction) instruction).getCodeOffset();
// int targetAddress = codeAddress + offset;
// Instruction targetData = body.instructionAtAddress(targetAddress).instruction;
// SparseSwitchPayload ssInst = ... | 403 | 429 | 832 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public void deferredJimplify(soot.dexpler.DexBody) ,public void jimplify(soot.dexpler.DexBody) <variables>protected soot.Unit markerUnit |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/SputInstruction.java | SputInstruction | jimplify | class SputInstruction extends FieldInstruction {
public SputInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
@Override
protected Type getTargetType(DexBody body) {
FieldReference f = (Field... |
int source = ((OneRegisterInstruction) instruction).getRegisterA();
FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();
StaticFieldRef instanceField = Jimple.v().newStaticFieldRef(getStaticSootFieldRef(f));
Local sourceValue = body.getRegisterLocal(source);
Assi... | 135 | 178 | 313 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public Set<soot.Type> introducedTypes() <variables> |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/TaggedInstruction.java | TaggedInstruction | getTag | class TaggedInstruction extends DexlibAbstractInstruction {
private Tag instructionTag = null;
public TaggedInstruction(Instruction instruction, int codeAddress) {
super(instruction, codeAddress);
}
public void setTag(Tag t) {
instructionTag = t;
}
public Tag getTag() {<FILL_FUNCTION_BODY>}
} |
if (instructionTag == null) {
throw new RuntimeException(
"Must tag instruction first! (0x" + Integer.toHexString(codeAddress) + ": " + instruction + ")");
}
return instructionTag;
| 101 | 62 | 163 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/ThrowInstruction.java | ThrowInstruction | jimplify | class ThrowInstruction extends DexlibAbstractInstruction {
public ThrowInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}
} |
Instruction11x throwInstruction = (Instruction11x) instruction;
ThrowStmt throwStmt = Jimple.v().newThrowStmt(body.getRegisterLocal(throwInstruction.getRegisterA()));
setUnit(throwStmt);
addTags(throwStmt);
body.add(throwStmt);
if (IDalvikTyper.ENABLE_DVKTYPER) {
DalvikTyper.v().setType(... | 80 | 144 | 224 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineN... |
soot-oss_soot | soot/src/main/java/soot/dexpler/instructions/UnopInstruction.java | UnopInstruction | overridesRegister | class UnopInstruction extends TaggedInstruction {
public UnopInstruction(Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
@Override
public void jimplify(DexBody body) {
if (!(instruction instanceof Instruction12x)) {
throw new IllegalArgumentException("Expected Instru... |
TwoRegisterInstruction i = (TwoRegisterInstruction) instruction;
int dest = i.getRegisterA();
return register == dest;
| 974 | 37 | 1,011 | <methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public soot.tagkit.Tag getTag() ,public void setTag(soot.tagkit.Tag) <variables>private soot.tagkit.Tag instructionTag |
soot-oss_soot | soot/src/main/java/soot/dexpler/typing/DalvikTyper.java | Constraint | typeUntypedConstrantInDiv | class Constraint {
ValueBox l;
ValueBox r;
public Constraint(ValueBox l, ValueBox r) {
this.l = l;
this.r = r;
}
@Override
public String toString() {
return l + " < " + r;
}
}
// this is needed because UnuesedStatementTransformer checks types in the div expressions
... |
for (Unit u : b.getUnits()) {
StmtSwitch sw = new StmtSwitch() {
@Override
public void caseBreakpointStmt(BreakpointStmt stmt) {
// TODO Auto-generated method stub
}
@Override
public void caseInvokeStmt(InvokeStmt stmt) {
changeUntypedConstantsIn... | 133 | 1,461 | 1,594 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dexpler/typing/UntypedIntOrFloatConstant.java | UntypedIntOrFloatConstant | defineType | class UntypedIntOrFloatConstant extends UntypedConstant {
/**
*
*/
private static final long serialVersionUID = 4413439694269487822L;
public final int value;
private UntypedIntOrFloatConstant(int value) {
this.value = value;
}
public static UntypedIntOrFloatConstant v(int value) {
return new ... |
if (t instanceof FloatType) {
return this.toFloatConstant();
} else if (t instanceof IntType || t instanceof CharType || t instanceof BooleanType || t instanceof ByteType
|| t instanceof ShortType) {
return this.toIntConstant();
} else {
if (value == 0 && t instanceof RefLikeType)... | 317 | 169 | 486 | <methods>public non-sealed void <init>() ,public void apply(soot.util.Switch) ,public abstract soot.Value defineType(soot.Type) ,public soot.Type getType() <variables>private static final long serialVersionUID |
soot-oss_soot | soot/src/main/java/soot/dexpler/typing/UntypedLongOrDoubleConstant.java | UntypedLongOrDoubleConstant | equals | class UntypedLongOrDoubleConstant extends UntypedConstant {
/**
*
*/
private static final long serialVersionUID = -3970057807907204253L;
public final long value;
private UntypedLongOrDoubleConstant(long value) {
this.value = value;
}
public static UntypedLongOrDoubleConstant v(long value) {
... |
return c instanceof UntypedLongOrDoubleConstant && ((UntypedLongOrDoubleConstant) c).value == this.value;
| 352 | 35 | 387 | <methods>public non-sealed void <init>() ,public void apply(soot.util.Switch) ,public abstract soot.Value defineType(soot.Type) ,public soot.Type getType() <variables>private static final long serialVersionUID |
soot-oss_soot | soot/src/main/java/soot/dotnet/DotnetClassConstant.java | DotnetClassConstant | convertDotnetClassToJvmDescriptor | class DotnetClassConstant extends ClassConstant {
private DotnetClassConstant(String s) {
super(convertDotnetClassToJvmDescriptor(s));
}
/**
* Convert Dotnet Class to Java Descriptor https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3
*
* @param s
* class to convert
... |
try {
return "L" + s.replace(".", "/").replace("+", "$") + ";";
} catch (Exception e) {
throw new RuntimeException("Cannot convert Dotnet class \"" + s + "\" to JVM Descriptor: " + e);
}
| 243 | 73 | 316 | <methods>public void apply(soot.util.Switch) ,public boolean equals(java.lang.Object) ,public static soot.jimple.ClassConstant fromType(soot.Type) ,public soot.Type getType() ,public java.lang.String getValue() ,public int hashCode() ,public boolean isRefType() ,public java.lang.String toInternalString() ,public soot.T... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CatchFilterHandlerBody.java | CatchFilterHandlerBody | isExitStmt | class CatchFilterHandlerBody {
private final ProtoIlInstructions.IlTryCatchHandlerMsg handlerMsg;
// Base Exception (System.Exception) which will throw and is assigned to this local
private final Local exceptionVar;
// statement where to jump is condition does not fulfill
private final Unit nopStmtEnd;
pri... |
return unit instanceof ReturnStmt || unit instanceof ReturnVoidStmt || unit instanceof ThrowStmt;
| 1,055 | 27 | 1,082 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CatchHandlerBody.java | CatchHandlerBody | getBody | class CatchHandlerBody {
// variable which contains thrown exception
private final Local exceptionVariable;
// method body of this handler
private final ProtoIlInstructions.IlTryCatchHandlerMsg handlerMsg;
private final DotnetBody dotnetBody;
private final SootClass exceptionClass = Scene.v().getSootClass(... |
Body jb = new JimpleBody();
// handler body
Unit excStmt = Jimple.v().newIdentityStmt(exceptionVariable, Jimple.v().newCaughtExceptionRef());
jb.getUnits().add(excStmt);
CilBlockContainer handlerBlock
= new CilBlockContainer(handlerMsg.getBody(), dotnetBody, CilBlockContainer.BlockContaine... | 430 | 424 | 854 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilCastClassUnBoxInstruction.java | CilCastClassUnBoxInstruction | jimplifyExpr | class CilCastClassUnBoxInstruction extends AbstractCilnstruction {
public CilCastClassUnBoxInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoSt... |
Type type = DotnetTypeFactory.toSootType(instruction.getType());
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getArgument(), dotnetBody, cilBlock);
Value argument = cilExpr.jimplifyExpr(jb);
return Jimple.v().newCastExpr(argument, type);
| 144 | 93 | 237 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilCkFiniteInstruction.java | CilCkFiniteInstruction | jimplify | class CilCkFiniteInstruction extends AbstractCilnstruction {
public CilCkFiniteInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Overr... |
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getArgument(), dotnetBody, cilBlock);
Value argument = cilExpr.jimplifyExpr(jb);
DoubleConstant posInfinity = DoubleConstant.v(Double.POSITIVE_INFINITY);
DoubleConstant negInfinity = DoubleConstant.v(Double.NEGATIVE_INFINITY)... | 144 | 470 | 614 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilCompInstruction.java | CilCompInstruction | jimplifyExpr | class CilCompInstruction extends AbstractCilnstruction {
public CilCompInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoStatementInstructionExceptio... |
Value left = CilInstructionFactory.fromInstructionMsg(instruction.getLeft(), dotnetBody, cilBlock).jimplifyExpr(jb);
left = inlineCastExpr(left);
Value right = CilInstructionFactory.fromInstructionMsg(instruction.getRight(), dotnetBody, cilBlock).jimplifyExpr(jb);
right = inlineCastExpr(right);
IlC... | 136 | 771 | 907 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilDefaultValueInstruction.java | CilDefaultValueInstruction | jimplifyExpr | class CilDefaultValueInstruction extends AbstractNewObjInstanceInstruction {
public CilDefaultValueInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw ... |
// RefType refType = RefType.v(i.getType().getFullname());
// return Jimple.v().newNewExpr(refType);
SootClass clazz = Scene.v().getSootClass(instruction.getType().getFullname());
NewExpr newExpr = Jimple.v().newNewExpr(clazz.getType());
methodRef = Scene.v().makeConstructorRef(clazz, new ArrayLi... | 141 | 131 | 272 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) ,public List<soot.Local> getListOfArgs() ,public soot.SootMethodRef getMethodRef() ,public void resolveCallConstructorBody(soot.Body, soot.Local) <variables>protected List<soot.Loc... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilIfInstruction.java | CilIfInstruction | jimplify | class CilIfInstruction extends AbstractCilnstruction {
public CilIfInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Override
public Value... |
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getCondition(), dotnetBody, cilBlock);
Value condition = cilExpr.jimplifyExpr(jb);
// if condition only accepts ConditionExpr and not JimpleLocals
Value eqExpr;
if (condition instanceof ConditionExpr) {
eqExpr = co... | 136 | 437 | 573 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilInstructionFactory.java | CilInstructionFactory | fromInstructionMsg | class CilInstructionFactory {
private static final Logger logger = LoggerFactory.getLogger(CilInstructionFactory.class);
public static CilInstruction fromInstructionMsg(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {<FILL_FUNCTION_BODY>}
} |
if (instruction == null) {
throw new RuntimeException("Cannot instantiate null instruction!");
}
switch (instruction.getOpCode()) {
case CALL:
case CALLVIRT:
// e.g. System.Object..ctor call
return new CilCallVirtInstruction(instruction, dotnetBody, cilBlock);
case ... | 89 | 1,508 | 1,597 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilLdElemaInstruction.java | CilLdElemaInstruction | jimplifyExpr | class CilLdElemaInstruction extends AbstractCilnstruction {
public CilLdElemaInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
if (instruction.getIndicesCount() > 1) {
isMultiArrayRef = true;
}
}
... |
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getArray(), dotnetBody, cilBlock);
baseArrayLocal = cilExpr.jimplifyExpr(jb);
if (instruction.getIndicesCount() == 1) {
Value ind
= CilInstructionFactory.fromInstructionMsg(instruction.getIndices(0), dotnetBody, ... | 594 | 324 | 918 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilLdFldaInstruction.java | CilLdFldaInstruction | jimplifyExpr | class CilLdFldaInstruction extends AbstractCilnstruction {
public CilLdFldaInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoStatementInstructionExce... |
// ldflda is only non-static
SootClass declaringClass = SootResolver.v().makeClassRef(instruction.getField().getDeclaringType().getFullname());
SootFieldRef fieldRef = Scene.v().makeFieldRef(declaringClass, instruction.getField().getName(),
DotnetTypeFactory.toSootType(instruction.getField().getTy... | 144 | 174 | 318 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilLdLenInstruction.java | CilLdLenInstruction | jimplifyExpr | class CilLdLenInstruction extends AbstractCilnstruction {
public CilLdLenInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoStatementInstructionExcept... |
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getArray(), dotnetBody, cilBlock);
Value arr = cilExpr.jimplifyExpr(jb);
if (!(arr instanceof Immediate)) {
throw new RuntimeException("LdLen: Given value is no Immediate!");
}
return Jimple.v().newLengthExpr(arr);
... | 140 | 102 | 242 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilLeaveInstruction.java | CilLeaveInstruction | jimplify | class CilLeaveInstruction extends AbstractCilnstruction {
public CilLeaveInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Override
public... |
// void
if (instruction.getValueInstruction().getOpCode().equals(ProtoIlInstructions.IlInstructionMsg.IlOpCode.NOP)) {
jb.getUnits().add(Jimple.v().newReturnVoidStmt());
} else {
CilInstruction cilValueExpr
= CilInstructionFactory.fromInstructionMsg(instruction.getValueInstruction(), ... | 138 | 578 | 716 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilNewArrInstruction.java | CilNewArrInstruction | jimplifyExpr | class CilNewArrInstruction extends AbstractCilnstruction {
public CilNewArrInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoStatementInstructionExce... |
Type type = DotnetTypeFactory.toSootType(instruction.getType().getFullname());
List<Value> sizesOfArr = new ArrayList<>();
for (ProtoIlInstructions.IlInstructionMsg index : instruction.getIndicesList()) {
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(index, dotnetBody, cilBlock);... | 140 | 254 | 394 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilSizeOfInstruction.java | CilSizeOfInstruction | jimplifyExpr | class CilSizeOfInstruction extends AbstractCilnstruction {
public CilSizeOfInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {
throw new NoStatementInstructionExce... |
String typeName = instruction.getType().getFullname();
// // generate dummy local with ClassConstant - may not needed
// LocalGenerator localGenerator = new LocalGenerator(jb);
// Local tmpLocalVar = localGenerator.generateLocal(RefType.v("System.Object"));
// Unit stmt = Jimple.v().newAssignStmt(... | 138 | 301 | 439 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilStLocInstruction.java | CilStLocInstruction | jimplify | class CilStLocInstruction extends AbstractCilnstruction {
public CilStLocInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Override
public... |
CilInstruction cilExpr
= CilInstructionFactory.fromInstructionMsg(instruction.getValueInstruction(), dotnetBody, cilBlock);
Value value = cilExpr.jimplifyExpr(jb);
// if rvalue is isinst, change to instanceof semantic, see description of opcode
if (cilExpr instanceof CilIsInstInstruction) {
... | 138 | 769 | 907 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilSwitchInstruction.java | CilSwitchInstruction | jimplify | class CilSwitchInstruction extends AbstractCilnstruction {
public CilSwitchInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody, CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Override
publ... |
CilInstruction cilExpr = CilInstructionFactory.fromInstructionMsg(instruction.getKeyInstr(), dotnetBody, cilBlock);
Value key = cilExpr.jimplifyExpr(jb);
int lowIndex = (int) instruction.getSwitchSections(0).getLabel();
int highIndex = (int) instruction.getSwitchSections(instruction.getSwitchSectionsCo... | 136 | 830 | 966 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilTryCatchInstruction.java | CilTryCatchInstruction | jimplify | class CilTryCatchInstruction extends AbstractCilnstruction {
public CilTryCatchInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@Overr... |
List<Unit> nopsToReplaceWithGoto = new ArrayList<>();
final SootClass exceptionClass = Scene.v().getSootClass(DotnetBasicTypes.SYSTEM_EXCEPTION);
NopStmt gotoEndTryCatchBlockNop = Jimple.v().newNopStmt();
// try block
CilBlockContainer tryContainer
= new CilBlockContainer(instruction.getTr... | 142 | 1,419 | 1,561 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/instructions/CilTryFinallyInstruction.java | CilTryFinallyInstruction | jimplify | class CilTryFinallyInstruction extends AbstractCilnstruction {
public CilTryFinallyInstruction(ProtoIlInstructions.IlInstructionMsg instruction, DotnetBody dotnetBody,
CilBlock cilBlock) {
super(instruction, dotnetBody, cilBlock);
}
@Override
public void jimplify(Body jb) {<FILL_FUNCTION_BODY>}
@O... |
// try block
CilBlockContainer tryContainer
= new CilBlockContainer(instruction.getTryBlock(), dotnetBody, CilBlockContainer.BlockContainerKind.TRY);
Body tryContainerBlock = tryContainer.jimplify();
// finally block
CilBlockContainer finallyBlockContainer
= new CilBlockContainer(i... | 140 | 574 | 714 | <methods>public void <init>(ProtoIlInstructions.IlInstructionMsg, soot.dotnet.members.method.DotnetBody, soot.dotnet.instructions.CilBlock) <variables>protected final non-sealed soot.dotnet.instructions.CilBlock cilBlock,protected final non-sealed soot.dotnet.members.method.DotnetBody dotnetBody,protected final non-sea... |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/AbstractDotnetMember.java | AbstractDotnetMember | checkRewriteCilSpecificMember | class AbstractDotnetMember implements DotnetTypeMember {
/**
* If we have specific return or assignment characteristics, rewrite it (mostly reftypes) Due to the different eco system
* of .NET and unsafe methods
*
* @param declaringClass
* @param fieldMethodName
* @return
*/
public static Value... |
/*
* Normally System.String.Empty == Reftype(System.String), because is string, lead to errors in validation With this
* fix: System.String.Empty == StringConstant
*/
if (declaringClass.getName().equals(DotnetBasicTypes.SYSTEM_STRING) && fieldMethodName.equals("Empty")) {
return StringCons... | 125 | 222 | 347 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/DotnetField.java | DotnetField | makeSootField | class DotnetField extends AbstractDotnetMember {
private final ProtoAssemblyAllTypes.FieldDefinition protoField;
public DotnetField(ProtoAssemblyAllTypes.FieldDefinition protoField) {
this.protoField = protoField;
}
public SootField makeSootField() {<FILL_FUNCTION_BODY>}
} |
int modifier = toSootModifier(protoField);
Type type = DotnetTypeFactory.toSootType(protoField.getType());
String name = protoField.getName();
return new SootField(name, type, modifier);
| 89 | 65 | 154 | <methods>public non-sealed void <init>() ,public static soot.Value checkRewriteCilSpecificMember(soot.SootClass, java.lang.String) <variables> |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/method/BlockEntryPointsManager.java | BlockEntryPointsManager | swapGotoEntriesInJBody | class BlockEntryPointsManager {
/**
* Every method contains blocks of instructions targeted with a label. These are stored while visiting blocks and used
* afterwards to swap the goto values.
*/
private final HashMap<String, Unit> methodBlockEntryPoints = new HashMap<>();
/**
* first goto targets ar... |
// if there is a target branch with return leave instruction add RETURNVALUE Target with end instruction
// e.g. if (comp.i4(ldloc capacity == ldloc num5)) leave IL_0000 (nop)
methodBlockEntryPoints.put("RETURNLEAVE", jb.getUnits().getLast());
// change goto / if goto targets to real targets
for (... | 385 | 640 | 1,025 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/method/DotnetBody.java | DotnetBody | jimplify | class DotnetBody {
private final ProtoIlInstructions.IlFunctionMsg ilFunctionMsg;
private JimpleBody jb;
public BlockEntryPointsManager blockEntryPointsManager;
public DotnetBodyVariableManager variableManager;
/**
* Get method signature of this method body
*
* @return method signature
*/
pub... |
this.jb = jb;
variableManager = new DotnetBodyVariableManager(this, this.jb);
// resolve initial variable assignments
addThisStmt();
variableManager.fillMethodParameter();
variableManager.addInitLocalVariables(ilFunctionMsg.getVariablesList());
// Resolve .NET Method Body -> BlockContaine... | 981 | 199 | 1,180 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/method/DotnetBodyVariableManager.java | DotnetBodyVariableManager | addOrGetVariable | class DotnetBodyVariableManager {
private final DotnetBody dotnetBody;
private final Body mainJb;
public final LocalGenerator localGenerator;
private final HashSet<String> localsToCast = new HashSet<>();
public DotnetBodyVariableManager(DotnetBody dotnetBody, Body mainJb) {
this.dotnetBody = dotnetBody;... |
if (v == null) {
return null;
}
if (v.getName().equals("this")) {
return this.mainJb.getThisLocal();
}
if (this.mainJb.getLocals().stream().anyMatch(x -> x.getName().equals(v.getName()))) {
return this.mainJb.getLocals().stream().filter(x -> x.getName().equals(v.getName())).find... | 1,655 | 294 | 1,949 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/members/method/DotnetMethodParameter.java | DotnetMethodParameter | toSootTypeParamsList | class DotnetMethodParameter {
/**
* Converts list of proto .NET method parameter definitions to a list of SootTypes
*
* @param parameterList
* @return
*/
public static List<Type> toSootTypeParamsList(List<ProtoAssemblyAllTypes.ParameterDefinition> parameterList) {<FILL_FUNCTION_BODY>}
} |
List<Type> types = new ArrayList<>();
for (ProtoAssemblyAllTypes.ParameterDefinition parameter : parameterList) {
Type type = DotnetTypeFactory.toSootType(parameter.getType());
types.add(type);
}
return types;
| 94 | 69 | 163 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/specifications/DotnetModifier.java | DotnetModifier | toSootModifier | class DotnetModifier {
public static int toSootModifier(ProtoAssemblyAllTypes.TypeDefinition protoType) {
int modifier = convertAccessibility(protoType.getAccessibility());
if (protoType.getIsAbstract()) {
modifier |= Modifier.ABSTRACT;
}
if (protoType.getIsStatic()) {
modifier |= Modif... |
int modifier = convertAccessibility(fieldDefinition.getAccessibility());
if (fieldDefinition.getIsAbstract() || fieldDefinition.getIsVirtual()) {
modifier |= Modifier.ABSTRACT;
}
if (fieldDefinition.getIsStatic()) {
modifier |= Modifier.STATIC;
}
if (fieldDefinition.getIsReadOnly(... | 614 | 118 | 732 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/dotnet/types/DotnetFakeLdFtnType.java | DotnetFakeLdFtnType | makeMethod | class DotnetFakeLdFtnType {
// Define static fake method
private static final String FAKE_LDFTN_METHOD_NAME = "FakeLdFtn";
/**
* If LdFtn instruction, rewrite and resolve fake Soot class
*
* @param sootClass
* @return
*/
public static IInitialResolver.Dependencies resolve(SootClass sootClass) {... |
SootClass clazz = Scene.v().getSootClass(DotnetBasicTypes.FAKE_LDFTN);
// arguments which are passed to this function
List<Local> argsVariables = new ArrayList<>();
// method-parameters (signature)
List<Type> methodParams = new ArrayList<>();
SootMethodRef methodRef = Scene.v().makeMethodRef(... | 439 | 168 | 607 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/grimp/PrecedenceTest.java | PrecedenceTest | needsBrackets | class PrecedenceTest {
public static boolean needsBrackets(ValueBox subExprBox, Value expr) {<FILL_FUNCTION_BODY>}
public static boolean needsBracketsRight(ValueBox subExprBox, Value expr) {
Value sub = subExprBox.getValue();
if (!(sub instanceof Precedence)) {
return false;
}
Precedence subP... |
Value sub = subExprBox.getValue();
if (!(sub instanceof Precedence)) {
return false;
}
Precedence subP = (Precedence) sub;
Precedence exprP = (Precedence) expr;
return subP.getPrecedence() < exprP.getPrecedence();
| 150 | 87 | 237 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/AbstractGrimpIntBinopExpr.java | AbstractGrimpIntBinopExpr | toString | class AbstractGrimpIntBinopExpr extends AbstractIntBinopExpr implements Precedence {
public AbstractGrimpIntBinopExpr(Value op1, Value op2) {
this(Grimp.v().newArgBox(op1), Grimp.v().newArgBox(op2));
}
protected AbstractGrimpIntBinopExpr(ValueBox op1Box, ValueBox op2Box) {
super(op1Box, op2Box);
}
... |
final Value op1 = op1Box.getValue();
String leftOp = op1.toString();
if (op1 instanceof Precedence && ((Precedence) op1).getPrecedence() < getPrecedence()) {
leftOp = "(" + leftOp + ")";
}
final Value op2 = op2Box.getValue();
String rightOp = op2.toString();
if (op2 instanceof Preced... | 162 | 232 | 394 | <methods>public soot.Type getType() <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/ExprBox.java | ExprBox | canContainValue | class ExprBox extends AbstractValueBox {
public ExprBox(Value value) {
setValue(value);
}
@Override
public boolean canContainValue(Value value) {<FILL_FUNCTION_BODY>}
} |
return value instanceof Local || value instanceof Constant || value instanceof Expr || value instanceof ConcreteRef;
| 64 | 25 | 89 | <methods>public non-sealed void <init>() ,public soot.Value getValue() ,public void setValue(soot.Value) ,public void toString(soot.UnitPrinter) ,public java.lang.String toString() <variables>protected soot.Value value |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GArrayRef.java | GArrayRef | toString | class GArrayRef extends JArrayRef implements Precedence {
public GArrayRef(Value base, Value index) {
super(Grimp.v().newObjExprBox(base), Grimp.v().newExprBox(index));
}
@Override
public int getPrecedence() {
return 950;
}
@Override
public void toString(UnitPrinter up) {<FILL_FUNCTION_BODY>}
... |
final boolean needsBrackets = PrecedenceTest.needsBrackets(baseBox, this);
if (needsBrackets) {
up.literal("(");
}
baseBox.toString(up);
if (needsBrackets) {
up.literal(")");
}
up.literal("[");
indexBox.toString(up);
up.literal("]");
| 268 | 106 | 374 | <methods>public void <init>(soot.Value, soot.Value) ,public void apply(soot.util.Switch) ,public java.lang.Object clone() ,public void convertToBaf(soot.jimple.JimpleToBafContext, List<soot.Unit>) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public soot.Value getBase() ,public soot.ValueBox ge... |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GCastExpr.java | GCastExpr | toString | class GCastExpr extends AbstractCastExpr implements Precedence {
public GCastExpr(Value op, Type type) {
super(Grimp.v().newExprBox(op), type);
}
@Override
public int getPrecedence() {
return 850;
}
@Override
public String toString() {<FILL_FUNCTION_BODY>}
@Override
public Object clone() {... |
final Value op = getOp();
String opString = op.toString();
if (op instanceof Precedence && ((Precedence) op).getPrecedence() < getPrecedence()) {
opString = "(" + opString + ")";
}
return "(" + getCastType().toString() + ") " + opString;
| 143 | 86 | 229 | <methods>public void apply(soot.util.Switch) ,public abstract java.lang.Object clone() ,public void convertToBaf(soot.jimple.JimpleToBafContext, List<soot.Unit>) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public soot.Type getCastType() ,public soot.Value getOp() ,public soot.ValueBox getOpBo... |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GDynamicInvokeExpr.java | GDynamicInvokeExpr | toString | class GDynamicInvokeExpr extends AbstractInvokeExpr implements DynamicInvokeExpr {
protected final SootMethodRef bsmRef;
protected final ValueBox[] bsmArgBoxes;
protected final int tag;
public GDynamicInvokeExpr(SootMethodRef bootStrapMethodRef, List<? extends Value> bootstrapArgs, SootMethodRef methodRef,
... |
StringBuilder buf = new StringBuilder(Jimple.DYNAMICINVOKE + " \"");
buf.append(methodRef.name()); // quoted method name (can be any UTF8 string)
buf.append("\" <");
buf.append(SootMethod.getSubSignature(""/* no method name here */, methodRef.parameterTypes(), methodRef.returnType()));
buf.append(... | 1,395 | 302 | 1,697 | <methods>public abstract java.lang.Object clone() ,public soot.Value getArg(int) ,public soot.ValueBox getArgBox(int) ,public int getArgCount() ,public List<soot.Value> getArgs() ,public soot.SootMethod getMethod() ,public soot.SootMethodRef getMethodRef() ,public soot.Type getType() ,public List<soot.ValueBox> getUseB... |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GNewInvokeExpr.java | GNewInvokeExpr | equivTo | class GNewInvokeExpr extends AbstractInvokeExpr implements NewInvokeExpr, Precedence {
protected RefType type;
public GNewInvokeExpr(RefType type, SootMethodRef methodRef, List<? extends Value> args) {
super(methodRef, new ExprBox[args.size()]);
if (methodRef != null && methodRef.isStatic()) {
thro... |
if (o instanceof GNewInvokeExpr) {
GNewInvokeExpr ie = (GNewInvokeExpr) o;
if ((this.argBoxes == null ? 0 : this.argBoxes.length) != (ie.argBoxes == null ? 0 : ie.argBoxes.length)
|| !this.getMethod().equals(ie.getMethod()) || !this.type.equals(ie.type)) {
return false;
}
... | 789 | 214 | 1,003 | <methods>public abstract java.lang.Object clone() ,public soot.Value getArg(int) ,public soot.ValueBox getArgBox(int) ,public int getArgCount() ,public List<soot.Value> getArgs() ,public soot.SootMethod getMethod() ,public soot.SootMethodRef getMethodRef() ,public soot.Type getType() ,public List<soot.ValueBox> getUseB... |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GNewMultiArrayExpr.java | GNewMultiArrayExpr | clone | class GNewMultiArrayExpr extends AbstractNewMultiArrayExpr {
public GNewMultiArrayExpr(ArrayType type, List<? extends Value> sizes) {
super(type, new ValueBox[sizes.size()]);
final Grimp grmp = Grimp.v();
for (ListIterator<? extends Value> it = sizes.listIterator(); it.hasNext();) {
Value v = it.n... |
final ValueBox[] boxes = this.sizeBoxes;
List<Value> clonedSizes = new ArrayList<Value>(boxes.length);
for (ValueBox vb : boxes) {
clonedSizes.add(Grimp.cloneIfNecessary(vb.getValue()));
}
return new GNewMultiArrayExpr(getBaseType(), clonedSizes);
| 155 | 97 | 252 | <methods>public void apply(soot.util.Switch) ,public abstract java.lang.Object clone() ,public void convertToBaf(soot.jimple.JimpleToBafContext, List<soot.Unit>) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public soot.ArrayType getBaseType() ,public soot.Value getSize(int) ,public soot.ValueB... |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GShlExpr.java | GShlExpr | getType | class GShlExpr extends AbstractGrimpIntLongBinopExpr implements ShlExpr {
public GShlExpr(Value op1, Value op2) {
super(op1, op2);
}
@Override
public String getSymbol() {
return " << ";
}
@Override
public int getPrecedence() {
return 650;
}
@Override
public void apply(Switch sw) {
... |
if (isIntLikeType(op2Box.getValue().getType())) {
final Type t1 = op1Box.getValue().getType();
if (isIntLikeType(t1)) {
return IntType.v();
}
final LongType tyLong = LongType.v();
if (tyLong.equals(t1)) {
return tyLong;
}
}
return UnknownType.v();
| 212 | 108 | 320 | <methods>public abstract int getPrecedence() ,public java.lang.String toString() <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GShrExpr.java | GShrExpr | getType | class GShrExpr extends AbstractGrimpIntLongBinopExpr implements ShrExpr {
public GShrExpr(Value op1, Value op2) {
super(op1, op2);
}
@Override
public String getSymbol() {
return " >> ";
}
@Override
public int getPrecedence() {
return 650;
}
@Override
public void apply(Switch sw) {
... |
if (isIntLikeType(op2Box.getValue().getType())) {
final Type t1 = op1Box.getValue().getType();
if (isIntLikeType(t1)) {
return IntType.v();
}
final LongType tyLong = LongType.v();
if (tyLong.equals(t1)) {
return tyLong;
}
}
return UnknownType.v();
| 212 | 108 | 320 | <methods>public abstract int getPrecedence() ,public java.lang.String toString() <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GUshrExpr.java | GUshrExpr | getType | class GUshrExpr extends AbstractGrimpIntLongBinopExpr implements UshrExpr {
public GUshrExpr(Value op1, Value op2) {
super(op1, op2);
}
@Override
public String getSymbol() {
return " >>> ";
}
@Override
public int getPrecedence() {
return 650;
}
@Override
public void apply(Switch sw) ... |
if (isIntLikeType(op2Box.getValue().getType())) {
final Type t1 = op1Box.getValue().getType();
if (isIntLikeType(t1)) {
return IntType.v();
}
final LongType tyLong = LongType.v();
if (tyLong.equals(t1)) {
return LongType.v();
}
}
return UnknownType.v();
... | 218 | 110 | 328 | <methods>public abstract int getPrecedence() ,public java.lang.String toString() <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/GVirtualInvokeExpr.java | GVirtualInvokeExpr | toString | class GVirtualInvokeExpr extends AbstractVirtualInvokeExpr implements Precedence {
public GVirtualInvokeExpr(Value base, SootMethodRef methodRef, List<? extends Value> args) {
super(Grimp.v().newObjExprBox(base), methodRef, new ValueBox[args.size()]);
final Grimp grmp = Grimp.v();
for (ListIterator<? ext... |
final Value base = getBase();
String baseString = base.toString();
if (base instanceof Precedence && ((Precedence) base).getPrecedence() < getPrecedence()) {
baseString = "(" + baseString + ")";
}
StringBuilder buf = new StringBuilder(baseString);
buf.append('.').append(methodRef.getSig... | 532 | 198 | 730 | <methods>public void apply(soot.util.Switch) ,public void convertToBaf(soot.jimple.JimpleToBafContext, List<soot.Unit>) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public java.lang.String toString() ,public void toString(soot.UnitPrinter) <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/internal/ObjExprBox.java | ObjExprBox | canContainValue | class ObjExprBox extends ExprBox {
public ObjExprBox(Value value) {
super(value);
}
@Override
public boolean canContainValue(Value value) {<FILL_FUNCTION_BODY>}
} |
return value instanceof ConcreteRef || value instanceof InvokeExpr || value instanceof NewArrayExpr
|| value instanceof NewMultiArrayExpr || value instanceof Local || value instanceof NullConstant
|| value instanceof StringConstant || value instanceof ClassConstant
|| (value instanceof Cast... | 65 | 76 | 141 | <methods>public void <init>(soot.Value) ,public boolean canContainValue(soot.Value) <variables> |
soot-oss_soot | soot/src/main/java/soot/grimp/toolkits/base/ConstructorFolder.java | ConstructorFolder | internalTransform | class ConstructorFolder extends BodyTransformer {
private static final Logger logger = LoggerFactory.getLogger(ConstructorFolder.class);
public ConstructorFolder(Singletons.Global g) {
}
public static ConstructorFolder v() {
return G.v().soot_grimp_toolkits_base_ConstructorFolder();
}
/** This method... |
GrimpBody body = (GrimpBody) b;
if (Options.v().verbose()) {
logger.debug("[" + body.getMethod().getName() + "] Folding constructors...");
}
Chain units = body.getUnits();
List<Unit> stmtList = new ArrayList<Unit>();
stmtList.addAll(units);
Iterator<Unit> it = stmtList.iterator();
... | 148 | 765 | 913 | <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/javaToJimple/AbstractJimpleBodyBuilder.java | AbstractJimpleBodyBuilder | ext | class AbstractJimpleBodyBuilder {
protected soot.jimple.JimpleBody body;
public void ext(AbstractJimpleBodyBuilder ext) {<FILL_FUNCTION_BODY>}
public AbstractJimpleBodyBuilder ext() {
if (ext == null) {
return this;
}
return ext;
}
private AbstractJimpleBodyBuilder ext = null;
public ... |
this.ext = ext;
if (ext.ext != null) {
throw new RuntimeException("Extensions created in wrong order.");
}
ext.base = this.base;
| 975 | 50 | 1,025 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/AnonClassInitMethodSource.java | AnonClassInitMethodSource | getBody | class AnonClassInitMethodSource extends soot.javaToJimple.PolyglotMethodSource {
private boolean hasOuterRef;
public void hasOuterRef(boolean b) {
hasOuterRef = b;
}
public boolean hasOuterRef() {
return hasOuterRef;
}
private boolean hasQualifier;
public void hasQualifier(boolean b) {
ha... |
AnonInitBodyBuilder aibb = new AnonInitBodyBuilder();
soot.jimple.JimpleBody body = aibb.createBody(sootMethod);
PackManager.v().getPack("jj").apply(body);
return body;
| 641 | 71 | 712 | <methods>public void <init>() ,public void <init>(polyglot.ast.Block, List#RAW) ,public void addAssertInits(soot.Body) ,public soot.Body getBody(soot.SootMethod, java.lang.String) ,public ArrayList<polyglot.ast.FieldDecl> getFieldInits() ,public ArrayList<soot.SootField> getFinalsList() ,public ArrayList<polyglot.ast.B... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/AnonConstructorFinder.java | AnonConstructorFinder | enter | class AnonConstructorFinder extends polyglot.visit.ContextVisitor {
private static final Logger logger = LoggerFactory.getLogger(AnonConstructorFinder.class);
public AnonConstructorFinder(polyglot.frontend.Job job, polyglot.types.TypeSystem ts, polyglot.ast.NodeFactory nf) {
super(job, ts, nf);
}
public p... |
if (n instanceof polyglot.ast.New && ((polyglot.ast.New) n).anonType() != null) {
try {
List<Type> argTypes = new ArrayList<Type>();
for (Iterator it = ((polyglot.ast.New) n).arguments().iterator(); it.hasNext();) {
argTypes.add(((polyglot.ast.Expr) it.next()).type());
}
... | 149 | 255 | 404 | <methods>public void <init>(polyglot.frontend.Job, polyglot.types.TypeSystem, polyglot.ast.NodeFactory) ,public polyglot.visit.NodeVisitor begin() ,public polyglot.types.Context context() ,public polyglot.visit.ContextVisitor context(polyglot.types.Context) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, po... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/AnonLocalClassInfo.java | AnonLocalClassInfo | toString | class AnonLocalClassInfo {
private boolean inStaticMethod;
private ArrayList<IdentityKey> finalLocalsAvail;
private ArrayList<IdentityKey> finalLocalsUsed;
public boolean inStaticMethod() {
return inStaticMethod;
}
public void inStaticMethod(boolean b) {
inStaticMethod = b;
}
public ArrayLis... |
StringBuffer sb = new StringBuffer();
sb.append("static: ");
sb.append(inStaticMethod);
sb.append(" finalLocalsAvail: ");
sb.append(finalLocalsAvail);
sb.append(" finalLocalsUsed: ");
sb.append(finalLocalsUsed);
return sb.toString();
| 227 | 87 | 314 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/AssertStmtChecker.java | AssertStmtChecker | override | class AssertStmtChecker extends polyglot.visit.NodeVisitor {
private boolean hasAssert = false;
public boolean isHasAssert() {
return hasAssert;
}
public AssertStmtChecker() {
}
public polyglot.ast.Node override(polyglot.ast.Node parent, polyglot.ast.Node n) {<FILL_FUNCTION_BODY>}
public polyglot... |
if ((n instanceof polyglot.ast.ClassDecl)
|| ((n instanceof polyglot.ast.New) && (((polyglot.ast.New) n).anonType() != null))) {
return n;
}
return null;
| 179 | 67 | 246 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/ClassLiteralChecker.java | ClassLiteralChecker | enter | class ClassLiteralChecker extends polyglot.visit.NodeVisitor {
private final ArrayList<Node> list;
public ArrayList<Node> getList() {
return list;
}
public ClassLiteralChecker() {
list = new ArrayList<Node>();
}
public polyglot.ast.Node override(polyglot.ast.Node parent, polyglot.ast.Node n) {
... |
if (n instanceof polyglot.ast.ClassLit) {
polyglot.ast.ClassLit lit = (polyglot.ast.ClassLit) n;
// only find ones where type is not primitive
if (!lit.typeNode().type().isPrimitive()) {
list.add(n);
}
}
return enter(n);
| 220 | 95 | 315 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/CommaJBB.java | CommaJBB | createAggressiveExpr | class CommaJBB extends AbstractJimpleBodyBuilder {
public CommaJBB() {
// ext(null);
// base(this);
}
/*
* protected soot.Value createExpr(polyglot.ast.Expr expr){ if (expr instanceof soot.javaToJimple.jj.ast.JjComma_c){ return
* getCommaLocal((soot.javaToJimple.jj.ast.JjComma_c)expr); } else { re... |
if (expr instanceof soot.javaToJimple.jj.ast.JjComma_c) {
return getCommaLocal((soot.javaToJimple.jj.ast.JjComma_c) expr);
} else {
return ext().createAggressiveExpr(expr, redAggr, revIfNec);
}
| 281 | 94 | 375 | <methods>public non-sealed void <init>() ,public void base(soot.javaToJimple.AbstractJimpleBodyBuilder) ,public soot.javaToJimple.AbstractJimpleBodyBuilder base() ,public void ext(soot.javaToJimple.AbstractJimpleBodyBuilder) ,public soot.javaToJimple.AbstractJimpleBodyBuilder ext() <variables>private soot.javaToJimple.... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/InnerClassInfoFinder.java | InnerClassInfoFinder | enter | class InnerClassInfoFinder extends polyglot.visit.NodeVisitor {
private final ArrayList<Node> localClassDeclList;
private final ArrayList<Node> anonBodyList;
private final ArrayList<Node> memberList;
// private ArrayList declaredInstList;
// private ArrayList usedInstList;
public ArrayList<Node> memberLis... |
if (n instanceof polyglot.ast.LocalClassDecl) {
localClassDeclList.add(n);
}
if (n instanceof polyglot.ast.New) {
if (((polyglot.ast.New) n).anonType() != null) {
anonBodyList.add(n);
}
/*
* polyglot.types.ProcedureInstance pi = ((polyglot.ast.New)n).constructorInsta... | 316 | 606 | 922 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/JavaToJimple.java | JavaToJimple | initExtInfo | class JavaToJimple {
public static final polyglot.frontend.Pass.ID CAST_INSERTION = new polyglot.frontend.Pass.ID("cast-insertion");
public static final polyglot.frontend.Pass.ID STRICTFP_PROP = new polyglot.frontend.Pass.ID("strictfp-prop");
public static final polyglot.frontend.Pass.ID ANON_CONSTR_FINDER = new... |
Set<String> source = new HashSet<String>();
ExtensionInfo extInfo = new soot.javaToJimple.jj.ExtensionInfo() {
public List passes(Job job) {
List passes = super.passes(job);
// beforePass(passes, Pass.EXIT_CHECK, new VisitorPass(polyglot.frontend.Pass.FOLD, job, new
// polyglot.v... | 653 | 503 | 1,156 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/MethodFinalsChecker.java | MethodFinalsChecker | override | class MethodFinalsChecker extends polyglot.visit.NodeVisitor {
private final ArrayList<IdentityKey> inners;
private final ArrayList<IdentityKey> finalLocals;
private final HashMap<IdentityKey, ArrayList<IdentityKey>> typeToLocalsUsed;
private final ArrayList<Node> ccallList;
public HashMap<IdentityKey, Arra... |
if (n instanceof polyglot.ast.LocalClassDecl) {
inners.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalClassDecl) n).decl().type()));
polyglot.ast.ClassBody localClassBody = ((polyglot.ast.LocalClassDecl) n).decl().body();
LocalUsesChecker luc = new LocalUsesChecker();
localClassBody.... | 599 | 346 | 945 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/NestedClassListBuilder.java | NestedClassListBuilder | enter | class NestedClassListBuilder extends polyglot.visit.NodeVisitor {
private final ArrayList<Node> classDeclsList;
private final ArrayList<Node> anonClassBodyList;
private final ArrayList<Node> nestedUsedList;
public ArrayList<Node> getClassDeclsList() {
return classDeclsList;
}
public ArrayList<Node> g... |
if (n instanceof polyglot.ast.New) {
if ((((polyglot.ast.New) n).anonType() != null) && (((polyglot.ast.New) n).body() != null)) {
anonClassBodyList.add(n);
} else if (((polyglot.types.ClassType) ((polyglot.ast.New) n).objectType().type()).isNested()) {
nestedUsedList.add(n);
}
... | 240 | 203 | 443 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/PrivateFieldSetMethodSource.java | PrivateFieldSetMethodSource | getBody | class PrivateFieldSetMethodSource implements soot.MethodSource {
private final soot.Type fieldType;
private final String fieldName;
private final boolean isStatic;
public PrivateFieldSetMethodSource(soot.Type fieldType, String fieldName, boolean isStatic) {
this.fieldType = fieldType;
this.fieldName =... |
soot.Body body = soot.jimple.Jimple.v().newBody(sootMethod);
LocalGenerator lg = Scene.v().createLocalGenerator(body);
soot.Local fieldBase = null;
soot.Local assignLocal = null;
// create parameters
int paramCounter = 0;
Iterator paramIt = sootMethod.getParameterTypes().iterator();
w... | 141 | 559 | 700 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/PrivateInstancesAvailable.java | PrivateInstancesAvailable | leave | class PrivateInstancesAvailable extends polyglot.visit.NodeVisitor {
private final ArrayList<IdentityKey> list;
public ArrayList<IdentityKey> getList() {
return list;
}
public PrivateInstancesAvailable() {
list = new ArrayList<IdentityKey>();
}
public polyglot.ast.Node leave(polyglot.ast.Node ol... |
if (n instanceof polyglot.ast.FieldDecl) {
polyglot.types.FieldInstance fi = ((polyglot.ast.FieldDecl) n).fieldInstance();
if (fi.flags().isPrivate()) {
list.add(new polyglot.util.IdentityKey(fi));
}
}
if (n instanceof polyglot.ast.ProcedureDecl) {
polyglot.types.Procedu... | 133 | 175 | 308 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/PrivateMethodAccMethodSource.java | PrivateMethodAccMethodSource | isCallParamType | class PrivateMethodAccMethodSource implements soot.MethodSource {
public PrivateMethodAccMethodSource(polyglot.types.MethodInstance methInst) {
this.methodInst = methInst;
}
private polyglot.types.MethodInstance methodInst;
public void setMethodInst(polyglot.types.MethodInstance mi) {
methodInst = mi... |
Iterator it = methodInst.formalTypes().iterator();
while (it.hasNext()) {
soot.Type compareType = Util.getSootType((polyglot.types.Type) it.next());
if (compareType.equals(sootType)) {
return true;
}
}
return false;
| 979 | 86 | 1,065 | <no_super_class> |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/ReturnStmtChecker.java | ReturnStmtChecker | leave | class ReturnStmtChecker extends polyglot.visit.NodeVisitor {
private boolean hasReturn;
public boolean hasRet() {
return hasReturn;
}
public ReturnStmtChecker() {
hasReturn = false;
}
public polyglot.ast.Node leave(polyglot.ast.Node old, polyglot.ast.Node n, polyglot.visit.NodeVisitor visitor) {... |
if (n instanceof polyglot.ast.Return) {
hasReturn = true;
}
return n;
| 124 | 34 | 158 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/SaveASTVisitor.java | SaveASTVisitor | run | class SaveASTVisitor extends polyglot.frontend.AbstractPass {
private polyglot.frontend.Job job;
private polyglot.frontend.ExtensionInfo extInfo;
public SaveASTVisitor(polyglot.frontend.Pass.ID id, polyglot.frontend.Job job, polyglot.frontend.ExtensionInfo extInfo) {
super(id);
this.job = job;
this.... |
if (extInfo instanceof soot.javaToJimple.jj.ExtensionInfo) {
soot.javaToJimple.jj.ExtensionInfo jjInfo = (soot.javaToJimple.jj.ExtensionInfo) extInfo;
if (jjInfo.sourceJobMap() == null) {
jjInfo.sourceJobMap(new HashMap<Source, Job>());
}
jjInfo.sourceJobMap().put(job.source(), job)... | 139 | 134 | 273 | <methods>public void <init>(polyglot.frontend.Pass.ID) ,public long exclusiveTime() ,public polyglot.frontend.Pass.ID id() ,public long inclusiveTime() ,public java.lang.String name() ,public void resetTimers() ,public abstract boolean run() ,public java.lang.String toString() ,public void toggleTimers(boolean) <variab... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/StrictFPPropagator.java | StrictFPPropagator | leave | class StrictFPPropagator extends polyglot.visit.NodeVisitor {
boolean strict = false;
public StrictFPPropagator(boolean val) {
strict = val;
}
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent, polyglot.ast.Node n) {
if (n instanceof polyglot.ast.ClassDecl) {
if (((polyglot.ast.C... |
if (n instanceof polyglot.ast.MethodDecl) {
polyglot.ast.MethodDecl decl = (polyglot.ast.MethodDecl) n;
if (strict && !decl.flags().isAbstract() && !decl.flags().isStrictFP()) {
// System.out.println("changing method decl "+decl);
decl = decl.flags(decl.flags().StrictFP());
// ... | 396 | 382 | 778 | <methods>public void <init>() ,public polyglot.visit.NodeVisitor begin() ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node) ,public polyglot.visit.NodeVisitor enter(polyglot.ast.Node, polyglot.ast.Node) ,public void finish() ,public void finish(polyglot.ast.Node) ,public polyglot.ast.Node leave(polyglot.ast.No... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/jj/ast/JjAccessField_c.java | JjAccessField_c | toString | class JjAccessField_c extends Expr_c implements Expr {
private Call getMeth;
private Call setMeth;
private Field field;
public JjAccessField_c(Position pos, Call getMeth, Call setMeth, Field field) {
super(pos);
this.getMeth = getMeth;
this.setMeth = setMeth;
this.field = field;
}
public ... |
return field + " " + getMeth + " " + setMeth;
| 287 | 22 | 309 | <methods>public void <init>(polyglot.util.Position) ,public boolean booleanValue() ,public polyglot.ast.Node buildTypes(polyglot.visit.TypeBuilder) throws polyglot.types.SemanticException,public byte byteValue() ,public char charValue() ,public java.lang.Object constantValue() ,public double doubleValue() ,public void ... |
soot-oss_soot | soot/src/main/java/soot/javaToJimple/jj/ast/JjArrayAccessAssign_c.java | JjArrayAccessAssign_c | childExpectedType | class JjArrayAccessAssign_c extends ArrayAccessAssign_c {
public JjArrayAccessAssign_c(Position pos, ArrayAccess left, Operator op, Expr right) {
super(pos, left, op, right);
}
public Type childExpectedType(Expr child, AscriptionVisitor av) {<FILL_FUNCTION_BODY>}
} |
if (op == SHL_ASSIGN || op == SHR_ASSIGN || op == USHR_ASSIGN) {
return child.type();
}
if (child == right) {
return left.type();
}
return child.type();
| 95 | 71 | 166 | <methods>public void <init>(polyglot.util.Position, polyglot.ast.ArrayAccess, polyglot.ast.Assign.Operator, polyglot.ast.Expr) ,public polyglot.ast.Term entry() ,public polyglot.ast.Assign left(polyglot.ast.Expr) ,public List#RAW throwTypes(polyglot.types.TypeSystem) ,public boolean throwsArrayStoreException() <variabl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.