Aiding Code Change Understanding with Semantic Change Impact Analysis
Autor: | Quinn Hanam, Reid Holmes, Ali Mesbah |
---|---|
Rok vydání: | 2019 |
Předmět: |
Source code
Code review Computer science business.industry media_common.quotation_subject 020207 software engineering Context (language use) 02 engineering and technology Change impact analysis JavaScript computer.software_genre Semantics Semantic change Software bug 020204 information systems 0202 electrical engineering electronic engineering information engineering Software engineering business computer media_common computer.programming_language |
Zdroj: | ICSME |
DOI: | 10.1109/icsme.2019.00031 |
Popis: | Code reviews are often used as a means for developers to manually examine source code changes to ensure the behavioural effects of a change are well understood. Unfortunately, the behavioural impact of a change can include parts of the system outside of the area syntactically affected by the change. In the context of code reviews this can be problematic, as the impact of a change can extend beyond the diff that is presented to the reviewer. Change impact analysis is a promising technique which could potentially assist developers by helping surface parts of the code not present in the diff but that could be affected by the change. In this work we investigate the utility of change impact analysis as a tool for assisting developers understand the effects of code changes. While we find that traditional techniques may not benefit developers, more precise techniques may reduce time and increase accuracy. Specifically, we propose and study a novel technique which extracts semantic, rather than syntactic, change impact relations from JavaScript commits. We (1) define four novel semantic change impact relations and (2) implement an analysis tool called tool that interprets structural changes over partial JavaScript programs to extract these relations. In a study of 2,000 commits from the version history of three popular NodeJS applications, tool reduced false positives by 9–37% and further reduced the size of change impact sets by 19–91% by splitting up unrelated semantic relations, compared to change impact sets computed with Unix diff and control and data dependencies. Additionally, through a user study in which developers performed code review tasks with tool, we found that reducing false positives and providing stronger semantics had a meaningful impact on their ability to find defects within code change diffs. |
Databáze: | OpenAIRE |
Externí odkaz: |