73
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 大大大大大大大大大大大大大 大大大大大大大大大大大大大大 大大大大 大大大大大大大大大大大大大大 SPES2003 ソソソソソソソソソソソソソソソソソソソソソソソソ

大規模収集データに基づいた ソフトウェアエンジニアリング

  • Upload
    aadi

  • View
    41

  • Download
    3

Embed Size (px)

DESCRIPTION

SPES2003 ソフトウェアプロセスエンジニアリングシンポジウム. 大規模収集データに基づいた ソフトウェアエンジニアリング. 井上克郎 大阪大学大学院情報科学研究科. ソフトウェア開発は工学?. ソフトウェア開発の現状と問題点. ソフトウェアの信頼性 多数のバグを含んだソフトの流通 一度ダウンすると多大な社会的損失 ソフトウェアの生産性 開発期間の短縮要請 人海戦術による限界 経験的なノウハウや非科学的な手法,ツールを使う場合が多い. 科学的手法に基づくソフトウェア開発. - PowerPoint PPT Presentation

Citation preview

Page 1: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

大規模収集データに基づいたソフトウェアエンジニアリング

井上克郎大阪大学大学院情報科学研究科

SPES2003ソフトウェアプロセスエンジニアリングシンポジウム

Page 2: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ソフトウェア開発は工学?

Page 3: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ソフトウェア開発の現状と問題点

• ソフトウェアの信頼性– 多数のバグを含んだソフトの流通– 一度ダウンすると多大な社会的損失

• ソフトウェアの生産性– 開発期間の短縮要請– 人海戦術による限界

• 経験的なノウハウや非科学的な手法,ツールを使う場合が多い

Page 4: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

科学的手法に基づくソフトウェア開発• 多くの他の科学、工学分野では、計測して定量化し、評価を行い、それをフィードバックして改善を行うのが普通(フィードバックループ)

• ソフトウェア開発の分野では?

Page 5: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Zelkowitz-Wallaceによる評価法分類• 観測型 (Observational)実際に行われているプロジェクトを横から観測して評価

• 履歴型 (Historical)過去に行われたプロジェクトのデータや発表された論文に基づいて評価

• 制御型 (Controlled)目的とするデータを得るために環境を整えてプロジェクトを行い評価する

V. Zelkowitz, D. R.Wallace, "Experimental Models for Validating Technology", IEEE Computer, pp.23-31, May 1998.

Page 6: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

観測型評価

• プロジェクトモニタ– 対象を漠然と観察。目標不明確な場合も。簡単

• 事例研究– 対象をより深く解析。まだ、変動要素の制御が不十分だが、比較的簡便

• アサーション– 主張がなりたつことを簡単なプロジェクトで実証。厳密な評価としては不十分。

• 野外調査 (Field Study)– いろいろなプロジェクトを見て回る。条件を揃えるのが困難だが追証しやすい。

Page 7: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

履歴型• 文献調査

– 過去発表された論文を探す。条件や視点の統一不可能。簡単• 事例調査

– 過去のプロジェクトデータをひっくりかえす。条件不統一でデータ限られている

• 経験– 過去のプロジェクトの定性的なデータを調べる。定性的な議論できない。やりやすくて簡単に傾向がわかる

• (静的解析 )– 作ったプロダクトの解析をする。方法には適用できない。評価の自動化できるかもしれない。

Page 8: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

制御型

• 繰返し– 条件を揃えていくつものプロジェクトで繰り返す。高価。

• 実験室– 条件を揃えて実験室で繰り返す。スケーラビリティ。条件を制御しやすく比較的安価。

• (動的解析 )– プロダクトの効率を実行させて計測。方法には適用できない。

• (シミュレーション )– 仮想データで実行。

Page 9: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

発表された論文の分類(他の科学)方法\論文種類 デバイス 物理 臨床医学 人類学

評価なし 16% 58% 6% 31%プロジェクトモニタ事例評価 40% 16% 6% 8%アサーション 8% 4% 8%野外調査 18%

文献調査 4% 11% 24% 23%事例調査 6% 23%経験 5% 8%静的解析

繰返し   5% 12%実験室   29%動的解析 32% 5%シミュレーション

Page 10: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ソフトウェア工学の現状• 30年に亘って,いろいろな技法,システム,ツールなどの提案がされてきた.

