@@ -64,7 +64,7 @@ public Thread newThread(Runnable r) {
6464 return executor ;
6565 }
6666
67- private enum PathProcessingResult {
67+ protected enum PathProcessingResult {
6868 // Describes that the predecessor should be queued
6969 NEW ,
7070 // Describes that the predecessor was already queued, but we might need to merge paths
@@ -111,7 +111,7 @@ private void processAndQueue(Abstraction pred, SourceContextAndPath scap) {
111111 case NEW :
112112 // Schedule the predecessor
113113 assert pathCache .containsKey (pred );
114- scheduleDependentTask (new SourceFindingTask (pred ));
114+ scheduleDependentTask (createSourceFindingTask (pred ));
115115 break ;
116116 case CACHED :
117117 // In case we already know the subpath, we do append the path after the path
@@ -128,7 +128,7 @@ private void processAndQueue(Abstraction pred, SourceContextAndPath scap) {
128128 }
129129 }
130130
131- private PathProcessingResult processPredecessor (SourceContextAndPath scap , Abstraction pred ) {
131+ protected PathProcessingResult processPredecessor (SourceContextAndPath scap , Abstraction pred ) {
132132 // Shortcut: If this a call-to-return node, we should not enter and
133133 // immediately leave again for performance reasons.
134134 if (pred .getCurrentStmt () != null && pred .getCurrentStmt () == pred .getCorrespondingCallSite ()) {
@@ -172,6 +172,7 @@ private PathProcessingResult processPredecessor(SourceContextAndPath scap, Abstr
172172 if (existingPaths != null && existingPaths .size () > maxPaths )
173173 return PathProcessingResult .INFEASIBLE_OR_MAX_PATHS_REACHED ;
174174 }
175+
175176 return pathCache .put (pred , extendedScap ) ? PathProcessingResult .NEW : PathProcessingResult .CACHED ;
176177 }
177178
@@ -327,11 +328,15 @@ protected Runnable getTaintPathTask(final AbstractionAtSink abs) {
327328
328329 if (pathCache .put (abs .getAbstraction (), scap )) {
329330 if (!checkForSource (abs .getAbstraction (), scap ))
330- return new SourceFindingTask (abs .getAbstraction ());
331+ return createSourceFindingTask (abs .getAbstraction ());
331332 }
332333 return null ;
333334 }
334335
336+ protected Runnable createSourceFindingTask (Abstraction abstraction ) {
337+ return new SourceFindingTask (abstraction );
338+ }
339+
335340 @ Override
336341 public InfoflowResults getResults () {
337342 return this .results ;
0 commit comments