srcDiff: A syntactic differencing approach to improve the understandability of deltas
An efficient and scalable rule‐based syntactic differencing approach is presented. The tool srcDiff is built upon the srcML infrastructure. srcML adds syntactic information into the code via an XML format. A syntactic difference of srcML documents is then taken. During this process, the differences...
Saved in:
| Published in | Journal of software : evolution and process Vol. 32; no. 4 |
|---|---|
| Main Authors | , , , |
| Format | Journal Article |
| Language | English |
| Published |
Chichester
Wiley Subscription Services, Inc
01.04.2020
|
| Subjects | |
| Online Access | Get full text |
| ISSN | 2047-7473 2047-7481 |
| DOI | 10.1002/smr.2226 |
Cover
| Summary: | An efficient and scalable rule‐based syntactic differencing approach is presented. The tool srcDiff is built upon the srcML infrastructure. srcML adds syntactic information into the code via an XML format. A syntactic difference of srcML documents is then taken. During this process, the differences are further refined using a set of rules that model typical editing patterns of source code by developers. Thus, the resulting deltas model edits that are programmer centric versus a purely syntactic tree edit view. Other syntactic differencing approaches focus on obtaining an optimal tree edit distance with the assumption that this will produce an accurate difference. While this may work well for small or simple changes, the differences quickly become unreadable for more complex changes. By contrast, the approach presented here purposely deviates from an optimal tree edit difference in order to create a delta that is both easier to understand and better models changes between the original and modified. To evaluate the approach, a comparison user study against a state‐of‐the‐art syntactic differencing approach and two line‐based differencing tools is conducted as an online within‐participant study with about 70 subjects on 14 sample changes. The results provide support that the rule‐based syntactic differencing produces more accurate and understandable deltas. |
|---|---|
| Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ISSN: | 2047-7473 2047-7481 |
| DOI: | 10.1002/smr.2226 |