コードクローン間の依存関係に基づくリファクタリング支援

書誌事項

タイトル別名
  • コードクローンカン ノ イゾン カンケイ 二 モトヅク リファクタリング シエン
  • コード クローンカン ノ イソン カンケイ ニ モトズク リファクタリング シエン
  • On Refactoring Support Based on Code Clone Dependency Relations
  • ソフトウェアテスト技法・保守技術

この論文をさがす

抄録

コードクローンとは,互いに一致または類似したコード片(ソースコードの断片)を持つコード片を意味し,ソフトウェア保守を困難にしている要因の1 つとされている.たとえば,あるコード片にバグが含まれていた場合,そのコード片のコードクローンすべてに対して,修正の是非を検討する必要がある.コードクローンを取り除く方法として,リファクタリングの適用が考えられる.リファクタリングとは,ソフトウェアの外部的振舞いを変化させることなく,内部の構造を改善する作業のことである.しかし,クローンセット(互いに一致または類似したコード片の集合)に含まれるコード片と周辺のコード片間に依存関係が存在すると,リファクタリングが困難になる場合がある.本稿は,クローンセット間の依存関係を利用したリファクタリング支援手法を提案する.まず,異なるクローンセットに含まれるコード片間の依存関係に着目し,そのような依存関係を持つコード片の集合をチェーンドクローンセットと定義する.そして,メトリクスを用いてチェーンドクローンセットの特徴を判定し,適用可能なリファクタリングパターンを提示する.最後に,リファクタリング支援ツールとして実装することで,いくつかのオープンソースソフトウェアに適用し,有効性の評価を行う.

Code clone is a set of code fragments identical or similar to each other. It is generally said that code clone is one of the factors that make software maintenance more difficult. If we modify one of them, it is necessary to determine whether or not we have to modify the others. Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. However, there are dependency relations between code fragments belonging to the different clone sets (a clone set is an equivalence class of code clones), and it is difficult to apply refactoring to such code clones. In this paper, we propose a refactoring support method by using dependency relations. At first, we focus on dependency relations between code fragments belonging to the different clone set, and we define “chained clone set” as such code fragments. Then, we define the metrics for providing an appropriate refactoring pattern to each “chained clone set”. Finally, we present the “chained clone set” refactoring support tool that we have developed, together with some case studies.

収録刊行物

被引用文献 (7)*注記

もっと見る

参考文献 (13)*注記

もっと見る

関連プロジェクト

もっと見る

キーワード

詳細情報 詳細情報について

問題の指摘

ページトップへ