Saved in:
Bibliographic Details
Main Authors: Yagi, Tsukasa, Hayashi, Shinpei
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.13590
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916411513765888
author Yagi, Tsukasa
Hayashi, Shinpei
author_facet Yagi, Tsukasa
Hayashi, Shinpei
contents A source code difference (diff) indicates changes made by comparing new and old source codes, and it can be utilized in code reviews to help developers understand the changes made to the code. Although many diff generation methods have been proposed, existing automatic methods may generate nonoptimal diffs, hindering reviewers from understanding the changes. In this paper, we propose an interactive approach to optimize diffs. Users can provide feedback for the points of a diff that should not be matched but are or parts that should be matched but are not. The edit graph is updated based on this feedback, enabling users to obtain a more optimal diff. We simulated our proposed method by applying a search algorithm to empirically assess the number of feedback instances required and the amount of diff optimization resulting from the feedback to investigate the potential of this approach. The results of 23 GitHub projects confirm that 92% of nonoptimal diffs can be addressed with less than four feedback actions in the ideal case.
format Preprint
id arxiv_https___arxiv_org_abs_2409_13590
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Toward Interactive Optimization of Source Code Differences: An Empirical Study of Its Performance
Yagi, Tsukasa
Hayashi, Shinpei
Software Engineering
A source code difference (diff) indicates changes made by comparing new and old source codes, and it can be utilized in code reviews to help developers understand the changes made to the code. Although many diff generation methods have been proposed, existing automatic methods may generate nonoptimal diffs, hindering reviewers from understanding the changes. In this paper, we propose an interactive approach to optimize diffs. Users can provide feedback for the points of a diff that should not be matched but are or parts that should be matched but are not. The edit graph is updated based on this feedback, enabling users to obtain a more optimal diff. We simulated our proposed method by applying a search algorithm to empirically assess the number of feedback instances required and the amount of diff optimization resulting from the feedback to investigate the potential of this approach. The results of 23 GitHub projects confirm that 92% of nonoptimal diffs can be addressed with less than four feedback actions in the ideal case.
title Toward Interactive Optimization of Source Code Differences: An Empirical Study of Its Performance
topic Software Engineering
url https://arxiv.org/abs/2409.13590