public boolean wantArrayField(AllocDotField df) { return allocDotFieldToLocal.containsKey(df); }
public boolean wantInvokeArg(Local receiver) { return invokeArgsToInvokeSite.containsKey(receiver); }
public void addInvokeArgType(AllocDotField df, Context context, Type type) { if (!allocDotFieldToLocal.containsKey(df)) { return; } for (Local l : allocDotFieldToLocal.get(df)) { addInvokeArgType(l, context, type); } }
&& (!invokeArgsToSize.containsKey(ics.argArray()) || !reachingArgTypes.containsKey(ics.argArray())))) { for (Type bType : resolveToClasses(s)) { assert bType instanceof RefType;
/** * Adds a callback method found in an XML file to the result set * * @param layoutFile * The XML file in which the callback has been found * @param callback * The callback found in the given XML file */ private void addCallbackMethod(String layoutFile, String callback) { layoutFile = layoutFile.replace("/layout-large/", "/layout/"); callbackMethods.put(layoutFile, callback); // Recursively process any dependencies we might have collected before // we have processed the target if (includeDependencies.containsKey(layoutFile)) for (String target : includeDependencies.get(layoutFile)) addCallbackMethod(target, callback); }
/** For an interface parent (MUST be an interface), returns set of all * subinterfaces. */ protected Set getAllSubinterfaces( SootClass parent ) { parent.checkLevel(SootClass.HIERARCHY); if( !interfaceToAllSubinterfaces.containsKey( parent ) ) { interfaceToAllSubinterfaces.put( parent, parent ); for( Iterator it = interfaceToSubinterfaces.get( parent ).iterator(); it.hasNext(); ) { interfaceToAllSubinterfaces.putAll(parent, getAllSubinterfaces( (SootClass) it.next() ) ); } } return interfaceToAllSubinterfaces.get( parent ); }
/** For an interface parent (MUST be an interface), returns set of all * subinterfaces. */ protected Set getAllSubinterfaces( SootClass parent ) { parent.checkLevel(SootClass.HIERARCHY); if( !interfaceToAllSubinterfaces.containsKey( parent ) ) { interfaceToAllSubinterfaces.put( parent, parent ); for( Iterator it = interfaceToSubinterfaces.get( parent ).iterator(); it.hasNext(); ) { interfaceToAllSubinterfaces.putAll(parent, getAllSubinterfaces( (SootClass) it.next() ) ); } } return interfaceToAllSubinterfaces.get( parent ); }
/** * Adds a fragment found in an XML file to the result set * * @param layoutFile * The XML file in which the fragment has been found * @param fragment * The fragment found in the given XML file */ private void addFragment(String layoutFile, SootClass fragment) { // Do not add null fragments if (fragment == null) return; layoutFile = layoutFile.replace("/layout-large/", "/layout/"); fragments.put(layoutFile, fragment); // Recursively process any dependencies we might have collected before // we have processed the target if (includeDependencies.containsKey(layoutFile)) for (String target : includeDependencies.get(layoutFile)) addFragment(target, fragment); }
/** For an interface parent (MUST be an interface), returns set of all * implementers of it but NOT their subclasses. */ public Set getAllImplementersOfInterface( SootClass parent ) { parent.checkLevel(SootClass.HIERARCHY); if( !interfaceToAllImplementers.containsKey( parent ) ) { for( Iterator subinterfaceIt = getAllSubinterfaces( parent ).iterator(); subinterfaceIt.hasNext(); ) { final SootClass subinterface = (SootClass) subinterfaceIt.next(); if( subinterface == parent ) continue; interfaceToAllImplementers.putAll(parent, getAllImplementersOfInterface( subinterface ) ); } interfaceToAllImplementers.putAll(parent, interfaceToImplementers.get( parent ) ); } return interfaceToAllImplementers.get( parent ); }
/** For an interface parent (MUST be an interface), returns set of all * implementers of it but NOT their subclasses. */ public Set getAllImplementersOfInterface( SootClass parent ) { parent.checkLevel(SootClass.HIERARCHY); if( !interfaceToAllImplementers.containsKey( parent ) ) { for( Iterator subinterfaceIt = getAllSubinterfaces( parent ).iterator(); subinterfaceIt.hasNext(); ) { final SootClass subinterface = (SootClass) subinterfaceIt.next(); if( subinterface == parent ) continue; interfaceToAllImplementers.putAll(parent, getAllImplementersOfInterface( subinterface ) ); } interfaceToAllImplementers.putAll(parent, interfaceToImplementers.get( parent ) ); } return interfaceToAllImplementers.get( parent ); }
s.addAll( classToSubclasses.get( c ) ); if( interfaceToSubinterfaces.containsKey( c ) ) { s.addAll( interfaceToSubinterfaces.get( c ) ); if( interfaceToImplementers.containsKey( c ) ) { s.addAll( interfaceToImplementers.get( c ) );
s.addAll( classToSubclasses.get( c ) ); if( interfaceToSubinterfaces.containsKey( c ) ) { s.addAll( interfaceToSubinterfaces.get( c ) ); if( interfaceToImplementers.containsKey( c ) ) { s.addAll( interfaceToImplementers.get( c ) );
s.addAll( classToSubclasses.get( c ) ); if( interfaceToSubinterfaces.containsKey( c ) ) { s.addAll( interfaceToSubinterfaces.get( c ) ); if( interfaceToImplementers.containsKey( c ) ) { s.addAll( interfaceToImplementers.get( c ) );
s.addAll( classToSubclasses.get( c ) ); if( interfaceToSubinterfaces.containsKey( c ) ) { s.addAll( interfaceToSubinterfaces.get( c ) ); if( interfaceToImplementers.containsKey( c ) ) { s.addAll( interfaceToImplementers.get( c ) );
if (callbackMethods.containsKey(targetFile)) for (String callback : callbackMethods.get(targetFile)) addCallbackMethod(layoutFile, callback);
if (extensionToFile.containsKey(".xml")) { stubDroidWrapper = TaintWrapperFactory.createTaintWrapper(extensionToFile.get(".xml")); wrapperSet.addWrapper(stubDroidWrapper);
if (!this.callbackFunctions.containsKey(currentClass)) return false;
if (!this.callbackFunctions.containsKey(applicationClass)) return; if (activityLifecycleCallbacks.containsKey(sc)) if (AndroidEntryPointConstants.getActivityLifecycleCallbackMethods().contains(subSig)) continue;
if (!this.callbackFunctions.containsKey(applicationClass)) return; if (activityLifecycleCallbacks.containsKey(sc)) if (AndroidEntryPointConstants.getActivityLifecycleCallbackMethods().contains(subSig)) continue;
boolean hasCallbacks = this.callbackFunctions.containsKey(currentClass); if (hasMethodsToInvoke || hasCallbacks) { NopStmt startWhileStmt = Jimple.v().newNopStmt();