pouryafard75 / RM-ASTDiff

MIT License
2 stars 1 forks source link

Improve handling of refactored concatenated strings #95

Closed tsantalis closed 7 months ago

tsantalis commented 7 months ago

https://github.com/neo4j/neo4j/commit/03ece4f24163204d8a3948eb53576f1feaa86a61#diff-98890cebc6bfa323c73ece0cc5bb33d966544e06a42251033dff545ac12207ccR91-R92

There are two Extract Variable refactorings happening in this case, one in the source method (message variable) and one in the extracted method (help variable).

We have the following issues:

  1. storeDir variable is not matched in the initializer of extracted variable message
  2. storeLockFile variable in not matched in the initializer of extracted variable message
  3. the initializer of variable help should be matched with part(s) of the string literals in the throw statements.

image

pouryafard75 commented 7 months ago

Replicated at https://github.com/pouryafard75/TestCases/commit/956a94a7736152c85548ab7c6a048f2d9afa8959

pouryafard75 commented 7 months ago

@tsantalis Is this the expected behavior?

image

You can find the exportedHTML export.zip

tsantalis commented 7 months ago

@pouryafard75 How did you do that? !!!!!! It's even better than what I thought it would be possible.

tsantalis commented 7 months ago

The multi-mapping with ". " on the right is a bit strange

image

tsantalis commented 7 months ago

Fixed:

  1. storeDir variable matched in the initializer of extracted variable message
  2. storeLockFile variable matched in the initializer of extracted variable message

image

pouryafard75 commented 7 months ago

@tsantalis Can you please take a verify the correctness for this exportedHTML.zip? I have tested and all of the cases are passing.