From 9906e0fd004aed9c957db77f05c59416818e4e3e Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Wed, 15 Nov 2023 11:55:45 -0500 Subject: [PATCH] Simplify side-effects algorithm. --- .../edu/cuny/hunter/hybridize/core/analysis/Function.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java index c3df9ec1..1a75f48a 100644 --- a/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java +++ b/edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java @@ -513,12 +513,8 @@ private static boolean allCreationsWithinClosureInteral2(MethodReference methodR CGNode next = succNodes.next(); MethodReference reference = next.getMethod().getReference(); - if (!seen.contains(reference)) { - seen.add(reference); - - if (allCreationsWithinClosureInteral(reference, instanceKey, callGraph, seen)) - return true; - } + if (!seen.contains(reference) && allCreationsWithinClosureInteral(reference, instanceKey, callGraph, seen)) + return true; } return false;