GumTreeDiff / gumtree

An awesome code differencing tool
https://github.com/GumTreeDiff/gumtree/wiki
GNU Lesser General Public License v3.0
933 stars 174 forks source link

Add support for including unordered nodes #373

Open algomaster99 opened 1 month ago

algomaster99 commented 1 month ago

This feature is useful for nodes in the AST of source code (and even bytecode) that are independent of order. For example, import statements, method declarations. etc.

The change would require:

  1. Creating an implementation of Tree interface which can hold the property that the children nodes are unordered.
  2. Checks in ChawatheGenerator to eliminate the move actions if the parent of node is UNORDERED and they are mapped to the same parent.