From 5ed6a4617a2d0aaaf2662fa10649e92fedd60d30 Mon Sep 17 00:00:00 2001 From: AluAli Date: Tue, 22 Dec 2020 16:11:24 +0100 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java --- .../FamilyOfGeneratedGenerics.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java index 71b4886b..50170cdf 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java @@ -197,21 +197,22 @@ public class FamilyOfGeneratedGenerics { * {R' <. S | (R <. R') \in cs_m, (S <. S') \in cs_cl and (R',S) is in the transitive closure of cs} */ - public static List secondTransitiveSubtypeForMethodTypes(List allConstraints, List cs_m, HashMap> posOfTphs) { + public static List secondTransitiveSubtypeForMethodTypes(List allConstraints, List cs_cl, List cs_m, HashMap> posOfTphs) { //TODO: List tempCC= new ArrayList<>(); List tcOfCs = buildTransitiveClosure(allConstraints); - for(MethodConstraint mC1 : cs_m) { - for(MethodConstraint mC2 : cs_m) { - String rightSide = mC1.getRight(); - String leftSide = mC2.getLeft(); + for(ClassConstraint cC : cs_cl) { + for(MethodConstraint mC : cs_m) { + String rightSide = mC.getRight(); + String leftSide = cC.getLeft(); for(TPHConstraint tphC : tcOfCs) { - + if(tphC.getLeft().equals(leftSide)&&tphC.getRight().equals(rightSide)) { + tempCC.add((MethodConstraint) tphC); + } } } } - return null; - return null; + return tempCC; } /**