Dear,
I tried to use SmallDude duplication code and it appeared that belongsTo (on FAMIXMethod) did not return the correct class if the method is a class method.
Since I do not know where belongsTo is set, I can't check why it do not work.
The workaround I did is on FAMIXMethod>>sourceText: sourceText self mooseModel isJava ifTrue: [^'']. self mooseModel isSmalltalk ifTrue: [^( ((self hasClassScope) ifTrue: [(MSEUtilities smalltalkClassFromFamixClassName: self belongsTo mooseName) class] ifFalse: [(MSEUtilities smalltalkClassFromFamixClassName: self belongsTo mooseName)] ) sourceCodeAt: self name) asString]. self mooseModel isPython ifTrue:[ ^self pythonASTNode sourceText ]. ^''
It looks ugly but seems to work. I'm not sure it is correct and if SmallDude will return correct results.
Antoine C.