-
Notifications
You must be signed in to change notification settings - Fork 132
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
Creation of a new feature to allow collect the refactorings implemented at the time of the merge #753
Comments
@aoliveira100 It is not clear to me how we can get But I don't think any pair of merge commit and its parent commits gives what you are looking for. Do you have any idea, how we could obtain those refactorings implemented only in the merge? |
Thank you for support Consider the merge commit with sha1 573ba90. When we run the command git diff 573ba90 573ba90^1 573ba90^2 (where ^1 is parent 1 of the merge commit and ^2 is parent 2), we can identify through the ++/-- directives which lines of code were added (++) and removed (--) in the merge commit. Looking at the lines with ++ (added in the merge), some of these new implementations could be code refactorings. We know this must be an exception, but it can happen. Example: |
@aoliveira100 |
@tsantalis |
Currently, when I pass a merge commit to get the refactorings, the Refactoring Miner returns duplicate refactorings, which were implemented in the branch commits, and not those effectively implemented during the merge operation.
I propose the creation of a new feature to allow the collection of refactorings implemented at the time of the merge. Although it is uncommon to implement refactorings at this time, we know that this is possible.
It could be an API detectAtMergeCommit(mergeCommit) that collects refactorings exclusively implemented in the merge. (PS: I'm not referring to the accumulated refactorings of the branches in this merge, but the specific refactorings implemented only in the merge).
In my research work, I have discarded the merge commits from my samples precisely because the Refactoring Miner returns duplicate refactorings in this case. I have considered this limitation a threat to external validity. I have justified that the number of situations where the DevOps/developers implement refactorings at the exact moment of executing the merge is relatively low.
Thanks in advance.
The text was updated successfully, but these errors were encountered: