package uk.ac.cam.gpe21.droidssl.analysis.trans;

import soot.Body;
import soot.SootClass;
import soot.SootMethod;
import uk.ac.cam.gpe21.droidssl.analysis.Vulnerability;
import uk.ac.cam.gpe21.droidssl.analysis.VulnerabilityState;
import uk.ac.cam.gpe21.droidssl.analysis.tag.HostnameVerifierTag;
import uk.ac.cam.gpe21.droidssl.analysis.util.Types;

import java.util.List;

public final class KnownVulnerableClassAnalyser extends IntraProceduralAnalyser {
	public KnownVulnerableClassAnalyser(List<Vulnerability> vulnerabilities) {
		super(vulnerabilities);
	}

	@Override
	protected void analyse(SootClass clazz, SootMethod method, Body body) {
		if (clazz.getType().equals(Types.ALLOW_ALL_HOSTNAME_VERIFIER)) {
			clazz.addTag(new HostnameVerifierTag(VulnerabilityState.VULNERABLE));
		}
	}
}

@@ -55,20 +55,21 @@
 rt soot.
-Body
+Scene
 ;%0Aimport
@@ -89,32 +89,8 @@
 ss;%0A
-import soot.SootMethod;%0A
 impo
@@ -406,23 +406,8 @@
 nds 
-IntraProcedural
 Anal
@@ -536,16 +536,13 @@
 e%0A%09p
-rotected
+ublic
  voi
@@ -551,16 +551,22 @@
 analyse(
+) %7B%0A%09%09
 SootClas
@@ -576,69 +576,32 @@
 lazz
-, SootMethod method, Body body) %7B%0A%09%09if (clazz.getType().equal
+ = Scene.v().getSootClas
 s(Ty
@@ -635,14 +635,26 @@
 FIER
-)) %7B%0A%09
+.getClassName());%0A
 %09%09cl
@@ -725,12 +725,8 @@
 ));%0A
-%09%09%7D%0A
 %09%7D%0A%7D

Fix KnownVulnerableClassAnalyser.