Skip to content
Nikolaos Tsantalis edited this page Aug 15, 2023 · 45 revisions

Here you can find some case studies demonstrating the advanced diff capabilities of RefactoringMiner.

Extract Method

Nested Extract Method refactorings in commit [Click to view Diff]

Nested Extract Method refactorings in commit [Click to view Diff]

Nested Extract Method refactorings in commit [Click to view Diff]

Extract Method refactorings + control flow restructuring in commit [Click to view Diff]

Extract Method refactoring + control flow restructuring + control statement reordering in commit [Click to view Diff]

Extract Method refactoring + control flow restructuring + control statement reordering in commit [Click to view Diff]

Extract Method refactorings + Move Method refactorings in commit [Click to view Diff]

Multi-Mappings (many to one)

Nested Extract Method refactorings with duplicated code in commit [Click to view Diff]

12 duplicated code fragments extracted from the same method in commit [Click to view Diff]

Merged and extracted statements out of if-else-if in commit [Click to view Diff]

Merged variable declaration statements out of if-else-if in commit [Click to view Diff]

Merged if-else-if conditionals in commit [Click to view Diff]

Merged catch blocks in commit [Click to view Diff]

36 duplicated code fragments extracted from the same method in commit [Click to view Diff]

19 duplicated code fragments extracted from 19 different test methods in commit [Click to view Diff]

Merged and extracted statements out of if-else in commit [Click to view Diff]

Merged statements under merged if conditionals in commit [Click to view Diff]

Multi-Mappings (one to many)

Try-finally block duplicated between original and extracted method in commit [Click to view Diff]

Statement split and moved in if-else-if in commit [Click to view Diff]

Nested Inline Method refactoring with two call sites in commit [Click to view Diff]

Inline Method refactorings with multiple call sites in commit [Click to view Diff]

Semantic diff

Replace Loop with Stream API pipeline in commit [Click to view Diff]

Overlapping refactorings

Inline Method with overlapping Rename Method and 2x Extract Variable refactorings in commit [Click to view Diff]

Split Conditional with overlapping 2x Extract Variable refactorings in commit [Click to view Diff]

Renamed and reordered methods in commit [Click to view Diff]

Merge Method

Duplicated methods merged to single method in commit [Click to view Diff]

Functionality of two methods merged to single method in commit [Click to view Diff]

Split Method

Tests split into Null and NotNull cases in commit [Click to view Diff]

Move Code between Methods

Code moved from test method to setUp method in commit [Click to view Diff]

Code moved from multiple test methods to setUp method in commit [Click to view Diff]

Clone this wiki locally