1 / 5

dcNavi: デバッグ方法をアドバイス する関心事指向リポジトリナビゲータ

dcNavi: デバッグ方法をアドバイス する関心事指向リポジトリナビゲータ. 九州工業大学 塩塚大 九州 大学 鵜林尚靖. 研究の概要. 見たことない 例外 に直面 !. 例)同じ例外に関連した修正 例) API の誤りやすい例. public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname);

creola
Download Presentation

dcNavi: デバッグ方法をアドバイス する関心事指向リポジトリナビゲータ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. dcNavi: デバッグ方法をアドバイスする関心事指向リポジトリナビゲータ 九州工業大学 塩塚大 九州大学 鵜林尚靖

  2. 研究の概要 見たことない 例外に直面! 例)同じ例外に関連した修正 例)APIの誤りやすい例 public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } プロジェクトXXXの リポジトリ public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } プロジェクトXXXの リポジトリ APIの 使い方が間違ってる?! プロジェクトXXXの リポジトリ 生成 推薦 DCG 関心事 他プロジェクトの リポジトリを活用! Debug Concern Graph 実行 生成 TDD(テスト駆動開発) デバッグのノウハウの収集  ・テスト結果の取得  ・関連したプログラム要素の取得  ・修正パターンの取得

  3. DCG readFile のデバッグ :クラス :テスト結果 :メソッド :修正パターン diff-1 diff-2 バグ修正パターン(全27種) MC-DAP: メソッド呼出しのパラメータの変更 SQ-AROB: メソッド呼出しの追加 MC-DM:同一オブジェクトに対する呼び出すメソッドの変更 BufferedReader File Property PropertyTest Property File PropertyTest 修正パターン*: メソッド呼出の追加 FileReader exist readFile testReadFileFileNotExist testReadFile readLine readFile テスト成功 assertEquals testReadFileFileNotExist テスト成功 ⇒ デバッグ終了 テスト失敗 例外:FileNotFound *Pan, K., et al.: Toward an understanding of bug fix patterns. Empirical Software Engineering, pp.286-315, 2009. テスト成功 テスト失敗 ⇒ デバッグ開始 • デバッグ時のテスト結果、プログラム要素(クラス、メソッド、フィールド)、修正パターンの3情報を収集

  4. dcNavi テスト結果収集:JUnitを利用 修正パターン収集:diff + ASTParserを利用 関連したメソッド、フィールド、クラスの収集:Mylyn*を利用 Eclipse上でのファイル閲覧、編集、カーソル位置などを監視し作業(タスク)に関連した要素を記録. *Kersten, M. and Murphy, G. C.: Mylar: a degree-of-interest model for IDEs. In AOSD 2005, pp.159-168, 2005. • 統合開発環境Eclipseのプラグインとして作成 • 機能1.デバッグ活動を監視しDCGを自動生成 • 機能2.既存のSVNなどのバージョン管理システムからDCGを生成 • 機能3.関連情報を推薦

  5. 実験 • 準備.リポジトリからのDCG生成 • DCG生成時間の確認 • Eclipseプラグインで、Mylynに関連した9つのオープンソース • 実験.推薦量/推薦時間/推薦の質の確認 • 上記で生成したDCGを利用 [実施環境] CPU: Atom N280(1.66GHz), RAM:1GB, OS:Windows XP

More Related