Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JGit Diffentry misses file changes #9

Open
jan-gerling opened this issue Mar 13, 2020 · 5 comments
Open

JGit Diffentry misses file changes #9

jan-gerling opened this issue Mar 13, 2020 · 5 comments
Assignees

Comments

@jan-gerling
Copy link
Contributor

Related to issue refactoring-ai/predicting-refactoring-ml#165

Refactoringminer detects refactorings to files, that are not linked by Diffentry, e.g:

Error:
2020-03-13 18:49:17 ERROR RefactoringAnalyzer:94 Refactoring miner found a refactoring for a newly introduced class file on commit: 85c68373dabe32334933bdf6e67091534fc1504a for new class file: fluentlenium-core/src/main/java/org/fluentlenium/adapter/FluentTest.java

File on current commit:
https://github.com/FluentLenium/FluentLenium/blob/85c68373dabe32334933bdf6e67091534fc1504a/fluentlenium-core/src/main/java/org/fluentlenium/adapter/FluentTest.java

Same file on Commit Parent:
https://github.com/FluentLenium/FluentLenium/tree/fe28c1348e70c0f4c2dbb209f3a54695aa7ec9ff/fluentlenium-core/src/main/java/org/fluentlenium/core/test

image
image

@jan-gerling jan-gerling self-assigned this Mar 13, 2020
@mauricioaniche
Copy link
Contributor

One more example:

2020-03-14 11:09:34 INFO  App:122 Start mining project repos/GreenBits(clone at repos/GreenBits)
...
2020-03-14 11:13:45 ERROR RefactoringAnalyzer:99 Refactoring miner found a refactoring for a newly introduced class file on commit: 4af0169539667e66cff4fdd9a359a062508bb0f5 for new class file: app/src/main/java/com/greenaddress/greenbits/ui/preferences/TwoFactorPreferenceFragment.java

@mauricioaniche
Copy link
Contributor

I debugged the case for the Greenbits project.

In commit 4af0169539667e66cff4fdd9a359a062508bb0f5, RMiner finds a Extract Superclass com.greenaddress.greenbits.ui.preferences.GAPreferenceFragment from classes [com.greenaddress.greenbits.ui.preferences.TwoFactorPreferenceFragment]. However, when you look at the commit of the project (greenaddress/GreenBits@4af0169), you see that the TwoFactorPreferenceFragment was indeed just introduced. How can it be the source of a Extract Superclass?

This seems to me like a bug in RMiner. I'll open an issue there.

@mauricioaniche
Copy link
Contributor

Just opened it: tsantalis/RefactoringMiner#89

@mauricioaniche
Copy link
Contributor

Nevertheless we are doing the right thing: moving to the next one, in case RMiner identifies this strange refactorings in new files.

I’ll close this issue for now.

@mauricioaniche
Copy link
Contributor

Why did you re-open this one?

@jan-gerling jan-gerling transferred this issue from refactoring-ai/predicting-refactoring-ml Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants