RefactoringMiner icon indicating copy to clipboard operation
RefactoringMiner copied to clipboard

[Mock Test Case] Validation of a complex Move Operation refactoring from Anonymous class Argument inside Initializer block

Open mkshiblu opened this issue 3 years ago • 1 comments

Problem

Q1: Move Operation cssMatcher to Matchers.java file. True or False? Q2: Move Operation toEqualData and toEqualError, to Matchers.java file. True or False?

Steps to Reproduce

  1. Go to https://github.com/mkshiblu/practice/commit/52fc08e9254009fa69d9434ddab38ec59612e862
  2. Run the chrome extension

Observed Behavior

No refactorings are reported by RefactoringMiner.

Notes

  • Developer Commit Message

feat(matchers): extract jasmine matchers into separate file for future reuse. Prefix all used functions with angular.* so that they can be used with compiled angular as well...

  • The Above Java Example Test Code is a close recreation to this original javaScript code.

Diff

  • TestabilityPatch.java (changed file)

image

  • Matchers.java (added file)

image

mkshiblu avatar May 05 '22 22:05 mkshiblu

@mkshiblu We don't support yet the move of code between the initializer blocks of different classes. In my opinion, it does not make much sense to support it. Initializer blocks are executed after the constructors. Why would someone move such initializer/constructor functionality to another class?

tsantalis avatar May 06 '22 22:05 tsantalis