GumTreeDiff / gumtree

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

Wrong position info of tree node #280

Closed SherloqueChang closed 1 year ago

SherloqueChang commented 2 years ago

Hi! I'm using GumTree on Ubuntu.

When I obtained the whole tree structure of the program in xml format, I found there was something wrong with the starting position of certain tree node. For example:

<tree type="Definition" pos="242689" length="9158">

But in fact, pos of the "Definition" should be 242569.

I couldn't figure out why this went wrong.

jrfaller commented 2 years ago

Hi!

With which parser?

Cheers.

SherloqueChang commented 2 years ago

cgum

jrfaller commented 2 years ago

Sorry it's highly possible. Cgum is not really maintained at the moment. Maybe you could try with tree-sitter C parser?

Cheers.

SherloqueChang commented 2 years ago

Ah, I'm invoking GumTree Java API in a maven project. As far as I'm concerned, tree-sitter C parser doesn't provide maven dependency. Is that so?

jrfaller commented 2 years ago

You're right, it's not released yet on Maven central.

Cheers.