diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index bb561cbf..5bd9e505 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -23,6 +23,7 @@ import com.rits.cloning.Cloner; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.Section; import de.dhbwstuttgart.logger.SectionLogger; +import de.dhbwstuttgart.logger.Timestamp; import de.dhbwstuttgart.logger.Timewatch; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -673,7 +674,7 @@ public class Unify Menge>> temp = new Menge<>(); //hier werden gefilterte Constraints gesammelt Menge undMenge = new Menge(); //Die Menge von Pairs, welche in jedem Kartesischen Produkt enthalten sind. //undMenge.addAll(cloner.deepClone(Eq1)); - undMenge.addAll(Eq1); + undMenge.addAll(Unify.deepClone(Eq1)); Menge>> oderConstraints = new Menge<>();//Die zu filternden Constraints for (Menge> vecvecpair : cartProduktSets){ if(vecvecpair.size() == 1){//gibt es nur eine UndMenge in diesem Set, dann kommt diese in jedem Karthesischen Produkt vor: @@ -691,8 +692,8 @@ public class Unify Menge testMenge = new Menge(); //testMenge.addAll(cloner.deepClone(undMenge)); //testMenge.addAll(cloner.deepClone(pairs)); - testMenge.addAll(undMenge); - testMenge.addAll(pairs); + testMenge.addAll(Unify.deepClone(undMenge)); + testMenge.addAll(Unify.deepClone(pairs)); Menge> test = Unify.unifyFiltered(testMenge, fc_tto, false); if(test.size()>0){ filteredOCons.add(pairs); @@ -3649,9 +3650,10 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: } private static Menge deepClone(Menge m){ - + Timewatch watch = Timewatch.getTimewatch(); + Timestamp timer = watch.start("Unify - deepClone"); Menge ret = m.stream().map((Function)(x -> x.deepClone())).>collect(Menge::new, Menge::add, Menge::addAll); - + timer.stop(); return ret; } }