Tx you guys for the answers!!
I cannot reply directly
Now we found a crazy in Pharo. Believe or not
And I’m curious if you can reproduce it
We wrote this method in FamixClass
FAMIXClass >> TR_LCOM
<MSEProperty: #TR_LCOM type: #Number>
<MSEComment: 'lack of cohesion in methods from Understand'>
<derived>
^ self propertyNamed: #TR_LCOM
And since it is about Understand metrics
FAMIXClass >> Und_LCOM
<MSEProperty: #Und_LCOM type: #Number>
<MSEComment: 'lack of cohesion in methods from Understand'>
<derived>
^ self propertyNamed: #Und_LCOM
And this looks forever….. when we use Und_ :)
Crazy no.
Can you reproduce it?
On 12 Sep 2017, at 11:58, Stéphane Ducasse
<stephane.ducasse(a)inria.fr> wrote:
Hi
for certain metrics we need to compute the total amount of lines of code for the complete
project.
FAMIXClass >> calculateARLCOMUnderstand
"Class LCOM LOC
C1 12 1000
C2 2 50
For C1 1000/1050 * 12
For C2 50/1050 * 2
"
self halt.
^ self TR_LoC / self mooseModel TR_totalNumberOfLinesOfCode * self TR_LCOM
Now I have a question because totalNumberOfLinesOfCode does exist on Model but on
TypeGroup
I wrote it like that on FAMIXTypeGroup
TR_totalNumberOfLinesOfCode
<MSEProperty: #TR_totalNumberOfLinesOfCode type: #Number>
<derived>
<MSEComment: 'Total number of lines of code from Understand'>
^ self
lookUpPropertyNamed: #TR_totalNumberOfLinesOfCode
computedAs: [ (self sumNumbers: [ :each | each TR_LoC ]) asFloat ]
How can I access for example totalNumberOfLinesOfCode at the model level?
Stef
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr <http://stephane.ducasse.free.fr/>
http://www.synectique.eu <http://www.synectique.eu/> /
http://www.pharo.org
<http://www.pharo.org/>
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr
http://www.synectique.eu /
http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France