Anne spotted a bug in numberOfLinesOfCode.
In Java, one can easily find classes with numberOfLinesOfCode <
The reason is that numberOfLinesOfCodewithMoreThanOnecharacter is
defined in SourcedEntity by counting the lines (with more than 1 char)
in the sourceText
numberOfLinesOfCode is the sum of numberOfLinesOfCode of the methods.
This is clearly not right for Java where a class as more code than just
But it is not even coherent for Smalltalk where a class' sourceText
includes the name of the class (at least 1 additional line).
So even in Smalltalk, one finds classes with numberOfLinesOfCode <
(happens when none of the methods of the class have blank lines e.g.
So I propose to unify both methods and compute numberOfLinesOfCode in
SourcedEntity from the sourceText
(and remove FAMIXClass>>numberOfLinesOfCode)
Second, for methods, the same numberOfLinesOfCode has a backward
compatibilty with "exporters that use LOC as a property name"
(in this case, it uses LOC instead of computing the number)
Anybody still having this case?
So I propose to remove FAMIXBehaviouralEntity>>numberOfLinesOfCode
Nicolas Anquetil -- MCF (HDR)