1 / 25

Debug Concern Navigator

SEKE 2011. Debug Concern Navigator. Masaru Shiozuka (Kyushu Institute of Technology, Japan) Naoyasu Ubayashi (Kyushu University, Japan) Yasutaka Kamei (Kyushu University, Japan) July 7, 2011. Overview -- Debug Recommendation System. Debug Concerns. dcNavi (Debug Concern Navigator).

corby
Download Presentation

Debug Concern Navigator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SEKE 2011 Debug Concern Navigator Masaru Shiozuka (Kyushu Institute of Technology, Japan) NaoyasuUbayashi (Kyushu University, Japan) Yasutaka Kamei (Kyushu University, Japan) July 7, 2011

  2. Overview-- Debug Recommendation System Debug Concerns dcNavi (Debug Concern Navigator) How to handle this exception ? How to use this API ? Query public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } public class Property { public String readFile (String pathname) throws IOException { String val = null; File file = new File(pathname); FileReader fileReader = new FileReader(file) ; BufferedReader br = new BufferedReader(fileReader); val = br.readLine(); return val; } } Search Recommend (Code snippets) Project and OSS Repositories

  3. Recommendation After Before Bug fix of delete method (subclipse project: revision 984) DcNavi can provide the code snippets before and after similar bug fixes by searching past repositories !

  4. Outline • Motivation • DCG: Debug Concern Graph • dcNavi • Evaluation • Related work • Conclusion and Future work

  5. Motivation

  6. Motivation • Programmers tend to spend a lot of time debugging code. • They check the erroneous phenomena, navigate the code, search the past bug fixes, and modify the code. • If a sequence of these debug activities can be automated, programmers can use their time for more creative tasks.

  7. A typical debugging scenario Situation A novice is debugging a Java program. Debug Concerns How to handle this exception ? (FileNotFoundException) How to use this API usage ? (BufferedReader) Are other test cases needed ? How to review this code ?

  8. Problem • It is not easy for a novice to use program exceptions or test failures as a hint for fixing a bug. • A programmer with a long career may be faced with the similar difficulties when the programmer works for unfamiliar new projects, languages, and frameworks.

  9. Our approach dcNavi How to handle this exception ? How to use this API ? Query Recommend (Code snippets) Search Project and OSS Repositories • Reuse past experiences • Based on TDD (Test-Driven Development) • DCG (Debug Concern Graph)

  10. DCG: Debug Concern Graph

  11. DCG-- Introducing Concern Graph • Concern Graph • helps programmers identify and reason about concerns in programming and • makes explicit the relationships among concerns. • DCG appends a set of debugging information such as bug fixes, test results, and bug fix patterns to a concern graph. Robillard, M. P. and Murphy, G. C., Concern Graphs: Finding and Describing Concerns Using Structural Program Dependencies, ICSE 2002, pp.406-416, 2002.

  12. DCG-- TDD-based Graph expansion Bug Fix Patterns MC-DAP: Method Call with Different Actual Parameter SQ-AROB: Addition or Removal of Method Calls IF-CC: Change of If Condition Expression dcNavi: Eclipse plugin Mylyn Junit Pan, K., et al., Toward an understanding of bug fix patterns, Empirical Software Engineering, pp.286-315, 2009.

  13. Bug fix patterns • The bug fix patterns show not only how to fix bugs but also the reasons of the bugs. • Many bug fixes can be categorized into the patterns. • The advice can be generated from actual code snippets annotated with the bug reasons (bug fix patterns).

  14. dcNavi--- Debug Concern Navigator

  15. dcNavi overview • DCG manager for supporting graph construction and evolution • DCG generator for importing existing repositories • Debug recommender OSS

  16. Recommendation result

  17. Obtain recommendation candidates • Obtains all past tests failing to handle the FileNotFoundException • finds the test target methods whose after-modification include the bug fix patterns • Recommend code snippets ranked by the graph similarity metric Recommendation Algorithm Debug readFile Start calls Test failure exception:FileNotFound readLine calls Recommendation Bug Fix Pattern (SQ-AROB) Similarity(G1, G2) = #common_node / (#G1_node + #G2_node) / 2)

  18. Evaluation

  19. Experiment • Evaluation data • Nine Eclipse plug-in projects (Mylyn) • Criteria • Bug fix pattern applied to the real debugging is the same as that of recommendation. Training data Recommendation Results + Check ! 4/5 revisions from each project all revisions of other eight projects Real data remaining 1/5 revisions of each project

  20. Results Precision: 15% - 35% Recall: 20% - 50%

  21. Related work

  22. Related work • DebugAdvisor [Ashok, B. FSE2009] • A search tool for allowing programmers to express the context of the bugs and search through diverse data such as natural language text and core dumps. • FixWizard [Nquyen, T. T. ICSE2010] • A support tool for identifying the code peers existing in the program and recommend the similar fixes to its peers. We focus on Debug Concerns and Bug Fix Patterns.

  23. Conclusion and Future work

  24. Conclusion andFuture work • We proposed a debug recommendation system based on Concern Graphs and Bug fix patterns. • Future work • Portfolio-based recommendation • Support for execution trace

  25. Thank you for your attention.

More Related