cqfn / jpeek

Hosted and command-line calculator of cohesion metrics for Java code
https://i.jpeek.org
MIT License
205 stars 81 forks source link

(#292) Wrong implementation of LORM metric #334

Open alilosoft opened 5 years ago

alilosoft commented 5 years ago

I'm currently working on solving some puzzles related to LORM metric, and coincidentally I found this pull request #292 -that unfortunately get merged- and that claims to implement the LORM metric as described in the related research papers papers/etzkorn00.pdf and papers/izadkhah17.pdf, but unfortunately it seems that @ilyakharlamov didn't went deep in the definition of the R variable of LORM that is clearly defined in the above papers as follow:

R = Total number of relations in the class = number of pairs of methods in the class for which one method contains conceptual relations forming external links out of the set of concepts that belong to the method to or from the set of concepts belonging to another method in the class.

Taken from complete definition of LORM from the original paper papers/etzkorn00.pdf

LORM definition

And the following excerpts from the same paper define what are concepts & conceptual relations and how they are calculated:

LORM conceptual relations

and here more explanation:

image

But it seems that the mentioned PR #292 treat and calculate conceptual relations based on the number of simple calls between methods of the class as you can see in this commit.

So my real problem here is that the code related to this PR confused me initially and now is getting in my way while trying to solve the puzzles #160 and #204, and my question is: could I remove that code from LORM.xsl? or I should just leave it there because it's not part of my taske.

0crat commented 5 years ago

@paulodamaso/z please, pay attention to this issue

paulodamaso commented 5 years ago

@0crat assign @fellahi-ali

paulodamaso commented 5 years ago

@fellahi-ali Let's solve these three issues in order: first #160, then #204, and #334 at the end

0crat commented 5 years ago

@0crat assign @fellahi-ali (here)

@paulodamaso The job #334 assigned to @fellahi-ali/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

0crat commented 5 years ago

It is strongly discouraged to assign jobs to their creators, see §19: -15 point(s) just awarded to @paulodamaso/z

0crat commented 5 years ago

Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @paulodamaso/z

0crat commented 5 years ago

Bug was reported, see §29: +15 point(s) just awarded to @fellahi-ali/z

0crat commented 5 years ago

@fellahi-ali/z this job was assigned to you 5days ago. It will be taken away from you soon, unless you close it, see §8. Read this and this, please.

alilosoft commented 5 years ago

@0crat wait #332 & #296

0crat commented 5 years ago

@0crat wait #332 & #296 (here)

@fellahi-ali The impediment for #334 was registered successfully by @fellahi-ali/z