gumtree-spoon-ast-diff
gumtree-spoon-ast-diff copied to clipboard
Computes the AST difference (aka edit script) between two Spoon Java source code abstract syntax trees
# Summary of the problem The generated tree of a Method invocation (`target.call(p1)`) misses information: the children of the Invocation are both: the target's node and the parameters (if any)....
Proposition of feature (easy to implement). As we don't have nodes for `imports` we can have an option to create them. I imagine that It's quite easy to do it:...
For example, run this ```Java @Test public void testExplicitConversion() throws Exception { AstComparator comparator = new AstComparator(); String a = "class Foo{public void bar(){\ndouble b = 0;\n}}"; String b =...
### Case 1 **Input:** 1.java ``` package com.test; class TestClass { private int a; TestClass() { } } ``` 2.java ``` package com.test; class TestClass { public int a; TestClass()...
Currently, we don't support identifying changes which are related generics in Java. This happens due to two reasons: - Ignoring all `CtReference` in [isToIgnore()](https://github.com/SpoonLabs/gumtree-spoon-ast-diff/blob/361364ddaad3e8f0921a068275d4d21b6e836e85/src/main/java/gumtree/spoon/builder/TreeScanner.java#L71) - No labels are assigned to...
Candidate names: - HigherLevelActions - HigherOrderActions
# Input ```java int insBegin = (1 == 2) ? 1 : 0; ``` ```java int insBegin = (1 == 2) ? 0 : 1; ``` # Output Only delete...
A design decision: How we can implement in an elegant manner the configuration of properties that this tool uses? In Astor/Coming, we use a static map, initialized at the beginning...
In Gumtree, an "Update" operation means that: - either the it's a string based element and the string has changed - or that only a small fraction of children has...