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.

Botsing demo

67 views

Published on

Botsing: A search-based crash reproduction tool

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Botsing demo

  1. 1. Botsing: A search-based crash reproduction tool Pouria Derakhshanfar Delft University of Technology
  2. 2. What is crash reproduction?
  3. 3. !3 DevOps
  4. 4. !4 java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63) at org…..SolrDocumentReferenceResolver.resolve(….java:48) at … Crash!?!
  5. 5. !5 Issue XWIKI-13031
  6. 6. !6 Issue XWIKI-13031
  7. 7. !7 Issue XWIKI-13031not always available
  8. 8. !8 Issue XWIKI-13031not always available • Not always easy to find the reproduction scenario • Manual • Labor intensive • Requires Accurate information from the user
  9. 9. Automated crash reproduction
  10. 10. !10 Exception: at x(…) at y(…) at e(…) Stack trace Search-based algorithm a() e()d() Exception: at x(…) at y(…) at e(…) Crash reproducing 
 test case Our Solution
  11. 11. Java Stack Trace (Issue XWIKI-13031) !11 java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63) at org…..SolrDocumentReferenceResolver.resolve(….java:48) at … Exception Frames {
  12. 12. Java Stack Trace (Issue XWIKI-13031) !12 java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63) at org…..SolrDocumentReferenceResolver.resolve(….java:48) at … Exception Frames {Target→
  13. 13. Java Stack Trace (Issue XWIKI-13031) !13 java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63) at org…..SolrDocumentReferenceResolver.resolve(….java:48) at … Exception Frames {Target→
  14. 14. Java Stack Trace (Issue XWIKI-13031) !14 java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63) at org…..SolrDocumentReferenceResolver.resolve(….java:48) at … Exception Frames {Target→
  15. 15. !15 a() b() c() e()d() e() c() e() a() b() c() e()d() e() c() e() a() b() c() e()d() e() c() e() a() b() c() e()d() e() c() e() Random initial test suite a() b() c() e()d() e() c() e() a() b() c() e()d() e() c() e() a() c() e()d() e() c() b() e() a() c() e()d() e() c() b() e() Evolutionary search a() e()d() Exception: at x(…) at y(…) at e(…) Exception: at x(…) at y(…) at e(…) Crash reproducing test case Stack trace Soltani, M., Panichella, A. and van Deursen, A. 2018. Search-Based Crash Reproduction and Its Impact on Debugging. Software Engineering, IEEE Transactions on. (2018).
  16. 16. !16 Search process Objective1 Objective2
  17. 17. !17 Objective1 Objective2 Test Test Test Search process
  18. 18. !18 Objective1 Objective2 Test Test Test Search process
  19. 19. !19 Search process
  20. 20. !20 Search process
  21. 21. !21 Search process
  22. 22. !22 Search process Crash reproducing 
 test case
  23. 23. Crash-reproducing Test Case !23 public void test0() throws Throwable { … SolrEntityReferenceResolver solrEntityReferenceResolver0 = new …(); EntityReferenceResolver entityReferenceResolver0 = … mock(…); solrDocument0.put("wiki", (Object) entityType0); Injector.inject(solrEntityReferenceResolver0, …); Injector.validateBean(solrEntityReferenceResolver0, …); … // Undeclared exception! solrEntityReferenceResolver0.resolve(solrDocument0, entityType0, objectArray0); }
  24. 24. Crash-reproducing Test Case !24 public void test0() throws Throwable { … SolrEntityReferenceResolver solrEntityReferenceResolver0 = new …(); EntityReferenceResolver entityReferenceResolver0 = … mock(…); solrDocument0.put("wiki", (Object) entityType0); Injector.inject(solrEntityReferenceResolver0, …); Injector.validateBean(solrEntityReferenceResolver0, …); … // Undeclared exception! solrEntityReferenceResolver0.resolve(solrDocument0, entityType0, objectArray0); } java.lang.ClassCastException: […] at org…..SolrEntityReferenceResolver.getWikiReference(....java:93) at org…..SolrEntityReferenceResolver.getEntityReference(….java:70) at org…..SolrEntityReferenceResolver.resolve(….java:63)
  25. 25. JCrashPack • 200 crashes from various open source projects • XWiki (STAMP partner) • From XWiki issue tracking system: 51 crashes • Defects4J applications • State of the art fault localization benchmark • 73 crashes (with fixes) • Elasticsearch • Based on popularity • From Elasticsearch issue tracking system: 76 crashes • Filtered, verified, cleaned up, right jar versions, … !25
  26. 26. 12 Key Challenges • Input data generation • For complex inputs, generic types, etc. • Environmental dependencies • Environment state hard to manage at unit level • Complex code • Long methods, with lot of nested predicates • Abstract classes and methods • Cannot be instantiated and one concrete implementation is picked randomly • […] !26
  27. 27. To be continued …
  28. 28. Botsing !28 Available on Github: https://github.com/STAMP-project/botsing
  29. 29. Botsing-Demo !29 Available on Github: https://github.com/STAMP-project/botsing-demo
  30. 30. Run the demo !30 git clone https://github.com/STAMP-project/botsing-demo.git java -jar botsing-reproduction-1.0.3.jar 
 -project_cp applications/LANG-9b/ 
 -crash_log crashes/LANG-9b.log 
 -target_frame 5 
 -Dsearch_budget=120 -Dno_runtime_dependency=true Clone the demo Run Botsing

×