icse 2013 bug prediction session

32
ICSE 2013 Bug Prediction Session Does Bug Prediction Support Human Developers? Findings From a Google Case Study Transfer Defect Learning

Upload: feng

Post on 22-Jan-2016

24 views

Category:

Documents


0 download

DESCRIPTION

ICSE 2013 Bug Prediction Session. Does Bug Prediction Support Human Developers? Findings From a Google Case Study Transfer Defect Learning. Doe Bug Prediction Support Human Developers? Findings From a Google Case Study. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ICSE 2013  Bug Prediction Session

ICSE 2013 Bug Prediction

Session

• Does Bug Prediction Support Human Developers? Findings From a Google Case Study

• Transfer Defect Learning

Page 2: ICSE 2013  Bug Prediction Session

Doe Bug Prediction Support Human Developers? Findings

From a Google Case Study

Chris Lewis, ZhongPeng Lin, Caitlin Sadowski, Xiaoyan Zhu, Rong Ou, E.James Whitehead Jr.

University of California, Santa CruzGoogle Inc.

Xi’an Jiaotong University

Page 3: ICSE 2013  Bug Prediction Session

Motivations

Little empirical data validating that areas predicted to be bug-prone match the expectations of expert developers

Little data showing whether the information provided by bug prediction algorithms leads to modification of developer behavior

Page 4: ICSE 2013  Bug Prediction Session

Three Questions

Q1: According to expert opinion, given a collection of bug prediction algorithms, how many bug-prone files do they find and which algorithm is preferred?

Q2: What are the desire characteristics a bug prediction algorithm should have?

Q3: Using the knowledge gained from the other two questions to design a likely algorithm, do developers modify their behavior when presented with bug prediction results?

Page 5: ICSE 2013  Bug Prediction Session

Algorithm Choice

FixCache If a file is recently changed, it is likely to contain faults If a file contains a fault, it is likely to contain more faults Files that change alongside faulty files are more likely to

contain faults LRU Problem: 10% of files, no severity

Reduce the cache size to 20

Order the cache by duration( total commits )

Rahman

Page 6: ICSE 2013  Bug Prediction Session

Project Choice

Page 7: ICSE 2013  Bug Prediction Session

User Studies

19 interviewees ( A: 9 B: 10 )

3 lists of files

Choices: Bug-prone Not bug-prone No strong feelings either way about No experience with the file

Page 8: ICSE 2013  Bug Prediction Session

Results

Page 9: ICSE 2013  Bug Prediction Session

Results

Page 10: ICSE 2013  Bug Prediction Session

Results

Page 11: ICSE 2013  Bug Prediction Session

Results

Page 12: ICSE 2013  Bug Prediction Session

Q2: desirable characteristics

Actionable( take clear steps that will result in the area no longer being flagged )

Obvious reasoning

Bias towards the new file

Parallelizable

Effectiveness scaling

Page 13: ICSE 2013  Bug Prediction Session

Time-Weighted Risk Algorithm ( TWR )

Modify Rahman

i: bug-fixing commit

n: number of bug-fixing commit

ti: normalized time of the current bug-fixing commit

w: how strong the decay should be

Page 14: ICSE 2013  Bug Prediction Session

Experiment

Mondrian ( code review software ) + lint

Duration: 3 months in Google Inc.

Metrics: The average time a review containing a bug-

prone file takes from submission to approval The average number of comments on a review

that contains a bug-prone file

Page 15: ICSE 2013  Bug Prediction Session

Results

Page 16: ICSE 2013  Bug Prediction Session

Conclusion

Failure due to TWR

No actionable means of removing the flag

Page 17: ICSE 2013  Bug Prediction Session

Transfer Defect Learning

Jaechang Nam, Sinno Jialin Pan, Sunghun KimDepartment of Computer Science and Engineering

The Hong Kong University of Science and Technology, ChinaInstitute for Infocomm Research, Singapore

Page 18: ICSE 2013  Bug Prediction Session

Motivations

Poor cross-project prediction performance Same feature space Different data distribution

On the basis of transfer learning, propose transfer defect learning. Modify existing method: TCA( Transfer Component Analysis )

TCA is sensitive to normalization

Page 19: ICSE 2013  Bug Prediction Session

TCA

TCA tries to learn a transformation to map the original data of source and target domains to a latent space where the difference between domains is small and the data variance after transformation is large.

Page 20: ICSE 2013  Bug Prediction Session

TCA

Page 21: ICSE 2013  Bug Prediction Session

TCA+

Choose Normalization options automatically

Page 22: ICSE 2013  Bug Prediction Session
Page 23: ICSE 2013  Bug Prediction Session

Rules

5 rules

Page 24: ICSE 2013  Bug Prediction Session

Process

Page 25: ICSE 2013  Bug Prediction Session

Experiment Projects

ReLink Apache HTTP Server OpenIntents Safe Zxing

AEEEM Equinox Eclipse JDT Core Apache Lucene Mylyn Eclipse PDE UI

Page 26: ICSE 2013  Bug Prediction Session

TCA with different normalization options

Page 27: ICSE 2013  Bug Prediction Session
Page 28: ICSE 2013  Bug Prediction Session
Page 29: ICSE 2013  Bug Prediction Session

TCA+

Page 30: ICSE 2013  Bug Prediction Session
Page 31: ICSE 2013  Bug Prediction Session
Page 32: ICSE 2013  Bug Prediction Session

Contributions

First to observe improved prediction performance by applying TCA for cross-project defect prediction

Proposed TCA+