-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the order of method parameters is sometimes incorrect #52
Comments
the order in mse file is basically meaningless, but there indeed should
be a way to specify the order in mse format.
But more importantly, the order in the moose model is not guaranteed
because FMMultiLink (which will contains all the parameters of a method)
is not an ordered list.
nicolas
…On 24/10/2018 13:34, Peter Uhnak wrote:
Sometimes the MSE contains method parameters out of order,
e.g. for method |methodName(Type1 parameter1, Type2 parameter2, Type3
parameter3)| it produced the following:
(in the order as they appeared in the MSE, with line numbers added:)
|[...] 29734: (FAMIX.Parameter (id: 5273) (name 'parameter3')
(declaredType (ref: 1236)) (parentBehaviouralEntity (ref: 10032)))
[...] 50547: (FAMIX.Parameter (id: 8995) (name 'parameter1')
(declaredType (ref: 15523)) (parentBehaviouralEntity (ref: 10032)))
[...] 56409: (FAMIX.Method (id: 10032) (name 'methodName')
(astStartPosition 7268) (astStopPosition 7284) (cyclomaticComplexity
2) (modifiers 'private') (parentType (ref: 16356)) (signature
'methodName(Type1, Type2, Type3)')) [ ... ] 96727: (FAMIX.Parameter
(id: 17183) (name 'parameter2') (declaredType (ref: 19939))
(parentBehaviouralEntity (ref: 10032))) [...] |
The parameters are incorrectly in the order 3,1,2.
I cannot share the source code, but the order changes every time I
re-run the importer.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOMwuqLE4H2Fy8OtDVbkoTvQJebstTacks5uoFBVgaJpZM4X3t3K>.
|
FMMultiValueLink (on Pharo-side) uses internally OrderedCollection to store items, and as far as I could tell, the order in the model matched the order in the MSE. Now that I'm looking at the code, the problem is on Java-side, which uses ch.akuhn.fame.internal.MultivalueSet (https://github.com/feenkcom/jdt2famix/blob/master/src/main/java/com/feenk/jdt2famix/model/famix/BehaviouralEntity.java#L390 ). So changing the java-side collection would probably be enough. That would also fix #11 without needing to introduce ordering as a first-class concept. |
Sometimes the MSE contains method parameters out of order,
e.g. for method
methodName(Type1 parameter1, Type2 parameter2, Type3 parameter3)
it produced the following:(in the order as they appeared in the MSE, with line numbers added:)
The parameters are incorrectly in the order 3,1,2.
I cannot share the source code, but the order changes every time I re-run the importer.
The text was updated successfully, but these errors were encountered: