From 08b9fc0ea326afa71c746141900db881e74c1365 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Tue, 21 Mar 2023 16:23:18 +0100 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java statistics eingefuegt --- src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index c152b99c..23c74248 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -88,7 +88,7 @@ public class JavaTXCompiler { this(sourceFiles, null); } public JavaTXCompiler(List sources, List contextPath) throws IOException, ClassNotFoundException { - statistics = new FileWriter(new File(System.getProperty("user.dir") + new Timestamp(System.currentTimeMillis()))); + statistics = new FileWriter(new File(System.getProperty("user.dir") + "/" + sources.get(0).getName() + "_"+ new Timestamp(System.currentTimeMillis()))); statistics.write("test"); if(contextPath == null || contextPath.isEmpty()){ //When no contextPaths are given, the working directory is the sources root @@ -734,6 +734,7 @@ public class JavaTXCompiler { System.out.println("Constraints for Generated Generics: " + " ???"); logFile.write("RES_FINAL: " + li.getResults().toString() + "\n"); logFile.flush(); + statistics.close(); return li.getResults(); } /* UnifyResultModel End */ @@ -769,6 +770,7 @@ public class JavaTXCompiler { } catch (IOException e) { System.err.println("kein LogFile"); } + statistics.close(); return results.stream() .map((unifyPairs -> new ResultSet(UnifyTypeFactory.convert(unifyPairs, Pair.generateTPHMap(cons))))) .collect(Collectors.toList());