| 講演抄録/キーワード |
| 講演名 |
2006-08-03 16:30
コードクローンを対象としたリファクタリングの有効性に関する調査 ○肥後芳樹・楠本真二・井上克郎(阪大) |
| 抄録 |
(和) |
ソフトウェアの保守性を改善する手段としてリファクタリングが挙げられる.リファクタリングとは,ソフトウェアの外部的な振る舞いを保ったままで,内部構造を改善していくことである.重複コード(コードクローン)は最も優先してリファクタリングすべき箇所と指摘されているが,具体的な評価事例はほとんど報告されていない.本稿では,コードクローンに対してリファクタリングを行うコストとその効果を調査し,有効性を評価する.題材は15バージョンのソースコードが公開されているオープンソースソフトウェアであり,その最初のバージョンに対してリファクタリングを行った.コストの尺度としてソースコード修正と回帰テストに要した時間を用い,効果の尺度としてCKメトリクス値の変化と総行数の増減,集約箇所の後のバージョンでの修正回数を用いた.調査の結果,コードクローンのリファクタリングは,メトリクス値の改善についてはあまり効果が無いものの,その後の修正回数の削減については効果があることが分かった.また個々のリファクタリングに要したコストは多くても20分程度であるという結果であった. |
| (英) |
Refactoring is a disciplined technique for restructuring an existing body
of code, altering its internal structure without changing its external behavior. It is said that duplicated code is one of bad implementations to be refactored, but usefulness of the refactoring hasn't been reported yet. In this paper, we investigate cost and effectiveness of the refactoring to evaluate the usefulness. The target is an open source software system, 15 versions of whose source code a re published. We refactored code clones in the first version. We used the time that we spent to modify the source code and perform regression tests as a cost metric, and the changes of CK metrics and the number of modifyin g the refactored parts from the second version to the final version as effective metrics. As a result, we found that the code clone refactorings didn't improve CK metrics values, but reduced the number of modifications. The cost of each refactoring was at most 20 minutes. |
| キーワード |
(和) |
リファクタリング / ソフトウェア保守 / コードクローン / / / / / |
| (英) |
refactoring / software maintenacne / code clone / / / / / |
| 文献情報 |
信学技報, vol. 106, no. 201, SS2006-31, pp. 37-42, 2006年8月. |
| 資料番号 |
SS2006-31 |
| 発行日 |
2006-07-27 (SS) |
| ISSN |
Print edition: ISSN 0913-5685 |
| PDFダウンロード |
|