Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on ActionClassifier and Moves #127

Open
martinezmatias opened this issue May 25, 2020 · 0 comments
Open

Bug on ActionClassifier and Moves #127

martinezmatias opened this issue May 25, 2020 · 0 comments
Labels

Comments

@martinezmatias
Copy link
Contributor

martinezmatias commented May 25, 2020

Problematic:

The ActionClassifier groups Moves into Root Action moves as done with Insert and Actions (The code is almost the same see here )
However, Moves are different from Inserts/Deletes: a move affects to a Tree, whereas Insert/delects affects to a single node.
This means that, for example, if we move a While, we always only one Move action. But, if we add one While we have N actions (Insert of condition, insert of body, insert of statements inside body, etc).
This means that the classifiers wrongly works when we move element X to element Y, and Y is a leaf of another moved tree Z (Z having more than 1 level). In that case, the classifier produces two roots: mov X and Mov Z.
Note that the behaviour is correct if Z is a single node (and is also leaf i.e. Y )

For example:

method a(){
- call1()
 ....
- if(a){ 
- call2()
- }
}

method b(){
+ if(a){ 
+ call1()
+ call2()
+}
}


Produce two moves: Mov If(a) and Mov call1()

Solutions:

I propose two solutions.

First, I would not group moves. Moved nodes are already grouped, because only the root is marked as moved.
Second, to check in the complete list of parent if there is a moved parent, rather than only in the immediate parent.

@martinezmatias martinezmatias changed the title [] Improvement on ActionClassifier Bug on ActionClassifier and Moves May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant