pouryafard75 / RM-ASTDiff

MIT License
2 stars 1 forks source link

Test problems after new RefactoringMiner update #58

Closed pouryafard75 closed 1 year ago

pouryafard75 commented 1 year ago

Six tests are now failing as a result of the recent commit (https://github.com/tsantalis/RefactoringMiner/commit/41eb4a9e52e70ebc7c41bfddc5834d4162e9d61f )

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:image

Before:

image

After:

image

Before:

image

After:

image

Before:

image

After:

image
pouryafard75 commented 1 year ago

@tsantalis Case 1: The test case must be updated, the new diff is preferred Case 2: The previous diff is preferred. Case 3: The previous diff is preferred. Case 4: Not clear Case 5: The test case must be updated, the new diff is preferred. Case 6: The previous diff is preferred.

Please confirm. For cases 2,3,6 should I apply post-processing logic or do you plan to fix the statement mapping on your end?

tsantalis commented 1 year ago

@pouryafard75 I think I understand what is the problem. I will fix it.

tsantalis commented 1 year ago

@pouryafard75

case1: We keep After (works) case2: We keep Before (works) case3: We keep Before (works) case4: We keep After (works) The initializer diff looks weird, but the variable declaration should be mapped case5: We keep After (works) case6: We keep Before (works)

tsantalis commented 1 year ago

@pouryafard75

For case 4. the whole initializers should be red and green, respectively.

pouryafard75 commented 1 year ago

@tsantalis I have fixed it in #60. Also, the PR https://github.com/tsantalis/RefactoringMiner/pull/425 has been updated.

tsantalis commented 1 year ago

@pouryafard75 I think if the initializer is an extracted method call (and we can get this info from the ExtractOperationRefactoring), we should have the whole initializers as deleted/added.