-
Notifications
You must be signed in to change notification settings - Fork 0
024 04 05 2021 to 04 09 2021
-
Implement and document the new design ✔️
-
Resolve extract method bug ⏳
-
Add extract method logic to logic matrix ✔️
-
Test the update refactoring idea ⏳
-
Try RefMerge on real scenarios
I implemented the new design. I had to make a small tweak to the design because it could not figure out which receive method to go to at runtime based on the refactoring. For now I created a dispatcher class for each refactoring type that overrides dispatch(Receiver r)
. The only additional step that this adds for adding a new refactoring is adding a new dispatcher class. I added documentation in the Readme describing how to add a new refactoring and I added some documentation in the code. We will talk more about this on Friday and see if this is acceptable or if I need to look more into it.
I have been working on extracting the method properly when it is extracted from several locations in a method. I have found that the extracted method is not inlined textually correctly. When this happens, it is replayed correctly. I tried to inline and extract the method using the IDE and I could only do it as one block. I looked up for an example online where one method is extracted from multiple sections in the same method and I could not.
-
One problem currently is that the method is not inlined in the same format that it was extracted. This will result in a merge conflict that is not necessary.
-
Another problem is that we cannot extract a method from multiple sections in the source method. I believe this is an IntelliJ feature and there is no workaround.
I looked it up online and it appears that extract method is expected to be from one chunk of code. It is possible that the extract method in the real scenario was not done to coding standards.
-
I have added the Extract Method/Rename Class cell and added the dependence logic check.
-
I added the Extract Method/Rename Method cell and added the dependence and conflict logic checks.
-
I added the Extract Method/Extract Method cell and added the conflict logic checks to it. All of the extract method cells and logic have been added and they are all tested.
-
We talked about the extract methods with nonconsecutive code fragments. Sarah brought up that the refactoring engines can only handle cases that have consecutive lines of code and that this is a limitation we cannot fix. We will need to add this as a limitation when we write the paper.
-
Sarah brought up looking at the number of code ranges for extract method refactorings to determine how often nonconsecutive code fragments exist in the extract methods refactorings.
-
Investigate frequency of extract methods with nonconsecutive code fragments
-
Fix parameter order in programmatically extracted method
-
Test the update refactoring idea
-
Test RefMerge on 10 examples in the database