refactoring-ai / predicting-refactoring-ml

Refactoring recommendation via ML
MIT License
28 stars 8 forks source link

Metrics Bugs - Testing #38

Closed jan-gerling closed 4 years ago

jan-gerling commented 4 years ago

While working on the #19 I found various issues with the Process Metrics:

The counting of the production files is incorrect, see R2 test metrics.

jan-gerling commented 4 years ago

Please see PR #39

mauricioaniche commented 4 years ago

Hi, @jan-gerling

I just fixed the first test related to the process metrics. See my commit: https://github.com/mauricioaniche/predicting-refactoring-ml/commit/181dd7bf8c66493c4e4cd492ded54664b04d311f

Notice that the process metrics numbers (the same way as the code metrics numbers) are counted in the commit before the refactoring. So, take this Rename Class as example, in repo 2:

This keeps going. Another example. Suppose this class was then changed three more times, and then in the fourth time, a refactoring has happened. Although at this point, the class has been committed 6 times, the number of commits we will save in the Yes will be 5: the two commits up to the Rename Class we discussed before + the 3 commits. Same for the other metrics there.

You get it?

jan-gerling commented 4 years ago

I found a new bug:

The counting of the production files is incorrect because the renaming of a class file does not generate a new production file, but is counted as one.

mauricioaniche commented 4 years ago

But the count happens at the beginning only, right ? As more of a descriptive number of the project. It’s never updated, or is it ?

On Mon, 17 Feb 2020 at 08:18, Jan Gerling notifications@github.com wrote:

I found a new bug:

The counting of the production files is incorrect because the renaming of a class file does not generate a new production file, but is counted as one.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mauricioaniche/predicting-refactoring-ml/issues/38?email_source=notifications&email_token=AAAYTTCTX2SCKEZPEAETBWTRDI25JA5CNFSM4KUXJLHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL5J6OA#issuecomment-586850104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYTTE77VSQQL5PLNWO6LLRDI25JANCNFSM4KUXJLHA .

--

Maurício Aniche Delft University of Technology http://www.mauricioaniche.com

jan-gerling commented 4 years ago

But the count happens at the beginning only, right ? As more of a descriptive number of the project. It’s never updated, or is it ?

You are right, but the counting is still incorrect then. See the r2 metrics test. But I also think this is a minor issue.

mauricioaniche commented 4 years ago

Please, open a separate issue for that, and we prioritize it accordingly!

On Mon, 17 Feb 2020 at 10:38, Jan Gerling notifications@github.com wrote:

But the count happens at the beginning only, right ? As more of a descriptive number of the project. It’s never updated, or is it ?

You are right, but the counting is still incorrect then. See the r2 metrics test. But I also think this is a minor issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mauricioaniche/predicting-refactoring-ml/issues/38?email_source=notifications&email_token=AAAYTTCZY3POQEB2AVBYEODRDJLI5A5CNFSM4KUXJLHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL5WRHA#issuecomment-586901660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYTTBYVLLD3MYNYPMYEMTRDJLI5ANCNFSM4KUXJLHA .

--

Maurício Aniche Delft University of Technology http://www.mauricioaniche.com