You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cgum parser causes GumTree to generate wrong output for diffs that involve array dimension size. To verify this bug, I have created two corresponding files in three different programming languages (Java. C, CPP) that differ only in the array dimension declaration.
In the Java version of GumTree, the update of array size is
$diff test.java test1.java
4c4
< int a[]=new int[5];//declaration and instantiation
---
> int a[]=new int[6];//declaration and instantiation
As can be seen from this example, the array size update in Java programs is shown correctly.
However, the array size update in C programs is not shown correctly.
diff test.c test1.c
4c4
< char name1[50];
---
> char name1[51];
```
```
gumtree jsondiff test.c test1.c
"actions": []
```
When I try to rename all the C files to CPP files, then the array size update will be shown correctly because a different parser (srcml) instead of cgum will be invoked instead.
```
gumtree jsondiff test.cpp test1.cpp
"actions": [
{
"action": "update",
"tree": 10,
"label": "51"
}
```
Expected Output:
Difference that involves array dimension size should be parsed by cgum and shown correctly in GumTree.
Related Files:
[test.zip](https://github.com/GumTreeDiff/cgum/files/2111764/test.zip)
The text was updated successfully, but these errors were encountered:
The cgum parser causes GumTree to generate wrong output for diffs that involve array dimension size. To verify this bug, I have created two corresponding files in three different programming languages (Java. C, CPP) that differ only in the array dimension declaration.
In the Java version of GumTree, the update of array size is
As can be seen from this example, the array size update in Java programs is shown correctly.
However, the array size update in C programs is not shown correctly.
The text was updated successfully, but these errors were encountered: