Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MSR2012 - Explaining Software Defects Using Topic Models

  • Be the first to comment

  • Be the first to like this

MSR2012 - Explaining Software Defects Using Topic Models

  1. 1. Explaining Software Defects Using Topic Models Tse-Hsun (Peter) Chen, Stephen W. Thomas, Meiyappan Nagappan, Ahmed E. Hassan
  2. 2. int readFile(StringfilePath){ fp =readFile(filePath) if fp == NULL return -1 else return fp} 2
  3. 3. int int manageMemory(int index){readFile(StringfilePath){ if mem[index] is fp = not NULL{readFile(filePath) freeInd = if fp findFreeMemoryLoc() == NULL return -1 goto(freeInd) else } return fp} } 3
  4. 4. int intreadFile(String manageMemory(intfilePath){ index){ fp = if mem[index] isreadFile(filePath not NULL{) freeInd = if fp == NULL findFreeMemoryLoc() return -1 goto(freeInd) else } return fp }} More Risky Concern 4
  5. 5. int intreadFile(String manageMemory(int Can we usefilePath){ index){ concerns to fp = if mem[index] is studyreadFile(filePath notdefects? NULL{) freeInd = if fp == NULL findFreeMemoryLoc() return -1 goto(freeInd) else } return fp }} More Risky Concern 5
  6. 6. Capturing Concerns Using Topic Modelsread filefile path Topic 1fp file read, file, path,path fp fp, file, index, Topics Models indmanage (LDA) Topic 2memory manage,index mem memory, mem,free ind free, find, locfind freememory loc 6
  7. 7. How defect Can topicsprone are explain softwaretopics? defects? 7
  8. 8. Case Studies 3 versions of each system 0.4 - 8.8 MLOC 2.8 - 17 K files1,300 ~ 6,500 post-release defects 8
  9. 9. How defect Can topicsprone are explain softwaretopics? defects? 9
  10. 10. If some topics are more defect- prone than others... We can allocate MORE testing resources on these topics! 10
  11. 11. If some topics are more defect- prone than others... We can allocate MORE testing resources on these topics! 11
  12. 12. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 12
  13. 13. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 13
  14. 14. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 14
  15. 15. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 15
  16. 16. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 16
  17. 17. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 17
  18. 18. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 18
  19. 19. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 19
  20. 20. Measuring Topic Defect-proneness T1 F1 T2 F2 T3 T4 F3 20
  21. 21. What is Relationship Between Defects and Topics? 21
  22. 22. What is Relationship Between Defects and Topics?T3 T2 T1 T4 22
  23. 23. What is Relationship Between Defects and Topics?T3 T2 T1 T4 T3 T2 T1 T4 23
  24. 24. What is Relationship Between Defects and Topics? T3 T2 T1 T4 24
  25. 25. Few Topics are Defect-prone 25
  26. 26. Few Topics are Defect-prone Task, Eclipse, Eclipse Mylyn, Task ui, Core, Repository 26
  27. 27. Few Topics are Defect-prone Lower color, Task, Eclipse, Jface, Eclipse Mylyn, Comparison check Task ui, Core, Repository 27
  28. 28. How defect Can topicsprone are explain softwaretopics? defects?Few Topics are Defect-prone! 28
  29. 29. How defect Can topicsprone are explain softwaretopics? defects?Few Topics are Defect-prone! 29
  30. 30. Explaining Defects 30
  31. 31. Explaining Defects Static 31
  32. 32. Explaining Defects Static Lines of Code 32
  33. 33. Explaining Defects Static Lines of Code Historical 33
  34. 34. Explaining Defects Static Lines of Code Pre-release Defects Historical Code Churn 34
  35. 35. Explaining Defects Static Lines of Code Pre-release Defects Historical Code Churn Topic Metrics Topics 35
  36. 36. Using Topics to Explain Defects T1 F1 T2 F2 T3 T4 F3 36
  37. 37. Using Topics to Explain Defects T1 F1 T2 F2 T3 T4 F3 37
  38. 38. Using Topics to Explain Defects T1 F1 T2 F2 T3 T4 F3 38
  39. 39. Explainability of MetricsStatic 39
  40. 40. Explainability of MetricsStatic 40
  41. 41. Explainability of Metrics Deviance Explained (D1)Static and AIC1 41
  42. 42. Explainability of Metrics Deviance Explained (D1) Static and AIC1Topics 42
  43. 43. Explainability of Metrics Deviance Explained (D1) Static and AIC1Topics Static 43
  44. 44. Explainability of Metrics Deviance Explained (D1) Static and AIC1Topics Static D2 and AIC2 44
  45. 45. Explainability of Metrics Deviance Explained (D1) Static and AIC1Topics Static D2 and AIC2 Improvement in Explainability = D2 – D1 and AIC2 – AIC1 45
  46. 46. More Topics More Defects in File%Avg. Imp. in D2 46
  47. 47. Topic Membership Metrics:Few Topics are Defect-prone T1 F1 T2 F2 T3 T4 F3 47
  48. 48. Dealing with Large # of Metrics 48
  49. 49. Dealing with Large # of Metrics Topic membership metrics may have as many as 500 variables! 49
  50. 50. Dealing with Large # of Metrics Topic membership metrics may have as many as 500 variables! Solution:Use PCA to reduce the number of metrics 50
  51. 51. Topic Memebership Metrics Explain Defects Even More% Avg. Imp. in AIC 51
  52. 52. How defect Can topicsprone are explain softwaretopics? defects?Few Topics are Defect-prone! YES! 52
  53. 53. Limitations 53
  54. 54. Limitations1. Parameter Choices 54
  55. 55. Limitations1. Parameter Choices •Number of topics •Thresholds 55
  56. 56. Limitations1. Parameter Choices •Number of topics •Thresholds2. Used Baseline Metrics Static Historical 56
  57. 57. Limitations1. Parameter Choices •Number of topics •Thresholds2. Used Baseline Metrics Static Historical3. Studied Three Subject Systems 57
  58. 58. Summary
  59. 59. Summary
  60. 60. Summary
  61. 61. Summary
  62. 62. Summary

    Be the first to comment

    Login to see the comments

Views

Total views

747

On Slideshare

0

From embeds

0

Number of embeds

10

Actions

Downloads

10

Shares

0

Comments

0

Likes

0

×