public final String toString() { return getString(); }
String[] split = subSig.getString().replaceAll("(.*) (.*)\\((.*)\\)", "$1;$2;$3").split(";");
switch (methodRef.declaringClass().getName()) { case "java.lang.reflect.Method": if (methodRef.getSubSignature().getString() .equals("java.lang.Object invoke(java.lang.Object,java.lang.Object[])")) { reflectionModel.methodInvoke(source, s); if (methodRef.getSubSignature().getString().equals("java.lang.Object newInstance()")) { reflectionModel.classNewInstance(source, s); if (methodRef.getSubSignature().getString().equals("java.lang.Object newInstance(java.lang.Object[])")) { reflectionModel.contructorNewInstance(source, s);
SootMethodRef smr = sie.getMethodRef(); if (sie.getBase().equivTo(thisLocal) && smr.declaringClass().getName().equals(originalSuperclass.getName()) && smr.getSubSignature().getString().startsWith("void " + constructorName)) { SootMethod newSuperInit; if (!mediatingClass.declaresMethod(constructorName, smr.parameterTypes())) {
public final String toString() { return getString(); } public final String getString() {
public final String toString() { return getString(); } public final String getString() {
/** * Checks whether this invocation calls Android's Activity.setContentView method * * @param inv * The invocaton to check * @return True if this invocation calls setContentView, otherwise false */ protected boolean invokesSetContentView(InvokeExpr inv) { String methodName = SootMethodRepresentationParser.v() .getMethodNameFromSubSignature(inv.getMethodRef().getSubSignature().getString()); if (!methodName.equals("setContentView")) return false; // In some cases, the bytecode points the invocation to the current // class even though it does not implement setContentView, instead // of using the superclass signature SootClass curClass = inv.getMethod().getDeclaringClass(); while (curClass != null) { if (curClass.getName().equals("android.app.Activity") || curClass.getName().equals("android.support.v7.app.ActionBarActivity") || curClass.getName().equals("android.support.v7.app.AppCompatActivity")) return true; if (curClass.declaresMethod("void setContentView(int)")) return false; curClass = curClass.hasSuperclass() ? curClass.getSuperclass() : null; } return false; }
/** * Checks whether this invocation calls Android's LayoutInflater.inflate method * * @param inv * The invocaton to check * @return True if this invocation calls inflate, otherwise false */ protected boolean invokesInflate(InvokeExpr inv) { String methodName = SootMethodRepresentationParser.v() .getMethodNameFromSubSignature(inv.getMethodRef().getSubSignature().getString()); if (!methodName.equals("inflate")) return false; // In some cases, the bytecode points the invocation to the current // class even though it does not implement setContentView, instead // of using the superclass signature SootClass curClass = inv.getMethod().getDeclaringClass(); while (curClass != null) { if (curClass.getName().equals("android.app.Fragment")) return true; if (curClass.declaresMethod("android.view.View inflate(int,android.view.ViewGroup,boolean)")) return false; curClass = curClass.hasSuperclass() ? curClass.getSuperclass() : null; } return false; }
final String subSig = stmt.getInvokeExpr().getMethodRef().getSubSignature().getString(); boolean taintEqualsHashCode = alwaysModelEqualsHashCode && (subSig.equals("boolean equals(java.lang.Object)") || subSig.equals("int hashCode()"));