public String toString() { return "dae<" + sc.toString() + ">"; } }
public String toString() { return "<new static lock in " + sc.toString() + ">"; } }
@Override public boolean want(SootMethod method) { // could be optimized with HashSet.... String c = method.getDeclaringClass().toString(); String m = method.getName(); for (String[] element : PurityInterproceduralAnalysis.pureMethods) { if (m.equals(element[1]) && c.startsWith(element[0])) { return false; } } for (String[] element : PurityInterproceduralAnalysis.impureMethods) { if (m.equals(element[1]) && c.startsWith(element[0])) { return false; } } for (String[] element : PurityInterproceduralAnalysis.alterMethods) { if (m.equals(element[1]) && c.startsWith(element[0])) { return false; } } return true; } }
public String toString() { StringBuffer b = new StringBuffer(); /* * Print out constructor first */ if (davaBody != null) { InstanceInvokeExpr constructorExpr = davaBody.get_ConstructorExpr(); if (constructorExpr != null) { if (davaBody.getMethod().getDeclaringClass().getName() .equals(constructorExpr.getMethodRef().declaringClass().toString())) { b.append(" this("); } else { b.append(" super("); } boolean isFirst = true; for (Value val : constructorExpr.getArgs()) { if (!isFirst) { b.append(", "); } b.append(val.toString()); isFirst = false; } b.append(");\n\n"); } } // print out the remaining body b.append(body_toString(body)); return b.toString(); }
private void javafy_new_expr(ValueBox vb) { NewExpr ne = (NewExpr) vb.getValue(); String className = ne.getBaseType().getSootClass().toString(); String packageName = ne.getBaseType().getSootClass().getJavaPackageName(); String classPackageName = packageName; if (className.lastIndexOf('.') > 0) { // 0 doesnt make sense classPackageName = className.substring(0, className.lastIndexOf('.')); } if (!packageName.equals(classPackageName)) { throw new DecompilationException("Unable to retrieve package name for identifier. Please report to developer."); } addToImportList(className); }
+ (mhpself ? " [called from >= 2 threads]" : " [called from <= 1 thread]")); logger.debug( "[transaction-table] Where: " + tn.method.getDeclaringClass().toString() + ":" + tn.method.toString() + ": "); logger.debug("[transaction-table] Orig : " + tn.origLock); logger.debug("[transaction-table] Prep : " + tn.prepStmt);
/** * @return * * @see PurityGraph.conservativeGraph * @see PurityGraph.freshGraph */ @Override protected PurityGraphBox summaryOfUnanalysedMethod(SootMethod method) { PurityGraphBox b = new PurityGraphBox(); String c = method.getDeclaringClass().toString(); String m = method.getName(); // impure with side-effect, unless otherwise specified b.g = PurityGraph.conservativeGraph(method, true); for (String[] element : PurityInterproceduralAnalysis.pureMethods) { if (m.equals(element[1]) && c.startsWith(element[0])) { b.g = PurityGraph.freshGraph(method); } } for (String[] element : PurityInterproceduralAnalysis.alterMethods) { if (m.equals(element[1]) && c.startsWith(element[0])) { b.g = PurityGraph.conservativeGraph(method, false); } } return b; }
public void type(Type t) { handleIndent(); if (t instanceof RefType) { String name = ((RefType) t).getSootClass().getJavaStyleName(); /* * March 30th 2006, Nomair Adding check to check that the fully qualified name can actually be removed */ if (!name.equals(((RefType) t).getSootClass().toString())) { // means javaStyle name is probably shorter check that there is no class clash in imports for this // System.out.println(">>>>Type is"+t.toString()); // System.out.println(">>>>Name is"+name); name = RemoveFullyQualifiedName.getReducedName(body.getImportList(), ((RefType) t).getSootClass().toString(), t); } output.append(name); } else if (t instanceof ArrayType) { ((ArrayType) t).toString(this); } else { output.append(t.toString()); } }
if (stmt.containsInvokeExpr() && stmt.getInvokeExpr().getMethod().getDeclaringClass().toString().startsWith("java.") && stmtRead != null && stmtWrite != null) { if (stmtRead.size() < 25 && stmtWrite.size() < 25) {
logger.debug(" Found local/shared fields for " + sootClass.toString()); logger.debug(" Local fields: "); Iterator<SootField> localsToPrintIt = localFields.iterator();
importList.add(superClass.toString()); String interfacePackage = ((SootClass) interfaceIt.next()).toString(); String thrownPackage = eit.next().toString(); if (!importList.contains(thrownPackage)) { importList.add(thrownPackage); String paramPackage = ((RefType) t).getSootClass().toString(); String returnPackage = ((RefType) t).getSootClass().toString(); String fieldPackage = ((RefType) t).getSootClass().toString(); if (cl.toString().equals(temp)) { continue;
boolean printCloseBrace = true; if (davaBody.getMethod().getDeclaringClass().getName() .equals(constructorExpr.getMethodRef().declaringClass().toString())) { dup.printString(" this("); } else {
private void javafy_invoke_expr(ValueBox vb) { InvokeExpr ie = (InvokeExpr) vb.getValue(); String className = ie.getMethodRef().declaringClass().toString(); String packageName = ie.getMethodRef().declaringClass().getJavaPackageName(); String classPackageName = packageName; className = rt.getSootClass().toString(); packageName = rt.getSootClass().getJavaPackageName(); } else { SootMethodRef methodRef = sie.getMethodRef(); className = methodRef.declaringClass().toString(); packageName = methodRef.declaringClass().getJavaPackageName();
String className = fieldRef.declaringClass().toString(); String packageName = fieldRef.declaringClass().getJavaPackageName();
if (((InnerClassTag) t).getInnerClass().replaceAll("/", ".").equals(sc.toString())) { sc.addTag(t);
RefType rt = (RefType) t; String className = rt.getSootClass().toString(); String packageName = rt.getSootClass().getJavaPackageName();