• あまりにも,言いっぱなしの提案が多い– 評価するために手間暇かかる -> 歴史で評価 ( ICSE n-10)

Page 11: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ソフトウェア工学の論文が使っている評価法

0% 5% 10% 15% 20% 25% 30% 35% 40% 45%

シミュレーション

動的解析

実験室

繰返し

静的解析

経験

事例調査

文献調査

野外調査

アサーション

事例研究

プロジェクトモニタ

実験なし

評価法

論文の割合

1985

1990

1995

-ICSE-TSE-IEEE Software

Page 12: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Empirical Software Engineering

Page 13: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

エンピリカルソフトウェア工学• 定量的なデータに基づいてソフトウェア工学に

おけるいろいろな手法、技術、ツールなどの評価を行う

• データの収集が必須– 実際の開発現場のデータ– オープンソース開発プロジェクトのデータ

• エンピリカルソフトウェア工学に関する雑誌、国際会議、研究機関ができつつある

Page 14: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Journal by Kluwer

Empirical Software Engineering

Page 15: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

2002 International Symposium on Empirical Software Engineering

Page 16: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Fraunhofer IESE Model

• Fraunhofer財団(政府系研究支援)• Institute for Experimental Software Engineering• 大学工房モデル• Kaiserslautern大学を基礎• 大学から車で 10分• 仕事内容

– ソフトウェア開発に関わる技術評価– ソフトウェア品質向上システムの設計– 品質規格認証への支援– ソフトウェア技術者教育の支援– ソフトウェア購入・発注・開発管理の支援

Page 17: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Fraunhofer Institute for Experimental Software Engineering

Page 18: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

これからのソフトウェアエンジニアリング

Page 19: 大規模収集データに基づいた ソフトウェアエンジニアリング

データの粒度による分類粒度

計測・検索

粗対象

各開発者の作業や生産物

SoftwareArtifactプロダクト

ソフトウェア

人間

(3)ソフトウェアから人間への呈示情報

(2)人間からソフトウェアへの入力

(1)人間の状態

(4)ソフトウェアの状態

(5)プロダクトの状態

SoftwareArtifactSoftwareArtifactプロダクトプロダクト

ソフトウェア

人間

(3)ソフトウェアから人間への呈示情報

(2)人間からソフトウェアへの入力

(1)人間の状態

(4)ソフトウェアの状態

(5)プロダクトの状態

評価・分析目的

注視点

マウスカーソル

ユーザビリティ・問題把握

フィードバック形態

① ② ③

① ② ③

ヘルプ、ツール・ガイドライン

ソフトウェア開発計画プロジェクト実行

プロジェクトの定義されたソフトウェアプロセス(PDSP:Project’ s Defined Software Process)

プロセス要素

プロセスアーキテクチャ

組織のソフトウェアプロセス資産

組織の標準ソフトウェアプロセス

ソフトウェアライフサイクル ソフトウェアプロセス関連文書ライブラリ

組織のソフトウェアプロセスデータベース

スケジュールシステム要求

単一プロジェクト Busy

Current task

operation

Massage

Chat

File

Unfinished

Category

start delivery MD

02.06.24

02.07.29

32h

Massage: It will finish soon... Send

Analysis Use-case Req. Dev.

OrderMrg

ProductMrg

Related file

StocCont

CoutomerData

Jul.2002

12345678910111213141516171819202122232425

task1

NARA ProjectOnline

I upload the file.

OnlineAway

I’m busy...On Business trip

task2

task3

Task XX Task XX

Task XX

Task XX

Task XXTask XX

Task XX

Busy

Current task

operationoperation

Massage

Chat

File

Unfinished

Category

start delivery MD

02.06.24

02.07.29

32h

start delivery MD

02.06.24

02.07.29

32h

Massage: It will finish soon... Send

Analysis Use-case Req. Dev.

OrderMrg

ProductMrg

Related file

StocCont

CoutomerData

Jul.2002

12345678910111213141516171819202122232425

task1

NARA ProjectOnline

I upload the file.

OnlineAway

I’m busy...On Business trip

task2

task3

Task XX Task XX

Task XX

Task XX

Task XXTask XX

Task XX

進捗把握、コスト管理

プロセス改善、資産再利用

0.0%

5.0%

10.0%

15.0%

20.0%

25.0%

m10

m11

m12

m13

m14

m15

m16

m17

m18 0.6

0.7

0.8

