Canada Spends Logo

Explore our Budget 2026 analysis

Grant: Discovery Grants Program - Individual

Concordia University

$55,000.00

Refactoring-aware and semantic-aware source code differencing

FY 2024-25

Summary
Software developers spend a significant portion of the workday trying to understand and review the code changes of their teammates. Based on data collected from over 250,000 developers, on median they spend 41 minutes per day on code reviewing and understanding code changes, which is almost as much time as they spend on developing code (52 minutes per day). The majority of the diff tools used for code reviews, including GitHub Pull Request and Gerrit, provide a textual diff of the code changes at the line-level granularity. However, textual diff makes more difficult for code reviewers to understand the changes intended by the commit authors, especially when the changes are complex and involve refactorings (i.e., code restructuring), which tend to move code in new locations relatively far from the original code locations in the same file, or even in different files. To overcome these limitations Abstract Syntax Tree (AST) diff tools have been developed, which generate an edit script referring directly to the AST structure of the code, and support more advanced edit actions, such as AST node updates and moves, in addition to the standard edit actions (deletions and additions) supported by textual diff. Despite the notable improvements brought by AST diff in understanding complex code changes, AST diff tools still suffer from some serious limitations, which make them generate edit scripts that are not ideal or optimal from the change comprehension point of view, because they do not reflect the actual changes intended by the commit author. The proposed research program aims to overcome all major limitations of the current state-of-the-art AST diff tools by adopting a refactoring, semantic, and language-aware solution to the problem. Moreover, we will create a large benchmark of AST diffs from commits in open-source projects to evaluate the precision and recall of AST diff tools in an objective way. In the past, AST diff tools have been evaluated based on the number of generated mappings and the size of the resulting edit script, without validating whether the mappings and edit actions are correct and reflect the actual changes intended by the commit author. Finally, we will evaluate the practical effectiveness and usefulness of our improved AST diff solution with a controlled experiment involving developers who will use our tool and competitive tools for typical code reviewing and change comprehension tasks. The outcome of the proposed research will improve the current tools developers use to inspect code changes and perform code reviews, so that developers can understand the changes better and faster. This will save developers considerable effort and time in understanding changes, thus improving their overall productivity. Moreover, it will impact various software engineering research fields that rely on accurate AST diff information, such as automated program repair and library/API migration tools.
Program
Discovery Grants Program - Individual
Location
Quebec, Canada
Recipient Type
Academia
Type
Grant
Source
NSERC's Awards Data

As published

Application id
RGPIN-2024-04302
Name nom
Tsantalis, Nikolaos
Department département
Computer Science and Software Engineering
Organization id
70
Institution établissement
Concordia University
Province en
Québec
Province fr
Québec
Country en
CANADA
Country fr
CANADA
Fiscal year exercice financier
2024
Competition year année de concours
2024
Award amount
55000
Program id
RGPIN
Program name en
Discovery Grants Program - Individual
Program name fr
Programme de subventions à la découverte - individuelles
Group en
DISCOVERY RESEARCH
Group fr
RECHERCHE AXÉE SUR LA DÉCOUVERTE
Committee code
1507
Committee name en
Computer Science
Committee name fr
Sciences informatiques
Area of application code
802
Area of application group en
Information and communication services
Area of application group fr
Services d'information et de télécommunications
Area of application en
Information systems and technology
Area of application fr
Systèmes d'information et technologie de l'information
Research subject code
2700
Research subject group en
Information technology
Research subject group fr
Technologie de l'information
Research subject en
Information technology
Research subject fr
Technologie de l'information
Field of research list names en
Not available
Field of research list names fr
Non disponible
Socioeconomic objective list names en
Not available
Socioeconomic objective list names fr
Non disponible
Application title
Refactoring-aware and semantic-aware source code differencing
Keywords
source code differencing; abstract syntax tree differencing; refactoring; benchmarks; source code reviews
Application summary
Software developers spend a significant portion of the workday trying to understand and review the code changes of their teammates. Based on data collected from over 250,000 developers, on median they spend 41 minutes per day on code reviewing and understanding code changes, which is almost as much time as they spend on developing code (52 minutes per day). The majority of the diff tools used for code reviews, including GitHub Pull Request and Gerrit, provide a textual diff of the code changes at the line-level granularity. However, textual diff makes more difficult for code reviewers to understand the changes intended by the commit authors, especially when the changes are complex and involve refactorings (i.e., code restructuring), which tend to move code in new locations relatively far from the original code locations in the same file, or even in different files. To overcome these limitations Abstract Syntax Tree (AST) diff tools have been developed, which generate an edit script referring directly to the AST structure of the code, and support more advanced edit actions, such as AST node updates and moves, in addition to the standard edit actions (deletions and additions) supported by textual diff. Despite the notable improvements brought by AST diff in understanding complex code changes, AST diff tools still suffer from some serious limitations, which make them generate edit scripts that are not ideal or optimal from the change comprehension point of view, because they do not reflect the actual changes intended by the commit author. The proposed research program aims to overcome all major limitations of the current state-of-the-art AST diff tools by adopting a refactoring, semantic, and language-aware solution to the problem. Moreover, we will create a large benchmark of AST diffs from commits in open-source projects to evaluate the precision and recall of AST diff tools in an objective way. In the past, AST diff tools have been evaluated based on the number of generated mappings and the size of the resulting edit script, without validating whether the mappings and edit actions are correct and reflect the actual changes intended by the commit author. Finally, we will evaluate the practical effectiveness and usefulness of our improved AST diff solution with a controlled experiment involving developers who will use our tool and competitive tools for typical code reviewing and change comprehension tasks. The outcome of the proposed research will improve the current tools developers use to inspect code changes and perform code reviews, so that developers can understand the changes better and faster. This will save developers considerable effort and time in understanding changes, thus improving their overall productivity. Moreover, it will impact various software engineering research fields that rely on accurate AST diff information, such as automated program repair and library/API migration tools.
Concordia University - $55,000 Grant (2024-25) | Canada Spends