Presentation is loading. Please wait.

Presentation is loading. Please wait.

Debug Concern Navigator Masaru Shiozuka(Kyushu Institute of Technology, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu University,

Similar presentations


Presentation on theme: "Debug Concern Navigator Masaru Shiozuka(Kyushu Institute of Technology, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu University,"— Presentation transcript:

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

2 Overview -- Debug Recommendation System 2 dcNavi (Debug Concern Navigator) Recommend (Code snippets) Project and OSS Repositories Search Query How to handle this exception ? How to use this API ? Debug Concerns

3 Recommendation 3 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 ! Before After

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

5 Motivation 5

6  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. 6

7 A typical debugging scenario 7 A novice is debugging a Java program.Situation 1)How to handle this exception ? (FileNotFoundException) 2)How to use this API usage ? (BufferedReader) 3)Are other test cases needed ? 4)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. 8

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

10 DCG: Debug Concern Graph 10

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. 11 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 12 Pan, K., et al., Toward an understanding of bug fix patterns, Empirical Software Engineering, pp.286-315, 2009. dcNavi: Eclipse plugin Mylyn Junit

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). 13

14 dcNavi --- Debug Concern Navigator 14

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

16 Recommendation result 16

17 Recommendation Algorithm 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 Similarity(G1, G2) = #common_node / (#G1_node + #G2_node) / 2) Recommendation readLine calls Debug readFile Test failure exception : FileNotFound Bug Fix Pattern (SQ-AROB) Start

18 Evaluation 18

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. 19 all revisions of other eight projects 4/5 revisions from each project remaining 1/5 revisions of each project Training data + Real data Recommendation Results Check !

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

21 Related work 21

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. 22 We focus on Debug Concerns and Bug Fix Patterns.

23 Conclusion and Future work 23

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

25 25 Thank you for your attention.


Download ppt "Debug Concern Navigator Masaru Shiozuka(Kyushu Institute of Technology, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu University,"

Similar presentations


Ads by Google