@@ -569,7 +569,11 @@ private void patchCode(Body body) {
569569 if (config .isPatchInvokeDynamicInstructions ()) {
570570 patchDynamicInvokeInstructions (body );
571571 }
572- FlowDroidLocalSplitter .v ().transform (body );
572+ getLocalSplitter ().transform (body );
573+ }
574+
575+ protected FlowDroidLocalSplitter getLocalSplitter () {
576+ return FlowDroidLocalSplitter .v ();
573577 }
574578
575579 /**
@@ -956,7 +960,7 @@ protected void runAnalysis(final ISourceSinkManager sourcesSinks, final Set<Stri
956960 }
957961 }
958962
959- private void unsplitAllBodies () {
963+ protected void unsplitAllBodies () {
960964 for (SootClass sc : Scene .v ().getClasses ()) {
961965 for (SootMethod m : sc .getMethods ()) {
962966 if (m .hasActiveBody ()) {
@@ -987,11 +991,12 @@ private void unsplitAllBodies() {
987991 //can be a problem for FlowDroid. So, we split the locals prior to
988992 //running FlowDroid.
989993 protected void splitAllBodies (Iterator <? extends MethodOrMethodContext > it ) {
990- FlowDroidLocalSplitter splitter = FlowDroidLocalSplitter . v ();
994+ FlowDroidLocalSplitter splitter = getLocalSplitter ();
991995 while (it .hasNext ()) {
992996 MethodOrMethodContext mc = it .next ();
993997 SootMethod m = mc .method ();
994- if (m .isConcrete ()) {
998+ if (m .isConcrete () && m .getTag (SplittedTag .NAME ) == null ) {
999+ m .addTag (SplittedTag .v ());
9951000 splitter .transform (m .retrieveActiveBody ());
9961001 }
9971002 }
0 commit comments