0.9

0.9.

10.

9.2

0.9.

2.1

0.9.

30.

9.4

0.9.

4.1

0.9.

50.

9.6

0.9.

70.

9.8

0.9.

91.

01.

0.2

1.1

1.1a

1.1b

1.2.

11.

2a1.

2b1.

3a

version

0

500,000

1,000,000

1,500,000

2,000,000

2,500,000

3,000,000

3,500,000

0.0%

5.0%

10.0%

15.0%

20.0%

25.0%

m10

m11

m12

m13

m14

m15

m16

m17

m18 0.6

0.7

0.8

0.9

0.9.

10.

9.2

0.9.

2.1

0.9.

30.

9.4

0.9.

4.1

0.9.

50.

9.6

0.9.

70.

9.8

0.9.

91.

01.

0.2

1.1

1.1a

1.1b

1.2.

11.

2a1.

2b1.

3a

version

0

500,000

1,000,000

1,500,000

2,000,000

2,500,000

3,000,000

3,500,000

部品共通化、リファレンスモデル・標準化

プロジェクト群(企業内全資産、全オープンソース等)

パターンや部品、知見の抽出、利益予測

既存のソフトウェア工学技

Page 20: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

粗粒度データを対象とした SE

* (実用化はまだまだだが)ソフトウェア工学として細・中粒度はかなり研究されている

   →  Local  Software Engineering

*粗粒度を陽に意識したソフトウェア工学まだない  →  Global  Software Engineering

* 組織の利益に直結する結果が得やすい* 基礎となる技術の種はいろいろある* 計算機のパワーアップ、ネットワークの高速化によって、実現できそうな気配

Page 21: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ターゲットとなる研究・開発• プロジェクトにまたがった大規模データの収集,蓄積技術 (Inter-project Data Collection)

• 得られたデータを大域的に解析・評価技術 (Global Analysis)

• 評価結果に基づいて経験や知識を資産化する技術(Software Asset Management)

• 粒度間の情報交換技術 (Knowledge Circulation)

Page 22: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

目指すシステム

分析

ソフトウェア開発会社

関連会社

インターネット(パブリックドメインソフト、オープンソース開発データ)

収集

フィードバック

Page 23: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

システム使用イメージ• プログラムの生産性が、社内的な再利用やオープンソースの利用で劇的に上がる

• 管理しきれなかった膨大な社内資産が、見通しよく整理できた

• 過去の同類のプロジェクト情報を有効利用して、コスト管理が厳密になった

• 蓄積した欠陥情報を利用して、信頼性を大幅に改善された

Page 24: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

関連基礎技術 (1)コードクローン検出

Page 25: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

コードクローン ソースコード中に類似したコード片があるとき、それらをコードクローンという

   コードクローンはソフトウェア保守を困難にする

クローンペア

クローンクラス

Page 26: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

コードクローン検出ツー CCFinder ソースコードをトークン単位で直接比較することによりクローンを検出

数百万行規模のシステムにも実用時間で解析可能 実用的に意味のあるクローンのみを検出

– 名前空間の正規化(ユーザー定義名の置き換えに対処)– テーブル初期化部分を取り除く– モジュールの区切りを認識する

Page 27: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderの処理概要 (1)ソースコード

字句解析

変換処理

トークン列

検出処理

変換後トークン列

クローン情報

出力整形処理

クローンペア位置情報

CCfinder

Page 28: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderの処理概要 (2) ソースコード

字句解析

変換処理

トークン列

検出処理

変換後トークン列

クローン情報

出力整形処理

1. static void foo() throws RESyntaxException { 2. String a[] = new String [] { "123,400", "abc", "orange 100" }; 3. org.apache.regexp.RE pat = new org.apache.regexp.RE("[0-9,]+"); 4. int sum = 0; 5. for (int i = 0; i < a.length; ++i) 6. if (pat.match(a[i])) 7. sum += Sample.parseNumber(pat.getParen(0)); 8. System.out.println("sum = " + sum); 9. }10. static void goo(String [] a) throws RESyntaxException {11. RE exp = new RE("[0-9,]+");12. int sum = 0;13. for (int i = 0; i < a.length; ++i)14. if (exp.match(a[i]))15. sum += parseNumber(exp.getParen(0));16. System.out.println("sum = " + sum);17. }

