A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools. Alikhanifard, P. & Tsantalis, N. ACM Transactions on Software Engineering and Methodology, Association for Computing Machinery, New York, NY, USA, January, 2025.
Paper doi abstract bibtex Software undergoes constant changes to support new requirements, address bugs, enhance performance, and ensure maintainability. Thus, developers spend a great portion of their workday trying to understand and review the code changes of their teammates. Abstract Syntax Tree (AST) diff tools were developed to overcome the limitations of line-based diff tools, which are used by the majority of developers. Despite the notable improvements brought by AST diff tools in understanding complex changes, they still suffer from serious limitations, such as (1) lacking multi-mapping support, (2) matching semantically incompatible AST nodes, (3) ignoring language clues to guide the matching process, (4) lacking refactoring awareness, and (5) lacking commit-level diff support. We propose a novel AST diff tool based on RefactoringMiner that resolves all aforementioned limitations. First, we improved RefactoringMiner to increase its statement mapping accuracy, and then we developed an algorithm that generates AST diff for a given commit or pull request based on the refactoring instances and pairs of matched program element declarations provided by RefactoringMiner. To evaluate the accuracy of our tool and compare it with the state-of-the-art tools, we created the first benchmark of AST node mappings, including 800 bug-fixing commits and 188 refactoring commits. Our evaluation showed that our tool achieved a considerably higher precision and recall, especially for refactoring commits, with an execution time that is comparable with that of the faster tools.
@article{Alikhanifard:TOSEM:2024:RefactoringMiner3.0,
author = {Alikhanifard, Pouria and Tsantalis, Nikolaos},
title = {A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools},
year = {2025},
issue_date = {February 2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {34},
number = {2},
issn = {1049-331X},
--url = {https://doi.org/10.1145/3696002},
doi = {10.1145/3696002},
abstract = {Software undergoes constant changes to support new requirements, address bugs, enhance performance, and ensure maintainability. Thus, developers spend a great portion of their workday trying to understand and review the code changes of their teammates. Abstract Syntax Tree (AST) diff tools were developed to overcome the limitations of line-based diff tools, which are used by the majority of developers. Despite the notable improvements brought by AST diff tools in understanding complex changes, they still suffer from serious limitations, such as (1) lacking multi-mapping support, (2) matching semantically incompatible AST nodes, (3) ignoring language clues to guide the matching process, (4) lacking refactoring awareness, and (5) lacking commit-level diff support. We propose a novel AST diff tool based on RefactoringMiner that resolves all aforementioned limitations. First, we improved RefactoringMiner to increase its statement mapping accuracy, and then we developed an algorithm that generates AST diff for a given commit or pull request based on the refactoring instances and pairs of matched program element declarations provided by RefactoringMiner. To evaluate the accuracy of our tool and compare it with the state-of-the-art tools, we created the first benchmark of AST node mappings, including 800 bug-fixing commits and 188 refactoring commits. Our evaluation showed that our tool achieved a considerably higher precision and recall, especially for refactoring commits, with an execution time that is comparable with that of the faster tools.},
journal = {ACM Transactions on Software Engineering and Methodology},
month = jan,
articleno = {40},
numpages = {63},
keywords = {Source code differencing, Abstract Syntax Trees, Benchmark},
url_Paper={https://users.encs.concordia.ca/~nikolaos/publications/TOSEM_2024.pdf},
}
Downloads: 0
{"_id":"KyFnunewT86j4xxgf","bibbaseid":"alikhanifard-tsantalis-anovelrefactoringandsemanticawareabstractsyntaxtreedifferencingtoolandabenchmarkforevaluatingtheaccuracyofdifftools-2025","author_short":["Alikhanifard, P.","Tsantalis, N."],"bibdata":{"bibtype":"article","type":"article","author":[{"propositions":[],"lastnames":["Alikhanifard"],"firstnames":["Pouria"],"suffixes":[]},{"propositions":[],"lastnames":["Tsantalis"],"firstnames":["Nikolaos"],"suffixes":[]}],"title":"A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools","year":"2025","issue_date":"February 2025","publisher":"Association for Computing Machinery","address":"New York, NY, USA","volume":"34","number":"2","issn":"1049-331X","--url":"https://doi.org/10.1145/3696002","doi":"10.1145/3696002","abstract":"Software undergoes constant changes to support new requirements, address bugs, enhance performance, and ensure maintainability. Thus, developers spend a great portion of their workday trying to understand and review the code changes of their teammates. Abstract Syntax Tree (AST) diff tools were developed to overcome the limitations of line-based diff tools, which are used by the majority of developers. Despite the notable improvements brought by AST diff tools in understanding complex changes, they still suffer from serious limitations, such as (1) lacking multi-mapping support, (2) matching semantically incompatible AST nodes, (3) ignoring language clues to guide the matching process, (4) lacking refactoring awareness, and (5) lacking commit-level diff support. We propose a novel AST diff tool based on RefactoringMiner that resolves all aforementioned limitations. First, we improved RefactoringMiner to increase its statement mapping accuracy, and then we developed an algorithm that generates AST diff for a given commit or pull request based on the refactoring instances and pairs of matched program element declarations provided by RefactoringMiner. To evaluate the accuracy of our tool and compare it with the state-of-the-art tools, we created the first benchmark of AST node mappings, including 800 bug-fixing commits and 188 refactoring commits. Our evaluation showed that our tool achieved a considerably higher precision and recall, especially for refactoring commits, with an execution time that is comparable with that of the faster tools.","journal":"ACM Transactions on Software Engineering and Methodology","month":"January","articleno":"40","numpages":"63","keywords":"Source code differencing, Abstract Syntax Trees, Benchmark","url_paper":"https://users.encs.concordia.ca/~nikolaos/publications/TOSEM_2024.pdf","bibtex":"@article{Alikhanifard:TOSEM:2024:RefactoringMiner3.0,\r\n\tauthor = {Alikhanifard, Pouria and Tsantalis, Nikolaos},\r\n\ttitle = {A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools},\r\n\tyear = {2025},\r\n\tissue_date = {February 2025},\r\n\tpublisher = {Association for Computing Machinery},\r\n\taddress = {New York, NY, USA},\r\n\tvolume = {34},\r\n\tnumber = {2},\r\n\tissn = {1049-331X},\r\n\t--url = {https://doi.org/10.1145/3696002},\r\n\tdoi = {10.1145/3696002},\r\n\tabstract = {Software undergoes constant changes to support new requirements, address bugs, enhance performance, and ensure maintainability. Thus, developers spend a great portion of their workday trying to understand and review the code changes of their teammates. Abstract Syntax Tree (AST) diff tools were developed to overcome the limitations of line-based diff tools, which are used by the majority of developers. Despite the notable improvements brought by AST diff tools in understanding complex changes, they still suffer from serious limitations, such as (1) lacking multi-mapping support, (2) matching semantically incompatible AST nodes, (3) ignoring language clues to guide the matching process, (4) lacking refactoring awareness, and (5) lacking commit-level diff support. We propose a novel AST diff tool based on RefactoringMiner that resolves all aforementioned limitations. First, we improved RefactoringMiner to increase its statement mapping accuracy, and then we developed an algorithm that generates AST diff for a given commit or pull request based on the refactoring instances and pairs of matched program element declarations provided by RefactoringMiner. To evaluate the accuracy of our tool and compare it with the state-of-the-art tools, we created the first benchmark of AST node mappings, including 800 bug-fixing commits and 188 refactoring commits. Our evaluation showed that our tool achieved a considerably higher precision and recall, especially for refactoring commits, with an execution time that is comparable with that of the faster tools.},\r\n\tjournal = {ACM Transactions on Software Engineering and Methodology},\r\n\tmonth = jan,\r\n\tarticleno = {40},\r\n\tnumpages = {63},\r\n\tkeywords = {Source code differencing, Abstract Syntax Trees, Benchmark},\r\n\turl_Paper={https://users.encs.concordia.ca/~nikolaos/publications/TOSEM_2024.pdf},\r\n}\r\n\r\n","author_short":["Alikhanifard, P.","Tsantalis, N."],"key":"Alikhanifard:TOSEM:2024:RefactoringMiner3.0","id":"Alikhanifard:TOSEM:2024:RefactoringMiner3.0","bibbaseid":"alikhanifard-tsantalis-anovelrefactoringandsemanticawareabstractsyntaxtreedifferencingtoolandabenchmarkforevaluatingtheaccuracyofdifftools-2025","role":"author","urls":{" paper":"https://users.encs.concordia.ca/~nikolaos/publications/TOSEM_2024.pdf"},"keyword":["Source code differencing","Abstract Syntax Trees","Benchmark"],"metadata":{"authorlinks":{}},"downloads":0},"bibtype":"article","biburl":"users.encs.concordia.ca/~nikolaos/publications.bib","dataSources":["yj2z9AmsTGYHs5F2D"],"keywords":["source code differencing","abstract syntax trees","benchmark"],"search_terms":["novel","refactoring","semantic","aware","abstract","syntax","tree","differencing","tool","benchmark","evaluating","accuracy","diff","tools","alikhanifard","tsantalis"],"title":"A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools","year":2025}