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

Puzzles (#160) & (#204) are asking the same thing in different words! #332

Open alilosoft opened 5 years ago

alilosoft commented 5 years ago

When I started working on #160 & #204, I noticed a strange similarity in the task description but not sure how, then as I started to understand what is this LORM is about, and found this comment by @amihaiemil when he is reviewing the pull request #184 which generate the #204

But there is a problem (not your fault). This research should have been done in the context of the ticket #160. Then, that puzzle should have been removed and replaced with the one you added here.

And it becomes clear that the two tasks are asking to do the same thing but in different words! and this is how:

(#160) Implement natural language processing techniques to analyze conceptual similarity of methods. Two methods have a conceptual-relation if they contain at least one same concept.

(#204) figure out how to extract the concepts from each method of a class and then measure their "dispersal", how far apart they are semantically speaking.

So the tow tasks are about extracting concepts from each methods in a class, and find any conceptual relations between these methods to be able to calculate the LORM metric. But there was some ambiguity and inaccuracy in defining what are conceptual relations in contrast of the description of LORM.

So based on the description of LORM and the research done by @llorllale in #184, and this tow comments here and here I think that the solution to the LORM metric should be approached in these three steps: 1- Extract and define set of concepts belonging to each method using LSI (Latent Semantic Indexing) technique. 2- Find all conceptual relation (semantic relation) between these sets using NLP techniques. 3- Calculate the number of pairs of methods which exist conceptual relations between their sets of concepts.

@paulodamaso My question is, should I remove those tow puzzles (#160 & #204) and replace theme with more specific ones, as described above?

0crat commented 5 years ago

@paulodamaso/z please, pay attention to this issue

alilosoft commented 5 years ago

@paulodamaso can you check this please!

paulodamaso commented 5 years ago

@fellahi-ali Let's try to do something better:

WDYT?

alilosoft commented 5 years ago

@paulodamaso Does this mean that I should submit a separate PR for each issue?

paulodamaso commented 5 years ago

@fellahi-ali Yes. I think that I understand better what you are proposing, correct me if I am wrong: we have two issues related to LORM, which seems to be the same or almost the same, and the solution to LORM metric is will be reached by following three steps that bear some relation to the first issues. So let's do this way: on #160 you start to solve the problem described in 1- Extract and define set of concepts belonging to each method using LSI (Latent Semantic Indexing) technique.; in #204 you continue the resolution, and in this one you go further. How about that?

alilosoft commented 5 years ago

@paulodamaso Yes this seems reasonable solution; but my concern is that I could face a problem submitting the PRs because one of them is related to the code in the other and I couldn't submit the second until the first get merged ! and also I found another problem that I reported here #334