static void foo ( ) {

String a [ ] = new String [ ] { "123,400" , "abc" , "orange 100" } ;

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

sum += pat . getParen 0 ;

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

Sample . parseNumber ( ) )

if pat . match a [ i ]( ) )

org . apache . regexp . RE pat = new org . apache . regexp . RE ( "[0-9,]+" ) ;

static void goo ( ) {String a [ ]

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

if exp . match a [ i ]( ) )

exp = new RE ( "[0-9,]+" ) ;

(

RE

sum += exp . getParen 0 ;parseNumber ( ) )(

(

(

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

クローンペア位置情報

Page 29: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderの処理概要 (3) ソースコード

字句解析

変換処理

トークン列

検出処理

変換後トークン列

クローン情報

出力整形処理

static void foo ( ) {

String a [ ] = new String [ ] { "123,400" , "abc" , "orange 100" } ;

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

sum += pat . getParen 0 ;

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

Sample . parseNumber ( ) )

if pat . match a [ i ]( ) )

org . apache . regexp . RE pat = new org . apache . regexp . RE ( "[0-9,]+" ) ;

static void goo ( ) {String a [ ]

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

if exp . match a [ i ]( ) )

exp = new RE ( "[0-9,]+" ) ;

(

RE

sum += exp . getParen 0 ;parseNumber ( ) )(

(

(

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

static void foo ( ) {

String a [ ] = new String [ ] { $u } ;

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

sum += pat . getParen 0 ;

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

Sample . parseNumber ( ) )

if pat . match a [ i ]( ) )

RE pat = new RE ( "[0-9,]+" ) ;

static void goo ( ) {String a [ ]

int sum = 0 ;

for ( int i = 0 ; i < a . length ; ++ i )

System . out . println ( "sum = " + sum ) ;

}

throws RESyntaxException

if exp . match a [ i ]( ) )

exp = new RE ( "[0-9,]+" ) ;

(

RE

sum += exp . getParen 0 ;parseNumber ( ) )(

(

(

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

$p .

static $p ( ) {

[ ] = new [ ] { $u } ;

= ;

for ( = ; < . ; ++ )

+= . ;

. . ( + ) ;

}

throws

. ( ) )

if . [ ]( ) )

= new ( ) ;

static ( ) {[ ]

= ;

for ( = ; < . ; ++ )

. . ( + ) ;

}

throws

if . [ ]( ) )

= new ( ) ;

(

+= . ;( ) )(

(

(

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

.

$p $p

$p $p

$p $p $p $p

$p $p $p

$p $p $p $p $p $p $p

$p $p $p $p

$p $p $p $p $p $p

$p $p $p $p $p

$p $p $p $p $p

$p $p $p $p

$p $p $p

$p $p $p $p $p $p $p

$p $p $p $p

$p $p $p $p $p $p

$p $p $p $p $p

$p

クローンペア位置情報

Page 30: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderの処理概要 (4) ソースコード

字句解析

変換処理

トークン列

検出処理

変換後トークン列

クローン情報

出力整形処理

クローンペア位置情報

* * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * ** ** * * * * ** ** * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * ** ** * * * * ** ** * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * ** ** * ** ** ** * * ** * ** * * * * * * * * * * * * * * * * * * * * * * * ** ** * * * * ** ** * * * * * * * * * * * * * * * * * * * * *

Page 31: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderの処理概要 (5) ソースコード

字句解析

変換処理

トークン列

検出処理

変換後トークン列

クローン情報

出力整形処理

クローンペア位置情報

1. static void foo() throws RESyntaxException { 2. String a[] = new String [] { "123,400", "abc", "orange 100" }; 3. org.apache.regexp.RE pat = new org.apache.regexp.RE("[0-9,]+"); 4. int sum = 0; 5. for (int i = 0; i < a.length; ++i) 6. if (pat.match(a[i])) 7. sum += Sample.parseNumber(pat.getParen(0)); 8. System.out.println("sum = " + sum); 9. }10. static void goo(String [] a) throws RESyntaxException {11. RE exp = new RE("[0-9,]+");12. int sum = 0;13. for (int i = 0; i < a.length; ++i)14. if (exp.match(a[i]))15. sum += parseNumber(exp.getParen(0));16. System.out.println("sum = " + sum);17. }

Page 32: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

適用例 #1 JDKのライブラリ• JDK( Java Development Kit) 1.2.2(サンプルとデモプログラムを除く)

• 入力ファイルは 164 8個,約 50 万行

• ツールの実行には, Pentium III 650MHz および1GBの RAMを持つ PCで約 3分を要した

Page 33: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

JDKのコードクローン散布図• 両軸はソースファイルを辞書順に並べたもの

• 20行以上のコードクローンを図示

• 多くのコードクローンが密集している( A)

• 最長のコードクローン( B)

A

B

Page 34: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

コードクローンが密集している部分( A)

• src/javax/swing/plaf/multi/*.java( 29個)– クラス名を除いてまったく同じクラスの定義– コード生成ツールによって生成された

31| */32| public class MultiButtonUI extends ButtonUI {33|  160| public static ComponentUI createUI(JComponent a) {161| ComponentUI mui = new MultiButtonUI();162| return MultiLookAndFeel.createUIs(mui,163| ((MultiButtonUI) mui).uis,164| a);165| }

Page 35: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

最長のコードクローン( B)• 最長のコードクローン( 349行)• src/java/util/Arrays.javaの 18の“ sort”メソッド• シグネチャ(引数の型と数)が異なる• アルゴリズムは同一

Page 36: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

FreeBSD, Linux, NetBSDの比較• 3つの OSの比較

– FreeBSD 4.0 (C 220万行 )

– Linux 2.4.0 (C 240万行 )

– NetBSD 1.5 ( C 260万行 )

• FreeBSDと NetBSDは同じソースコードから,Linuxは異なるソースコード

• 実行には 108分を要した

Page 37: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

UNIX カーネル間のコードクローンFreeBSD 4.0 Linux 2.4.0 NetBSD 1.5

Fre

eB

SD

4.0

Lin

ux 2

.4.0

Net

BSD

1.5

Page 38: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

FreeBSDと Linuxのコードクローン• ドライバ部分に多くのクローン「ファイル」が存在 する

• 共通のソースから分岐したソースファイル

• 名前が付け替えられたソースファイル

• あるソースファイルを複数のファイルに分割している →

sys/

ker

n/infl

ate.

c

sys/

net

/zlib.

c

arch

/ppc

/coff

boot

/zl

ib.c

driv

ers/

net

/zlib.

c

fs/c

ram

fs/infl

ate/

{adl

er32

.c,

infb

lock

.c,

infc

odes

.c,

inff

ast.

c,

infl

ate.

c,

inft

rees

.c,

infu

til.c

}

lib/

infl

ate.

c

FreeBSD 4.0 Linux 2.4.0

sys/

i386

/boo

t/kzi

pboo

t/m

isc.

c

sys/

pc98

/boo

t/kzi

pboo

t/m

isc.

c

sys/i386/boot/kzipboot/misc.c

sys/kern/inflate.c

sys/net/zlib.c

sys/pc98/boot/kzipboot/misc.c

arch/ppc/coffboot/zlib.c

drivers/net/zlib.c

fs/cramfs/inflate/{adler32.c, infblock.c, infcodes.c, inffast.c, inflate.c, inftrees.c, infutil.c }

lib/inflate.c

Fre

eBSD

4.0

Lin

ux

2.4.

0

Page 39: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

関連基礎技術 (2)ソフトウェアシステムの類似

Page 40: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

• 二つのプロダクト P={p1,…,pm},Q={q1,…,qm}に対し、等価な要素の対応 R P×Q⊆ が得られるとする

• Pと Qの Rに対する類似度 S(0 S 1)≦ ≦ を以下のように定義する

類似度の定義

QP

R}|),q|(p|{qR}|),q|(p|{pS(P,Q)

jijjii

P Q

Page 41: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

CCFinderを利用したシステム間類似度

前処理

Step1

CCFinderの実行

Step2

diffの実行

Step3

対応の抽出

Step4

類似度の計算

Step5

P

Q

類似度

前処理後の P

前処理後のQ

CCFinderの実行結果

diffの実行結果

抽出結果

SMMT

Page 42: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

実験• UNIX系 OSを用いて類似度を計算した

– 4.4BSDLite, 4.4BSDLite2– FreeBSD2.0, 2.0.5, 2.1, 2.2, 3.0, 4.0– NetBSD1.0, 1.1, 1.2, 1.3, 1.4, 1.5– OpenBSD2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

• 23個の OSのすべての組み合わせで類似度を求めた

• カーネル部分の C言語のソースのみ

Page 43: 大規模収集データに基づいた ソフトウェアエンジニアリング
Page 44: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

同一種類の OS間での類似度• FreeBSD 2.2との間の類似度

Page 45: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

異なる種類の OS間での類似度• FreeBSD3.0と NetBSD1.3で 4.4BSDLite2が取り込まれている

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

FreeBSD 2.0 FreeBSD 2.0.5 FreeBSD 2.1 FreeBSD 2.2 FreeBSD 3.0 FreeBSD 4.0

NetBSD 1.0

NetBSD 1.1

NetBSD 1.2

NetBSD 1.3

Page 46: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

 類似度を距離とした系統樹

Page 47: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

関連基礎技術 (3)ソフトウェア部品検索

Page 48: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ソフトウェア部品の再利用• 膨大なソフトウェアが毎日開発され続けている• 同様なソフトウェア部品 (ライブラリやコード片、抽象的なアルゴリズム ...) が異なるところで独立に開発されているかもしれない

• 高信頼性、高生産性の鍵– 再利用

• ソフトウェアライブラリを探し回るのは大変 – サーチ機能が貧弱– 整合性を保った管理は困難

• 人手を介さない、自動的に保存、検索ができる部品ライブラリが必須

Page 49: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

部品ランクモデル• 検索結果の表示順を決めるためのモデル

• プログラム部品 (component) 群をグラフ化• 部品の重み計算• 重みの順序:部品ランク Component Rank (CR) 

Page 50: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

部品グラフ

A B

C

ED

F

G

IH

システム X システム Y

部品利用

Page 51: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

類似部品の集約

C

B

A

G

F

D E

部品グラフ

C

BF

AD E

G

集約化した部品グラフFB D,A

Page 52: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

部品の重み

A B

C

0.4 0.2

0.4

0.2

0.2

0.20.4

安定した重み配置は、隣接行列の固有値計算による部品ランク : 頂点の重みの順  1:A, C 3:B

Page 53: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

部品ランクモデルの意味

• ユーザの視点移動をマルコフモデルで表したもの• 単位時間ごとにユーザ視点が利用関係に沿って移動• 頂点の重みはユーザ視点の存在 確率

0.01

0.02 0.01

0.030.05

0.001 0.1

Page 54: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

部品ランクの適用例JDK1.3(約 1800ファイル)を対象として部品ランクを計算• 言語仕様上、直接的、間接的に利用しなければならないクラスが上位を占めている順位 部品名 評価値

1 java.lang.Object.java 0.1308420772 java.lang.Class.java 0.0707799043 java.io.EOFException.java 0.051143644

・・・3 java.io.IOException.java 0.051143644

66 .org.w3c.dom.Node.java 0.03459925267 java.lang.Throwable.java 0.0304725668 java.lang.StringBuffer.java 0.01469505169 javax.naming.NamingException.java 0.01391437970 java.lang.VirtualMachineError.java 0.01090646771 org.w3c.dom.NodeList.java 0.01054713472 java.io.InputStream.java 0.010030122

Page 55: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

S P A R S-J

インターネット・イントラネット

ソフトウェア検索者

ComponentCollector

Analyzer and Evaluator

ComponentArchive

Query Handler

Software Product Archiving, Analyzing and Retrieving System for Java

SPARS-J

Page 56: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

Page 57: 大規模収集データに基づいた ソフトウェアエンジニアリング
Page 58: 大規模収集データに基づいた ソフトウェアエンジニアリング
Page 59: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

エンピリカルソフトウェア工学

プロジェクト ESEP

Page 60: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

プロジェクト概要• 文部科学省リーディングプロジェクト

– e-society基盤ソフトウェア総合開発計画• 2003年 4 月開始で 5年計画• 奈良先端科学技術大学院大学 /大阪大学• 産学連携の大学工房モデル

Page 61: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

大学工房モデル実践的ソフトウェア工学のための産学協力方式

大学 大学工房 産業界

人材派遣新しい技術

技術の評価結果研究資金新しいテーマの発見

人材派遣問題提供予算提供

問題解決ノウハウ吸収人材育成

Page 62: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

エンピリカルソフトウェア工学ラボ• 千里中央にオフィス• 専任研究員、企業出向者、大学研究者、事務員滞在• 研究開発のみならず交流の拠点

– 多様なソフトウェア工学に関する技術委員会– 常に内外の市場調査

Page 63: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

海外との連携

フラウンホッファー実験的ソフトウェア工学研究所(独: Kaiseralautern)所長 :Dr.Dieter Rombach( Kaiseralautern大学)

メリーランド、フラウンホッファー実験的ソフトウェア工学センターFC-MD(米: Maryland)所長: Dr.Victor Basili( Maryland大学)

エンピリカルソフトウェア工学ラボ(大阪・千里中央)

データに基づいたソフトウェア開発支援システム

大阪大学 奈良先端科学技術大学院大学

技術委員会

文部科学省e-Society基盤ソフトウェア総合開発計画

グローバルなエンピリカルソフトウェア工学研究グループ

フラウンホッファー実験的ソフトウェア工学研究所IESE

エンピリカルソフトウェア工学研究センタCAESER(豪:シドニー)Dr.Ross Jeffery(ニューサウスウェールズ大学 )Dr.B.Bohem

共同研究

各企業

IESE : Fraunhofer Institute for Experimental Software EngineeringFC-MD: Fraunhofer Center for Experimental Software Engineering, Maryland CAESER: Center for Empirical Software Engineering Research

協力

Page 64: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

ベースとなるシステム• オープンソース開発管理システムを基本

– CVS :レポジトリ構築、バージョン管理– MailMan :メール蓄積、管理– Gnats :バグ追跡

• 既存 のWebインターフェースの利用– Corporate  Source ( ZeeSource)

Page 65: 大規模収集データに基づいた ソフトウェアエンジニアリング

DataCollector

DataCollector Data

Collector

ProcessData

ProductData

ProcessAnalysis

ProductAnalysis

ProjectData

Achieve

Open Source

Project A Project B Project C

ProjectRepository

Developers

Manager

Data Feedback

Standard Software Engineering Data Format (XML)

SED (Software Engineering Data) Browser Project Controller

XML DB

Software ComponentsProgress History (CSV)

CVSLog Files

CVS/ MailMan/Gnats

System Architecture

Page 66: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

グローバル SEのためのデータの標準化

• プロダクトデータ– CVSを使った各種プロダクトの履歴– プロダクト間の種々の関係定義を XMLで標準化

• プロセスデータ– XMLを使った標準形式のイベント系列を蓄積

• CVS、MailMan、 Gnatsのログなどから自動抽出(粗粒度情報)• 各作業者の作業環境からの標準形式での情報提供(細粒度情報も可能)

• プロセス・プロダクト間関連データ

Page 67: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

プロダクトデータに関して

• 関連情報の自動抽出• プロダクトの自動分類• 再利用部品の抽出• プロダクト情報のインデキシング、蓄積手法• 検索、ブラウジング手法

Page 68: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

プロセスデータに関して

• プロダクトデータからプロセスデータの抽出法• プロセスデータの自動報告• プロセスデータの正規化手法• 組織レベル、プロジェクトレベル、個人レベルそれぞれの解析

• プロセス比較、評価手法

Page 69: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

システムの使用イメージ (プロジェクト内)

トータルサイズ完成モジュール数成功テストケースドキュメント章数バグレポート数...

平均作業量

開発者 Xの作業量

予想進捗投入コスト

t

t

work

Page 70: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

システムの使用イメージ(プロジェクト比較)

Project AProject B

Project C

t

progress

project

cost

1 2 3 4 5

進捗度の比較バグ、信頼度の予測

コストの比較

Page 71: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

システムの使用イメージ(プロダクト)

ソフトウェア部品、コード片検索キーワード入力コード片(クローン)

類似プロダクトの分類、整理

Page 72: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

今後の計画• 11月始めに、連携海外研究者と共同WS• WSで本システムの初期バージョンの公開• 初期バージョンの利用促進

– 評価に参加する協力企業の募集

• それ以外の一般参加企業の募集

Page 73: 大規模収集データに基づいた ソフトウェアエンジニアリング

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University

受託開発と開発データ

• この種の開発データの添付がソフトウェア受託開発の契約に重要になってくる– クリティカルシステムのみならず、一般のソフトウェアシステムでも社会的なインパクトが大きくなってきている

– ちゃんと開発しているかの把握、フェイクしにくい直接データ

– ちゃんと開発しているところにとっては容易なこと– ISO9000や CMMのための基礎データとしても有用