Detecting Source Code Moves across Files by Using a Project-Level Abstract Syntax Tree

DOI

Bibliographic Information

Other Title
  • プロジェクト全体の抽象構文木構築によるファイル間の移動コード検出

Abstract

In software development, developers need to understand the differencing of source code. GumTree is a tool that detects source code differencing. When GumTree receives source files before and after a change as input, it generates the abstract syntax tree. It detects operations of deletions, insertions, moves, and updates at each node of the abstract syntax tree. However, GumTree has an issue that cannot detect source code moves across files because it can only detect differencing in a single file. This research proposes a technique to detect source code moves across files by constructing a huge abstract syntax tree from all source files in a project. To improve detection accuracy, we perform a two-staged tree matching. The experimental results with eight open-source projects, the proposed technique detected 89,418 moves across files in total from 88,848 commits, moreover, we found several features in source code moves across files and file names. Besides, we compared the number of code moves with an existing tool that can detect code moves and found that the number of moves exceeded the current tool's number.

Journal

Details 詳細情報について

Report a problem

Back to top