Open oneturkmen opened 4 years ago
Hi @oneturkmen,
regarding the generic types: I'm unsure. We get the type info from the Eclipse JDT, so I would expect that the JDT is, for some reason or another, unable to resolve the type here. Did you add the respective dependencies to the dependencies classpath when running MUDetect?
Regarding the library call: I think the culprit is that gson
is a static variable and all the inputs to the call are literals. As a result, I think we are pruning those calls from the AUG. I seem to remember we did this to filter "cross cutting" logic like logging, which is unrelated to the surrounding objects, but I'm not certain, because this is so long ago... could you see what happens if one of the arguments to fromJson
is a parameter to the enclosing method?
Hello,
There have been multiple cases where the program representation (AUG) may not be correct or some detail is missing (e.g., type). These are all synthetic examples. I was wondering if there are simply some implementation bugs, or the representations are actually correct?
Generics with Google GSON
Problem: The instance type in a generic type is marked as UNKNOWN, but should be
Foo<Integer>
orFoo<T>
instead.Missing library calls
Problem: There are three
gson.fromJson
calls inside an "if" block. These are not represented in the AUG.Problem: There are
gson.toJson
andgson.fromJson
calls that are missing.