On 26 déc. 2009, at 00:18, Alberto Bacchelli wrote:

Hi,

I still use VisualWorks 7.6nc and FAMIX2.1 to analyze Java systems in Moose. I still have to move to Pharo, sorry...

I am trying to find the connections between Java classes of a software system. Besides inheritance (which is perfectly recognized), I would also like to consider other type of relations, such as invocations. Although many invocations are correctly recognized, there is -at least- one case which I cannot extract.

For example, if you take ArgoUML 0.28 [0], that I parsed into a MSE file [1] using inFusion 7.2.7, and consider the class org.argouml.application.api.Argo [2], you can find this code:

==== ==== ====
[...]
public final class Argo {

[...]
   /**
    * Key for default startup directory.
    */
   public static final ConfigurationKey KEY_STARTUP_DIR =
Configuration.makeKey("default", "user", "dir");
[...]
==== ==== ====

I believe that, between all the invocations done by this Argo class, there should be the invocation to the method "makeKey(String,String,String)" that belongs to the class Configuration.


Hi Alberto

This is a known issue, see 254
Currently infusion does not import invocations made in a static block.




However, if I call "outgoingInvocations" on the FAMIX Class representing the Java class Argo, I cannot get this invocation.


It is possible that this problem is not caused by Moose, but by the generation of the MSE file: I manually looked for the Argo class inside the MSE file [1]. I found that it has id = 202. I looked at all the references (idref: 202) to this id. I could find 4 connections to all the methods of this class, many connections to all the attributes of this class, but no reference to this "makeKey" method invocation.
Is this problem caused by the fact that the method invocation is in the main body of the class? What happens if such an invocation is to be found inside a class method, is it correctly recognized?

Thank you in advance.

Ciao,
Alberto

[0] http://www.inf.usi.ch/phd/bacchelli/research/argouml/2009-03-23-argoUML_0.28.tar.bz2
[1] http://www.inf.usi.ch/phd/bacchelli/research/argouml/2009-03-23_argoUML_0.28_infusion727.mse
[2] http://www.inf.usi.ch/phd/bacchelli/research/argouml/Argo.Java
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
 Simon