URL encodings at unexpected places in M3.methodInvocation
After loading the JDK with createM3FromJar() the methodInvocation relation contains URL escape characters at the beginning of the path.
Note the method locations in the range of the relation. They contain %5B right after the triple /// in their path.
Additionally, a semicolon is inserted in the target of the last method invocation.
rel[loc from,loc to]: {
<|java+constructor:///sun/security/krb5/internal/MethodData/MethodData(int,byte%5B%5D)|,|java+method:///%5BB/clone()|>,
<|java+method:///sun/security/provider/SHA2/clone()|,|java+method:///%5BI/clone()|>,
<|java+method:///sun/security/util/DisabledAlgorithmConstraints$KeySizeConstraint$Operator/values()|,|java+method:///%5BLsun/security/util/DisabledAlgorithmConstraints$KeySizeConstraint$Operator;/clone()|>,
...
There were over 1000 method invocation for which this occurred. In all of them an invocation to clone() was made.
According to the Java language Specification, Java SE 9:
In the Java programming language, arrays are objects (§4.3.1), are dynamically created, and may be assigned to variables of type Object (§4.3.2). All methods of class Object may be invoked on an array.
Given this statement we can assume that when the clone() method is invoked on an array (identified as [<type> in Java bytecode), we must refer to the class Object. Then, there is a new modelling alternative:
rel[loc from,loc to]: {
<|java+constructor:///sun/security/krb5/internal/MethodData/MethodData(int,byte%5B%5D)|,|java+method:///java/lang/Object/clone()|>,
<|java+method:///sun/security/provider/SHA2/clone()|,|java+method:///java/lang/Object/clone()|>,
<|java+method:///sun/security/util/DisabledAlgorithmConstraints$KeySizeConstraint$Operator/values()|,|java+method:///java/lang/Object/clone()|>,
...
@jurgenvinju what is your advice on this matter?
I don't know; can we simplify this Safely as Lina says?
Wondering what the state of this issue is. Did we fix this @lmove ?
@jurgenvinju, I believe we haven't. Can look into this issue in the coming days. Sounds good?
do it if you can use a change of scenery and a small thing to focus on; there is no urgency now; I came across it while preparing for yesterday and thought maybe we have fixed this already.
solved on a soon-to-be-merged branch