diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index 11f915b4..c152b99c 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -58,6 +58,7 @@ import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; +import java.sql.Timestamp; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -74,6 +75,7 @@ public class JavaTXCompiler { Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll? public volatile UnifyTaskModel usedTasks = new UnifyTaskModel(); private final DirectoryClassLoader classLoader; + static Writer statistics; public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException { this(Arrays.asList(sourceFile), null); @@ -86,6 +88,8 @@ 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.write("test"); if(contextPath == null || contextPath.isEmpty()){ //When no contextPaths are given, the working directory is the sources root contextPath = Lists.newArrayList(new File(System.getProperty("user.dir"))); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 198b0f4c..71ba7d0b 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -199,7 +199,8 @@ public class TYPEStmt implements StatementVisitor{ public void visit(NewClass methodCall) { //Overloading: Set methodConstraints = new HashSet<>(); - for(MethodAssumption m : this.getConstructors(info, (RefType) methodCall.getType(), methodCall.getArgumentList())){ + for(MethodAssumption m : + this.getConstructors(info, (RefType) methodCall.getType(), methodCall.getArgumentList())){ methodConstraints.add(generateConstructorConstraint(methodCall, m, info, getResolverInstance())); } if(methodConstraints.size()<1){