SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
Transfer Defect Learning
Jaechang Nam
The Hong Kong University of Science and Technology, China
Sinno Jialian Pan
Institute for Infocomm Research, Singapore
Sunghun Kim
The Hong Kong University of Science and Technology, China
Defect Prediction
• Hassan et al.@ICSE`09, Predicting Faults Using the Complexity of Code
Changes
• D’Ambros et al.@MSR`10, An Extensive Comparison of Bug Prediction
Approaches
• Rahman et al.@ICSE`12, Recalling the Impression of Cross-Project Defect
Prediction
• Hata et al.@ICSE`12, Bug Prediction based on Fine-grained Module
histories
• …
2
Program Prediction Model
(Machine learning)
Future defects
Training prediction model
3
Test set
Training set
Training prediction model
3
Test set
Training set
M1 M2 … M19 M20 Class
11 5 … 53 78 Buggy
… … … … … …
1 1 … 3 9 Clean
M1 M2 … M19 M20 Class
2 1 … 2 8 ?
… … … … … …
13 6 … 45 69 ?
Cross prediction model
4
Target project (Test set)
Source project (Training set)
Cross-project Defect Prediction
5
“Training data is often not available, either
because a company is too small or it is the first
release of a product”
Zimmerman et al.@FSE`09, Cross-project Defect Prediction
Cross-project Defect Prediction
5
“Training data is often not available, either
because a company is too small or it is the first
release of a product”
Zimmerman et al.@FSE`09, Cross-project Defect Prediction
“For many new projects we may not have enough
historical data to train prediction models.”
Rahman, Posnett, and Devanbu @ICSE`12, Recalling the
“Imprecision” of Cross-project Defect Prediction
Cross-project defect prediction
• Zimmerman et al.@FSE`09
– “We ran 622 cross-project predictions and found
only 3.4% actually worked.”
6
Worked,
3.4%
Not
worked,
96.6%
Cross-company defect prediction
• Turhan and Menzies et al.@ESEJ`09
– “Within-company data models are still the best”
7
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
Cross Cross with a NN
filter
Within
Avg. F-measure
Cross-project defect prediction
• Rahman, Posnett, and Devanbu@FSE`12
8
0
0.1
0.2
0.3
0.4
0.5
0.6
Cross Within
Avg. F-measure
Cross prediction results
9
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
F-measure
Cross Within Cross Within Cross Within
Equinox JDT Lucene
Approaches of Transfer Defect Learning
10
Normalization TCA
TCA+
11
• Data preprocessing for training and test dataNormalization
• A state-of-the art transfer learning algorithm
• Transfer Component AnalysisTCA
• Adapted TCA for cross-project defect prediction
• Decision rules to select a suitable data normalization optionTCA+
Approaches of Transfer Defect Learning
Data Normalization
• Adjust all feature values in the same scale
– E.g., Make Mean = 0 and Std = 1
• Known to be helpful for classification
algorithms to improve prediction
performance [Han et al. 2012].
12
Normalization Options
• N1: Min-max Normalization (max=1, min=0)
[Han et al., 2012]
• N2: Z-score Normalization (mean=0, std=1)
[Han et al., 2012]
• N3: Z-score Normalization only using source
mean and standard deviation
• N4: Z-score Normalization only using target
mean and standard deviation
13
14
• Data preprocessing for training and test dataNormalization
• A state-of-the art transfer learning algorithm
• Transfer Component Analysis
TCA
• Adapted TCA for cross-project defect prediction
• Decision rules to select a suitable data normalization optionTCA+
Approaches of Transfer Defect Learning
Transfer Learning
15
Transfer Learning
15
Traditional Machine Learning (ML)
Learning
System
Learning
System
Transfer Learning
15
Traditional Machine Learning (ML)
Learning
System
Learning
System
Transfer Learning
Learning
System
Learning
System
Knowledge
Transfer
Transfer Learning
15
Traditional Machine Learning (ML)
Learning
System
Learning
System
Transfer Learning
Learning
System
Learning
System
Knowledge
Transfer
A Common Assumption in
Traditional ML
16
Pan andYang@TKDE`10, Survey onTransfer Learning
• Same distribution
A Common Assumption in
Traditional ML
16
Pan andYang@TKDE`10, Survey onTransfer Learning
• Same distribution
Cross Prediction
A Common Assumption in
Traditional ML
16
Pan andYang@TKDE`10, Survey onTransfer Learning
• Same distribution
Transfer Learning
Transfer Component Analysis
• Unsupervised Transfer learning
– Target project labels are not known.
• Must have the same feature space
• Make distribution difference between
training and test datasets similar
17
Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
18
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
18
2-dimensional feature space
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
18
1-dimensional feature space
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
18
1-dimensional feature space
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
18
1-dimensional feature space
2-dimensional feature space
Transfer Component Analysis (cont.)
• Feature extraction approach
– Dimensionality reduction
– Projection
• Map original data
in a lower-dimensional feature space
– C.f. Principal Component Analysis (PCA)
18
1-dimensional feature space
Transfer Component Analysis (cont.)
19
Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis
Target domain data
Source domain data
Transfer Component Analysis (cont.)
20
PCA TCA
Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis
Preliminary Results using TCA
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
F-measure
21*Baseline: Cross-project defect prediction without TCA and normalization
Baseline NoN N1 N2 N3 N4 Baseline NoN N1 N2 N3 N4
Safe  Apache Apache  Safe
Preliminary Results using TCA
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
F-measure
21*Baseline: Cross-project defect prediction without TCA and normalization
Prediction performance of TCA
varies according to different
normalization options!
Baseline NoN N1 N2 N3 N4 Baseline NoN N1 N2 N3 N4
Safe  Apache Apache  Safe
22
• Data preprocessing for training and test dataNormalization
• A state-of-the art transfer learning algorithm
• Transfer Component Analysis
TCA
• Adapted TCA for cross-project defect prediction
• Decision rules to select a suitable data
normalization option
TCA+
Approaches of Transfer Defect Learning
TCA+: Decision rules
• Find a suitable normalization for TCA
• Steps
– #1: Characterize a dataset
– #2: Measure similarity
between source and target datasets
– #3: Decision rules
23
#1: Characterize a dataset
24
3
1
…
Dataset A Dataset B
2
4
5
8
9
6
11
d1,2
d1,5
d1,3
d3,11
3
1
…
2
4
5
8
9
6
11
d2,6
d1,2
d1,3
d3,11
DIST={dij : i,j, 1 ≤ i < n, 1 < j ≤ n, i < j}
A
#2: Measure Similarity between
source and target
• Minimum (min) and maximum (max) values of
DIST
• Mean and standard deviation (std) of DIST
• The number of instances
25
#3: Decision Rules
• Rule #1
– Mean and Std are same  NoN
• Rule #2
– Max and Min are different  N1 (max=1, min=0)
• Rule #3,#4
– Std and # of instances are different
 N3 or N4 (src/tgt mean=0, std=1)
• Rule #5
– Default  N2 (mean=0, std=1)
26
EVALUATION
27
Experimental Setup
• 8 software subjects
• Machine learning algorithm
– Logistic regression
28
ReLink (Wu et al.@FSE`11)
Projects
# of metrics
(features)
Apache
26
(Source code)
Safe
ZXing
AEEEM (D’Ambros et al.@MSR`10)
Projects
# of metrics
(features)
Apache Lucene (LC)
61
(Source code,
Churn,
Entropy,…)
Equinox (EQ)
Eclipse JDT
Eclipse PDE UI
Mylyn (ML)
Experimental Design
29
Test set
(50%)
Training set
(50%)
Within-project defect prediction
Experimental Design
30
Target project (Test set)
Source project (Training set)
Cross-project defect prediction
Experimental Design
31
Target project (Test set)
Source project (Training set)
Cross-project defect prediction with TCA/TCA+
TCA/TCA+
RESULTS
32
ReLink Result
33*Baseline: Cross-project defect prediction without TCA/TCA+
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
F-measure
Baseline TCA TCA+ Within
Safe  Apache Apache  Safe Safe  ZXing
Baseline TCA TCA+ Within Baseline TCA TCA+ Within
ReLink Result
F-measure
34
Cross
Source  Target
Safe  Apache
Zxing  Apache
Apache  Safe
Zxing  Safe
Apache  ZXing
Safe  ZXing
Average
Baseline
0.52
0.69
0.49
0.59
0.46
0.10
0.49
TCA
0.64
0.64
0.72
0.70
0.45
0.42
0.59
TCA+
0.64
0.72
0.72
0.64
0.49
0.53
0.61
Within
Target  Target
0.64
0.62
0.33
0.53
*Baseline: Cross-project defect prediction without TCA/TCA+
AEEEM Result
35*Baseline: Cross-project defect prediction without TCA/TCA+
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
F-measure
Baseline TCA TCA+ Within
JDT  EQ PDE  LC PDE  ML
Baseline TCA TCA+ Within Baseline TCA TCA+ Within
AEEEM Result
F-measure
36
Cross
Source  Target
JDT  EQ
LC  EQ
ML  EQ
…
PDE  LC
EQ  ML
JDT  ML
LC  ML
PDE ML
…
Average
Baseline
0.31
0.50
0.24
…
0.33
0.19
0.27
0.20
0.27
…
0.32
TCA
0.59
0.62
0.56
…
0.27
0.62
0.56
0.58
0.48
…
0.41
TCA+
0.60
0.62
0.56
…
0.33
0.62
0.56
0.60
0.54
…
0.41
Within
Source  Target
0.58
…
0.37
0.30
…
0.42
Threats to Validity
• Systems are open-source projects.
• Experimental results may not be
generalizable.
• Decision rules in TCA+ may not be
generalizable.
37
Future Work
• Transfer defect learning on different
feature space
– e.g., ReLink  AEEEM
AEEEM  ReLink
• Local models using Transfer Learning
• Adapt Transfer learning in other Software
Engineering (SE) problems
– e.g., Knowledge from mailing lists
 Bug triage problem
38
Conclusion
• TCA+
– TCA
• Make distributions of source and target similar
– Decision rules to improve TCA
– Significantly improved cross-project defect
prediction performance
• Transfer Learning in SE
– Transfer learning may benefit other
prediction and recommendation systems in
SE domains.
39

Weitere ähnliche Inhalte

Was ist angesagt?

A Note on BPTT for LSTM LM
A Note on BPTT for LSTM LMA Note on BPTT for LSTM LM
A Note on BPTT for LSTM LMTomonari Masada
 
[DL輪読会]ドメイン転移と不変表現に関するサーベイ
[DL輪読会]ドメイン転移と不変表現に関するサーベイ[DL輪読会]ドメイン転移と不変表現に関するサーベイ
[DL輪読会]ドメイン転移と不変表現に関するサーベイDeep Learning JP
 
Domain Adaptation 発展と動向まとめ(サーベイ資料)
Domain Adaptation 発展と動向まとめ(サーベイ資料)Domain Adaptation 発展と動向まとめ(サーベイ資料)
Domain Adaptation 発展と動向まとめ(サーベイ資料)Yamato OKAMOTO
 
[DL輪読会]Dense Captioning分野のまとめ
[DL輪読会]Dense Captioning分野のまとめ[DL輪読会]Dense Captioning分野のまとめ
[DL輪読会]Dense Captioning分野のまとめDeep Learning JP
 
変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)Takao Yamanaka
 
大須賀・田原・清研究室の研究事例
大須賀・田原・清研究室の研究事例大須賀・田原・清研究室の研究事例
大須賀・田原・清研究室の研究事例0hsuga
 
GAN(と強化学習との関係)
GAN(と強化学習との関係)GAN(と強化学習との関係)
GAN(と強化学習との関係)Masahiro Suzuki
 
backbone としての timm 入門
backbone としての timm 入門backbone としての timm 入門
backbone としての timm 入門Takuji Tahara
 
20190619 オートエンコーダーと異常検知入門
20190619 オートエンコーダーと異常検知入門20190619 オートエンコーダーと異常検知入門
20190619 オートエンコーダーと異常検知入門Kazuki Motohashi
 
2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)Tatsuya Yokota
 
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までー
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までーDeep Learningによる画像認識革命 ー歴史・最新理論から実践応用までー
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までーnlab_utokyo
 
混合モデルとEMアルゴリズム(PRML第9章)
混合モデルとEMアルゴリズム(PRML第9章)混合モデルとEMアルゴリズム(PRML第9章)
混合モデルとEMアルゴリズム(PRML第9章)Takao Yamanaka
 
言語と画像の表現学習
言語と画像の表現学習言語と画像の表現学習
言語と画像の表現学習Yuki Noguchi
 
CycleGANについて
CycleGANについてCycleGANについて
CycleGANについてyohei okawa
 
動画像を用いた経路予測手法の分類
動画像を用いた経路予測手法の分類動画像を用いた経路予測手法の分類
動画像を用いた経路予測手法の分類Tsubasa Hirakawa
 
確率モデルを使ったグラフクラスタリング
確率モデルを使ったグラフクラスタリング確率モデルを使ったグラフクラスタリング
確率モデルを使ったグラフクラスタリング正志 坪坂
 
Transformerを用いたAutoEncoderの設計と実験
Transformerを用いたAutoEncoderの設計と実験Transformerを用いたAutoEncoderの設計と実験
Transformerを用いたAutoEncoderの設計と実験myxymyxomatosis
 
You Only Learn One Representation: Unified Network for Multiple Tasks
You Only Learn One Representation: Unified Network for Multiple TasksYou Only Learn One Representation: Unified Network for Multiple Tasks
You Only Learn One Representation: Unified Network for Multiple Tasksharmonylab
 

Was ist angesagt? (20)

A Note on BPTT for LSTM LM
A Note on BPTT for LSTM LMA Note on BPTT for LSTM LM
A Note on BPTT for LSTM LM
 
[DL輪読会]ドメイン転移と不変表現に関するサーベイ
[DL輪読会]ドメイン転移と不変表現に関するサーベイ[DL輪読会]ドメイン転移と不変表現に関するサーベイ
[DL輪読会]ドメイン転移と不変表現に関するサーベイ
 
Domain Adaptation 発展と動向まとめ(サーベイ資料)
Domain Adaptation 発展と動向まとめ(サーベイ資料)Domain Adaptation 発展と動向まとめ(サーベイ資料)
Domain Adaptation 発展と動向まとめ(サーベイ資料)
 
Graph U-Nets
Graph U-NetsGraph U-Nets
Graph U-Nets
 
[DL輪読会]Dense Captioning分野のまとめ
[DL輪読会]Dense Captioning分野のまとめ[DL輪読会]Dense Captioning分野のまとめ
[DL輪読会]Dense Captioning分野のまとめ
 
Prml6
Prml6Prml6
Prml6
 
変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)変分推論法(変分ベイズ法)(PRML第10章)
変分推論法(変分ベイズ法)(PRML第10章)
 
大須賀・田原・清研究室の研究事例
大須賀・田原・清研究室の研究事例大須賀・田原・清研究室の研究事例
大須賀・田原・清研究室の研究事例
 
GAN(と強化学習との関係)
GAN(と強化学習との関係)GAN(と強化学習との関係)
GAN(と強化学習との関係)
 
backbone としての timm 入門
backbone としての timm 入門backbone としての timm 入門
backbone としての timm 入門
 
20190619 オートエンコーダーと異常検知入門
20190619 オートエンコーダーと異常検知入門20190619 オートエンコーダーと異常検知入門
20190619 オートエンコーダーと異常検知入門
 
2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)
 
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までー
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までーDeep Learningによる画像認識革命 ー歴史・最新理論から実践応用までー
Deep Learningによる画像認識革命 ー歴史・最新理論から実践応用までー
 
混合モデルとEMアルゴリズム(PRML第9章)
混合モデルとEMアルゴリズム(PRML第9章)混合モデルとEMアルゴリズム(PRML第9章)
混合モデルとEMアルゴリズム(PRML第9章)
 
言語と画像の表現学習
言語と画像の表現学習言語と画像の表現学習
言語と画像の表現学習
 
CycleGANについて
CycleGANについてCycleGANについて
CycleGANについて
 
動画像を用いた経路予測手法の分類
動画像を用いた経路予測手法の分類動画像を用いた経路予測手法の分類
動画像を用いた経路予測手法の分類
 
確率モデルを使ったグラフクラスタリング
確率モデルを使ったグラフクラスタリング確率モデルを使ったグラフクラスタリング
確率モデルを使ったグラフクラスタリング
 
Transformerを用いたAutoEncoderの設計と実験
Transformerを用いたAutoEncoderの設計と実験Transformerを用いたAutoEncoderの設計と実験
Transformerを用いたAutoEncoderの設計と実験
 
You Only Learn One Representation: Unified Network for Multiple Tasks
You Only Learn One Representation: Unified Network for Multiple TasksYou Only Learn One Representation: Unified Network for Multiple Tasks
You Only Learn One Representation: Unified Network for Multiple Tasks
 

Andere mochten auch

Video concept detection by learning from web images
Video concept detection by learning from web imagesVideo concept detection by learning from web images
Video concept detection by learning from web imagesMediaMixerCommunity
 
A survey on transfer learning
A survey on transfer learningA survey on transfer learning
A survey on transfer learningazuring
 
How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012Sung Kim
 
The Anatomy of Developer Social Networks
The Anatomy of Developer Social NetworksThe Anatomy of Developer Social Networks
The Anatomy of Developer Social NetworksSung Kim
 
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)Sung Kim
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...Sung Kim
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving softwareSung Kim
 
Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Sung Kim
 
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...Sung Kim
 
A Survey on Dynamic Symbolic Execution for Automatic Test Generation
A Survey on  Dynamic Symbolic Execution  for Automatic Test GenerationA Survey on  Dynamic Symbolic Execution  for Automatic Test Generation
A Survey on Dynamic Symbolic Execution for Automatic Test GenerationSung Kim
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Sung Kim
 
Automatic patch generation learned from human written patches
Automatic patch generation learned from human written patchesAutomatic patch generation learned from human written patches
Automatic patch generation learned from human written patchesSung Kim
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)Sung Kim
 
Personalized Defect Prediction
Personalized Defect PredictionPersonalized Defect Prediction
Personalized Defect PredictionSung Kim
 
A Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash ReproductionA Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash ReproductionSung Kim
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSung Kim
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakPyData
 
Transfer Learning: An overview
Transfer Learning: An overviewTransfer Learning: An overview
Transfer Learning: An overviewjins0618
 
Transfer of adult learning theories into practice
Transfer of adult learning theories into practiceTransfer of adult learning theories into practice
Transfer of adult learning theories into practiceIssa Al Balushi
 
Tensor board
Tensor boardTensor board
Tensor boardSung Kim
 

Andere mochten auch (20)

Video concept detection by learning from web images
Video concept detection by learning from web imagesVideo concept detection by learning from web images
Video concept detection by learning from web images
 
A survey on transfer learning
A survey on transfer learningA survey on transfer learning
A survey on transfer learning
 
How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012
 
The Anatomy of Developer Social Networks
The Anatomy of Developer Social NetworksThe Anatomy of Developer Social Networks
The Anatomy of Developer Social Networks
 
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving software
 
Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)Crowd debugging (FSE 2015)
Crowd debugging (FSE 2015)
 
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2...
 
A Survey on Dynamic Symbolic Execution for Automatic Test Generation
A Survey on  Dynamic Symbolic Execution  for Automatic Test GenerationA Survey on  Dynamic Symbolic Execution  for Automatic Test Generation
A Survey on Dynamic Symbolic Execution for Automatic Test Generation
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
 
Automatic patch generation learned from human written patches
Automatic patch generation learned from human written patchesAutomatic patch generation learned from human written patches
Automatic patch generation learned from human written patches
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
 
Personalized Defect Prediction
Personalized Defect PredictionPersonalized Defect Prediction
Personalized Defect Prediction
 
A Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash ReproductionA Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash Reproduction
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
 
Transfer Learning: An overview
Transfer Learning: An overviewTransfer Learning: An overview
Transfer Learning: An overview
 
Transfer of adult learning theories into practice
Transfer of adult learning theories into practiceTransfer of adult learning theories into practice
Transfer of adult learning theories into practice
 
Tensor board
Tensor boardTensor board
Tensor board
 

Ähnlich wie Transfer defect learning

Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSung Kim
 
The Status of ML Algorithms for Structure-property Relationships Using Matb...
The Status of ML Algorithms for Structure-property Relationships Using Matb...The Status of ML Algorithms for Structure-property Relationships Using Matb...
The Status of ML Algorithms for Structure-property Relationships Using Matb...Anubhav Jain
 
Synthesis of analytical methods data driven decision-making
Synthesis of analytical methods data driven decision-makingSynthesis of analytical methods data driven decision-making
Synthesis of analytical methods data driven decision-makingAdam Doyle
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...MLconf
 
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...Jihun Park
 
Automated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsAutomated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsLionel Briand
 
RAMSES: Robust Analytic Models for Science at Extreme Scales
RAMSES: Robust Analytic Models for Science at Extreme ScalesRAMSES: Robust Analytic Models for Science at Extreme Scales
RAMSES: Robust Analytic Models for Science at Extreme ScalesIan Foster
 
End-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersSeunghyun Hwang
 
Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1khairulhuda242
 
C++ Notes PPT.ppt
C++ Notes PPT.pptC++ Notes PPT.ppt
C++ Notes PPT.pptAlpha474815
 
lecture1.ppt
lecture1.pptlecture1.ppt
lecture1.pptSagarDR5
 
Handling Missing Attributes using Matrix Factorization 
Handling Missing Attributes using Matrix Factorization Handling Missing Attributes using Matrix Factorization 
Handling Missing Attributes using Matrix Factorization CS, NcState
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchGreg Makowski
 
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...SAIL_QU
 
Testing Machine Learning-enabled Systems: A Personal Perspective
Testing Machine Learning-enabled Systems: A Personal PerspectiveTesting Machine Learning-enabled Systems: A Personal Perspective
Testing Machine Learning-enabled Systems: A Personal PerspectiveLionel Briand
 
Data Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisData Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisFerdin Joe John Joseph PhD
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Anubhav Jain
 
Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...INRIA-OAK
 

Ähnlich wie Transfer defect learning (20)

Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
 
The Status of ML Algorithms for Structure-property Relationships Using Matb...
The Status of ML Algorithms for Structure-property Relationships Using Matb...The Status of ML Algorithms for Structure-property Relationships Using Matb...
The Status of ML Algorithms for Structure-property Relationships Using Matb...
 
Synthesis of analytical methods data driven decision-making
Synthesis of analytical methods data driven decision-makingSynthesis of analytical methods data driven decision-making
Synthesis of analytical methods data driven decision-making
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
 
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...
[SEKE 2014] Practical Human Resource Allocation in Software Projects Using Ge...
 
Automated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance SystemsAutomated Testing of Autonomous Driving Assistance Systems
Automated Testing of Autonomous Driving Assistance Systems
 
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
Dagstuhl 2013 - Montali - On the Relationship between OBDA and Relational Map...
 
RAMSES: Robust Analytic Models for Science at Extreme Scales
RAMSES: Robust Analytic Models for Science at Extreme ScalesRAMSES: Robust Analytic Models for Science at Extreme Scales
RAMSES: Robust Analytic Models for Science at Extreme Scales
 
End-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with Transformers
 
Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1
 
C++ Notes PPT.ppt
C++ Notes PPT.pptC++ Notes PPT.ppt
C++ Notes PPT.ppt
 
lecture1.ppt
lecture1.pptlecture1.ppt
lecture1.ppt
 
Handling Missing Attributes using Matrix Factorization 
Handling Missing Attributes using Matrix Factorization Handling Missing Attributes using Matrix Factorization 
Handling Missing Attributes using Matrix Factorization 
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient search
 
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
 
Testing Machine Learning-enabled Systems: A Personal Perspective
Testing Machine Learning-enabled Systems: A Personal PerspectiveTesting Machine Learning-enabled Systems: A Personal Perspective
Testing Machine Learning-enabled Systems: A Personal Perspective
 
Data Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisData Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm Analysis
 
AIRS2016
AIRS2016AIRS2016
AIRS2016
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
 
Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...Speeding up information extraction programs: a holistic optimizer and a learn...
Speeding up information extraction programs: a holistic optimizer and a learn...
 

Mehr von Sung Kim

DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningSung Kim
 
Deep API Learning (FSE 2016)
Deep API Learning (FSE 2016)Deep API Learning (FSE 2016)
Deep API Learning (FSE 2016)Sung Kim
 
Time series classification
Time series classificationTime series classification
Time series classificationSung Kim
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Sung Kim
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesSung Kim
 
Survey on Software Defect Prediction
Survey on Software Defect PredictionSurvey on Software Defect Prediction
Survey on Software Defect PredictionSung Kim
 
MSR2014 opening
MSR2014 openingMSR2014 opening
MSR2014 openingSung Kim
 
Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote Sung Kim
 
Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)Sung Kim
 
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...Sung Kim
 
Software Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of CrowdsSoftware Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of CrowdsSung Kim
 
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)Sung Kim
 
Self-defending software: Automatically patching errors in deployed software ...
Self-defending software: Automatically patching  errors in deployed software ...Self-defending software: Automatically patching  errors in deployed software ...
Self-defending software: Automatically patching errors in deployed software ...Sung Kim
 
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)Sung Kim
 

Mehr von Sung Kim (14)

DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
 
Deep API Learning (FSE 2016)
Deep API Learning (FSE 2016)Deep API Learning (FSE 2016)
Deep API Learning (FSE 2016)
 
Time series classification
Time series classificationTime series classification
Time series classification
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
 
Survey on Software Defect Prediction
Survey on Software Defect PredictionSurvey on Software Defect Prediction
Survey on Software Defect Prediction
 
MSR2014 opening
MSR2014 openingMSR2014 opening
MSR2014 opening
 
Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote
 
Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)
 
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
 
Software Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of CrowdsSoftware Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of Crowds
 
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
 
Self-defending software: Automatically patching errors in deployed software ...
Self-defending software: Automatically patching  errors in deployed software ...Self-defending software: Automatically patching  errors in deployed software ...
Self-defending software: Automatically patching errors in deployed software ...
 
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
 

Transfer defect learning

  • 1. Transfer Defect Learning Jaechang Nam The Hong Kong University of Science and Technology, China Sinno Jialian Pan Institute for Infocomm Research, Singapore Sunghun Kim The Hong Kong University of Science and Technology, China
  • 2. Defect Prediction • Hassan et al.@ICSE`09, Predicting Faults Using the Complexity of Code Changes • D’Ambros et al.@MSR`10, An Extensive Comparison of Bug Prediction Approaches • Rahman et al.@ICSE`12, Recalling the Impression of Cross-Project Defect Prediction • Hata et al.@ICSE`12, Bug Prediction based on Fine-grained Module histories • … 2 Program Prediction Model (Machine learning) Future defects
  • 4. Training prediction model 3 Test set Training set M1 M2 … M19 M20 Class 11 5 … 53 78 Buggy … … … … … … 1 1 … 3 9 Clean M1 M2 … M19 M20 Class 2 1 … 2 8 ? … … … … … … 13 6 … 45 69 ?
  • 5. Cross prediction model 4 Target project (Test set) Source project (Training set)
  • 6. Cross-project Defect Prediction 5 “Training data is often not available, either because a company is too small or it is the first release of a product” Zimmerman et al.@FSE`09, Cross-project Defect Prediction
  • 7. Cross-project Defect Prediction 5 “Training data is often not available, either because a company is too small or it is the first release of a product” Zimmerman et al.@FSE`09, Cross-project Defect Prediction “For many new projects we may not have enough historical data to train prediction models.” Rahman, Posnett, and Devanbu @ICSE`12, Recalling the “Imprecision” of Cross-project Defect Prediction
  • 8. Cross-project defect prediction • Zimmerman et al.@FSE`09 – “We ran 622 cross-project predictions and found only 3.4% actually worked.” 6 Worked, 3.4% Not worked, 96.6%
  • 9. Cross-company defect prediction • Turhan and Menzies et al.@ESEJ`09 – “Within-company data models are still the best” 7 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 Cross Cross with a NN filter Within Avg. F-measure
  • 10. Cross-project defect prediction • Rahman, Posnett, and Devanbu@FSE`12 8 0 0.1 0.2 0.3 0.4 0.5 0.6 Cross Within Avg. F-measure
  • 11. Cross prediction results 9 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 F-measure Cross Within Cross Within Cross Within Equinox JDT Lucene
  • 12. Approaches of Transfer Defect Learning 10 Normalization TCA TCA+
  • 13. 11 • Data preprocessing for training and test dataNormalization • A state-of-the art transfer learning algorithm • Transfer Component AnalysisTCA • Adapted TCA for cross-project defect prediction • Decision rules to select a suitable data normalization optionTCA+ Approaches of Transfer Defect Learning
  • 14. Data Normalization • Adjust all feature values in the same scale – E.g., Make Mean = 0 and Std = 1 • Known to be helpful for classification algorithms to improve prediction performance [Han et al. 2012]. 12
  • 15. Normalization Options • N1: Min-max Normalization (max=1, min=0) [Han et al., 2012] • N2: Z-score Normalization (mean=0, std=1) [Han et al., 2012] • N3: Z-score Normalization only using source mean and standard deviation • N4: Z-score Normalization only using target mean and standard deviation 13
  • 16. 14 • Data preprocessing for training and test dataNormalization • A state-of-the art transfer learning algorithm • Transfer Component Analysis TCA • Adapted TCA for cross-project defect prediction • Decision rules to select a suitable data normalization optionTCA+ Approaches of Transfer Defect Learning
  • 18. Transfer Learning 15 Traditional Machine Learning (ML) Learning System Learning System
  • 19. Transfer Learning 15 Traditional Machine Learning (ML) Learning System Learning System Transfer Learning Learning System Learning System Knowledge Transfer
  • 20. Transfer Learning 15 Traditional Machine Learning (ML) Learning System Learning System Transfer Learning Learning System Learning System Knowledge Transfer
  • 21. A Common Assumption in Traditional ML 16 Pan andYang@TKDE`10, Survey onTransfer Learning • Same distribution
  • 22. A Common Assumption in Traditional ML 16 Pan andYang@TKDE`10, Survey onTransfer Learning • Same distribution Cross Prediction
  • 23. A Common Assumption in Traditional ML 16 Pan andYang@TKDE`10, Survey onTransfer Learning • Same distribution Transfer Learning
  • 24. Transfer Component Analysis • Unsupervised Transfer learning – Target project labels are not known. • Must have the same feature space • Make distribution difference between training and test datasets similar 17 Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis
  • 25. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space 18
  • 26. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space 18 2-dimensional feature space
  • 27. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space 18 1-dimensional feature space
  • 28. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space 18 1-dimensional feature space
  • 29. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space 18 1-dimensional feature space 2-dimensional feature space
  • 30. Transfer Component Analysis (cont.) • Feature extraction approach – Dimensionality reduction – Projection • Map original data in a lower-dimensional feature space – C.f. Principal Component Analysis (PCA) 18 1-dimensional feature space
  • 31. Transfer Component Analysis (cont.) 19 Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis Target domain data Source domain data
  • 32. Transfer Component Analysis (cont.) 20 PCA TCA Pan et al.@TNN`10, Domain Adaptation viaTransfer ComponentAnalysis
  • 33. Preliminary Results using TCA 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 F-measure 21*Baseline: Cross-project defect prediction without TCA and normalization Baseline NoN N1 N2 N3 N4 Baseline NoN N1 N2 N3 N4 Safe  Apache Apache  Safe
  • 34. Preliminary Results using TCA 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 F-measure 21*Baseline: Cross-project defect prediction without TCA and normalization Prediction performance of TCA varies according to different normalization options! Baseline NoN N1 N2 N3 N4 Baseline NoN N1 N2 N3 N4 Safe  Apache Apache  Safe
  • 35. 22 • Data preprocessing for training and test dataNormalization • A state-of-the art transfer learning algorithm • Transfer Component Analysis TCA • Adapted TCA for cross-project defect prediction • Decision rules to select a suitable data normalization option TCA+ Approaches of Transfer Defect Learning
  • 36. TCA+: Decision rules • Find a suitable normalization for TCA • Steps – #1: Characterize a dataset – #2: Measure similarity between source and target datasets – #3: Decision rules 23
  • 37. #1: Characterize a dataset 24 3 1 … Dataset A Dataset B 2 4 5 8 9 6 11 d1,2 d1,5 d1,3 d3,11 3 1 … 2 4 5 8 9 6 11 d2,6 d1,2 d1,3 d3,11 DIST={dij : i,j, 1 ≤ i < n, 1 < j ≤ n, i < j} A
  • 38. #2: Measure Similarity between source and target • Minimum (min) and maximum (max) values of DIST • Mean and standard deviation (std) of DIST • The number of instances 25
  • 39. #3: Decision Rules • Rule #1 – Mean and Std are same  NoN • Rule #2 – Max and Min are different  N1 (max=1, min=0) • Rule #3,#4 – Std and # of instances are different  N3 or N4 (src/tgt mean=0, std=1) • Rule #5 – Default  N2 (mean=0, std=1) 26
  • 41. Experimental Setup • 8 software subjects • Machine learning algorithm – Logistic regression 28 ReLink (Wu et al.@FSE`11) Projects # of metrics (features) Apache 26 (Source code) Safe ZXing AEEEM (D’Ambros et al.@MSR`10) Projects # of metrics (features) Apache Lucene (LC) 61 (Source code, Churn, Entropy,…) Equinox (EQ) Eclipse JDT Eclipse PDE UI Mylyn (ML)
  • 42. Experimental Design 29 Test set (50%) Training set (50%) Within-project defect prediction
  • 43. Experimental Design 30 Target project (Test set) Source project (Training set) Cross-project defect prediction
  • 44. Experimental Design 31 Target project (Test set) Source project (Training set) Cross-project defect prediction with TCA/TCA+ TCA/TCA+
  • 46. ReLink Result 33*Baseline: Cross-project defect prediction without TCA/TCA+ 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 F-measure Baseline TCA TCA+ Within Safe  Apache Apache  Safe Safe  ZXing Baseline TCA TCA+ Within Baseline TCA TCA+ Within
  • 47. ReLink Result F-measure 34 Cross Source  Target Safe  Apache Zxing  Apache Apache  Safe Zxing  Safe Apache  ZXing Safe  ZXing Average Baseline 0.52 0.69 0.49 0.59 0.46 0.10 0.49 TCA 0.64 0.64 0.72 0.70 0.45 0.42 0.59 TCA+ 0.64 0.72 0.72 0.64 0.49 0.53 0.61 Within Target  Target 0.64 0.62 0.33 0.53 *Baseline: Cross-project defect prediction without TCA/TCA+
  • 48. AEEEM Result 35*Baseline: Cross-project defect prediction without TCA/TCA+ 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 F-measure Baseline TCA TCA+ Within JDT  EQ PDE  LC PDE  ML Baseline TCA TCA+ Within Baseline TCA TCA+ Within
  • 49. AEEEM Result F-measure 36 Cross Source  Target JDT  EQ LC  EQ ML  EQ … PDE  LC EQ  ML JDT  ML LC  ML PDE ML … Average Baseline 0.31 0.50 0.24 … 0.33 0.19 0.27 0.20 0.27 … 0.32 TCA 0.59 0.62 0.56 … 0.27 0.62 0.56 0.58 0.48 … 0.41 TCA+ 0.60 0.62 0.56 … 0.33 0.62 0.56 0.60 0.54 … 0.41 Within Source  Target 0.58 … 0.37 0.30 … 0.42
  • 50. Threats to Validity • Systems are open-source projects. • Experimental results may not be generalizable. • Decision rules in TCA+ may not be generalizable. 37
  • 51. Future Work • Transfer defect learning on different feature space – e.g., ReLink  AEEEM AEEEM  ReLink • Local models using Transfer Learning • Adapt Transfer learning in other Software Engineering (SE) problems – e.g., Knowledge from mailing lists  Bug triage problem 38
  • 52. Conclusion • TCA+ – TCA • Make distributions of source and target similar – Decision rules to improve TCA – Significantly improved cross-project defect prediction performance • Transfer Learning in SE – Transfer learning may benefit other prediction and recommendation systems in SE domains. 39