Technical Meeting

リファクタリング支援に用いる知識抽出のためのソフトウェアリポジトリの解析

Analyzing Software Repositories to Extract Knowledge for Supporting Refactoring Activities

林 晋平, 佐伯 元司

Shinpei Hayashi, Motoshi Saeki

電子情報通信学会技術研究報告, vol. 106, no. 16, pp. 1–6, 新潟大学(五十嵐キャンパス), 新潟, April 2006.

Abstract

リファクタリングの適用候補を特定することは,ソフトウェアの品質の向上につながるため有用である.筆者らはこれまでに,ソフトウェア開発環境に対して開発者が行った変更操作の履歴を利用して適用すべきリファクタリングを特定する手法について取り組んできた.しかし,この手法では識者が変更履歴の特徴をパターンとして事前に作成する必要があった.本稿では,リファクタリングの兆候となる変更履歴の特徴を既存のソフトウェアリポジトリから発見する手法の枠組みを提案する.提案手法では,まず開発者が過去に行った変更の履歴をソフトウェアリポジトリから抽出する.履歴は,プログラムの抽象構文木から差分を計算することにより編集スクリプトの列として求める.続いて,同リポジトリから過去に行われたリファクタリングの事例を取り出し,行われたリファクタリングに関連する構文要素の過去の変更履歴を調べることにより,変更履歴のパターンを作成する.本稿では,例として Jakarta Commons リポジトリに対して手法を適用し,その有用性について検討する.

Abstract (English)

It is effective to identify how and where to refactor programs because it improves the program design. We have so far proposed a technique to suggest refactoring opportunities by using a sequence of its modifications. However, the approach requires its users to describe the characteristic modification histories as modification patterns. In this paper, we propose a basic technique to discover characteristic modification histories from its repository, which in turn a technique to find refactoring opportunities. First, we extract modified snippets of code, or Edit Scripts, from a software repository. The Edit Scripts are prepared by calculating the difference of the Abstract Syntax Trees in the programs. We also extract past cases of refactorings, and then we create modification patterns by searching the modifications corresponding with cases of refactorings for frequented structures. We consider the effectiveness of our technique by applying it to Jakarta Commons software repository.

BibTeX

@article{hayashi-sigss200604,
    author = {林 晋平 and 佐伯 元司},
    title = {リファクタリング支援に用いる知識抽出のためのソフトウェアリポジトリの解析},
    journal = {電子情報通信学会技術研究報告},
    volume = 106,
    number = 16,
    pages = {1--6},
    year = 2006,
}
Type
Technical Meeting
Location
新潟大学(五十嵐キャンパス), 新潟
Presented
April 21, 2006
Volume / Pages
vol. 106, no. 16, pp. 1–6