This commit is contained in:
2026-07-06 18:05:41 +02:00
parent 89736a4aa1
commit e3dd26c0d4
3 changed files with 4 additions and 9 deletions

View File

@@ -53,9 +53,6 @@ public class TriggerPoint {
this.eventTypeFqn = eventTypeFqn; this.eventTypeFqn = eventTypeFqn;
this.event = qualifyEvent(event, eventTypeFqn); this.event = qualifyEvent(event, eventTypeFqn);
if (polymorphicEvents != null) { if (polymorphicEvents != null) {
if (polymorphicEvents.contains("CustomEvents.ALPHA")) {
new Exception("DEBUG TriggerPoint constructed with CustomEvents.ALPHA!").printStackTrace(System.out);
}
this.polymorphicEvents = polymorphicEvents.stream() this.polymorphicEvents = polymorphicEvents.stream()
.map(pe -> qualifyEvent(pe, eventTypeFqn)) .map(pe -> qualifyEvent(pe, eventTypeFqn))
.collect(java.util.stream.Collectors.toList()); .collect(java.util.stream.Collectors.toList());
@@ -67,7 +64,6 @@ public class TriggerPoint {
} }
private static String qualifyEvent(String e, String eventTypeFqn) { private static String qualifyEvent(String e, String eventTypeFqn) {
System.out.println("qualifyEvent e=" + e + " eventTypeFqn=" + eventTypeFqn);
if (e == null || eventTypeFqn == null || e.isEmpty()) { if (e == null || eventTypeFqn == null || e.isEmpty()) {
return e; return e;
} }

View File

@@ -96,9 +96,9 @@ public class ConstantResolver {
// Fallback for unresolved AST nodes // Fallback for unresolved AST nodes
if (mi.getExpression() instanceof QualifiedName qn) { if (mi.getExpression() instanceof QualifiedName qn) {
System.out.println("RETURNING qn name: " + qn.getName().getIdentifier()); return qn.getName().getIdentifier(); return qn.getName().getIdentifier();
} else if (mi.getExpression() instanceof SimpleName sn) { } else if (mi.getExpression() instanceof SimpleName sn) {
System.out.println("RETURNING sn name: " + sn.getIdentifier()); return sn.getIdentifier(); return sn.getIdentifier();
} }
} }

View File

@@ -9,7 +9,7 @@ import java.util.*;
@Slf4j @Slf4j
public class CallGraphPathFinder { public class CallGraphPathFinder {
private final CodebaseContext context; private final CodebaseContext context;
private final Map<String, Boolean> heuristicCache = new HashMap<>(); private final Map<java.util.Map.Entry<String, String>, Boolean> heuristicCache = new HashMap<>();
public CallGraphPathFinder(CodebaseContext context) { public CallGraphPathFinder(CodebaseContext context) {
this.context = context; this.context = context;
@@ -169,7 +169,7 @@ public class CallGraphPathFinder {
if (neighbor == null || target == null) return false; if (neighbor == null || target == null) return false;
if (neighbor.equals(target)) return true; if (neighbor.equals(target)) return true;
String cacheKey = neighbor + "|" + target; java.util.Map.Entry<String, String> cacheKey = new java.util.AbstractMap.SimpleImmutableEntry<>(neighbor, target);
Boolean cached = heuristicCache.get(cacheKey); Boolean cached = heuristicCache.get(cacheKey);
if (cached != null) return cached; if (cached != null) return cached;
@@ -179,7 +179,6 @@ public class CallGraphPathFinder {
} }
private boolean calculateHeuristicMatch(String neighbor, String target) { private boolean calculateHeuristicMatch(String neighbor, String target) {
System.out.println("calculateHeuristicMatch: neighbor=" + neighbor + ", target=" + target);
if (neighbor.equals(target)) return true; if (neighbor.equals(target)) return true;
if (isFullyQualifiedMethod(neighbor) && isFullyQualifiedMethod(target)) { if (isFullyQualifiedMethod(neighbor) && isFullyQualifiedMethod(target)) {