hi guys,
one of my students encountered a case where
FAMIXMethod#invokingMethods is not correctly set. i wonder whether
that is a moose problem or an infamix one. anybody knows about this?
the original message is at the end of this mail.
thanks,
--
Dr. Mircea Lungu
Researcher
Software Composition Group
University of Bern
I assumed that FAMIXMethod >> invokingMethods would return all methods
that invoke the method represented by the FAMIXMethod instance, this
doesn't seem to be the case.
I created an mse file with inFamix from the code in svn at
http://svn.apache.org/repos/asf/incubator/stanbol/trunk/enhancer/engines/ke…
The class org.apache.stanbol.enhancer.engines.keywordextraction.linking.EntityLinker
has both private methods with an empty collection of invokingMethod as
well as with a non-empty one:
- The method getLinkedEntityTypes has an empty collection of invokingMethods
even though the method is in fact invoked:
public void process(){
...
if(linkedEntity == null){
linkedEntity = new LinkedEntity(selectedText,
suggestions, getLinkedEntityTypes(suggestions.subList(0, 1)));
linkedEntities.put(selectedText, linkedEntity);
}
By contrast in the same class
- porcessRedirects has {process} as collection of invokingMethods,
where processRedirects is invokes as follows:
public void process(){
...
if(config.getRedirectProcessingMode() != RedirectProcessingMode.IGNORE){
for(Suggestion suggestion : suggestions){
processRedirects(suggestion);
}
}
All the method I've looked at with an empty collection of
inkingMethods in fact had at least one invokation, I tried to make a
famix model for just the class EntityLinker as this class has both
private method with empty as well as with a non-empty set of ivokers
according to Moose, I hoped that with a small mse file it would be
easier to analyze the problem.
Unfortunately I didn't manage to create such an mse model, I'm getting
the following exception message running `inFamix -lang java -path
source -mse test.mse`:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1931)
at java.lang.String.substring(String.java:1904)
at
com.intooitus.infusion.batch.JavaBatchModelBuilder.compute(JavaBatchModelBuilder.java:43)
at com.intooitus.infusion.batch.BatchApplication.run(BatchApplication.java:135)
at com.intooitus.infusion.batch.BatchApplication.start(BatchApplication.java:43)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Unfortunately as inFamix is not open source and because of section 2.3
of the SLA it's hard for me to tackle this problem so I would
appreciate some help.