Closed MaximoOliveira closed 3 years ago
Hi @MaximoOliveira
Thanks for the proposed changes. So, If I well understood the changes, those add a guard that check the filtered element is has a SourcePosition, right?
Thanks! Regards Matias
Hi @MaximoOliveira
It would be nice if you create a PR with those two changes and a test case that exposes the problem and assert the new behaviour i.e., to assert that no modification point targets a NoSourcePosition element.
Thanks! Regards Matias
Hi @martinezmatias
Thanks for the proposed changes. So, If I well understood the changes, those add a guard that check the filtered element is has a SourcePosition, right?
Correct!
It would be nice if you create a PR with those two changes and a test case that exposes the problem and assert the new behaviour i.e., to assert that no modification point targets a NoSourcePosition element.
I can open a pr with that today or tomorrow!
Thank you!
Great thanks!
For context see bug 1) from #298
This can be solved by adding a condition to check that a ctElement's position is not an instance of NoSourcePosition:
Replace this loop https://github.com/SpoonLabs/astor/blob/df11be14321b522b8deab115ef902ae8e097e1f5/src/main/java/fr/inria/astor/core/solutionsearch/population/ProgramVariantFactory.java#L181
By :
And this loop: https://github.com/SpoonLabs/astor/blob/df11be14321b522b8deab115ef902ae8e097e1f5/src/main/java/fr/inria/astor/core/solutionsearch/population/ProgramVariantFactory.java#L257
By:
What do you think @martinezmatias ?