SlideShare una empresa de Scribd logo
EXPLOITING CONTEXT IN DEALING
WITH PROGRAMMING ERRORS AND
EXCEPTIONS
Mohammad Masudur Rahman
Department of Computer Science
University of Saskatchewan
2
Exception triggering point
SoftwareResearchLab,UofS
EXCEPTION DEBUGGING
3
Not a helpful message for
understanding or solving the
exception
SoftwareResearchLab,UofS
Web
search!!
SOLVING EXCEPTION
(STEP I: WEB SEARCH)
4
 The browser does not know the context (i.e., details)
of the exception.
 Not much helpful ranking
 Hundreds of search results
 Forces the developer to switch back and forth between
IDE and browser.
 Trial and error in searching
SoftwareResearchLab,UofS
Switching is
often
distracting
SOLVING EXCEPTION
(STEP II: QUERY SELECTION)
5
Selection of traditional search query
Switching to web browser for
web search
SoftwareResearchLab,UofS
This query may not
be sufficient enough
for most of the
exceptions
SOLVING EXCEPTION
(STEP III: POST-SEARCH ANALYSIS)
6
• Only the most relevant section needs to be
checked to determine the relevance of a page.
• Frequent switching between IDE and web
browser for content analysis
• Manual analysis of a number of web pages is
non-trivial and time-consuming
1
2
3
4
SOLVING EXCEPTION
(STEP IV: HANDLING EXCEPTIONS)
7
 Only adds a generic handler (i.e.,
printStackTrace()) for the exception.
 Not much helpful for effective handling
of the exception
OBSERVATIONS ON TRADITIONAL/AD-HOC
APPROACH FOR EXCEPTION SOLVING
 Step I: Web search may not be much effective or
reliable
 Step II: Support for search query formulation is
not enough
 Step III: Support for post-search analysis is
insufficient
 Step IV: Support for exception handling is not
enough
8
SoftwareResearchLab,UofS
DEALING WITH ERRORS & EXCEPTIONS:
PROPOSED APPROACH
9
CONTRIBUTIONS OF THIS THESIS
(1) SurfClipse (WCRE 2013,
CSMR/WCRE 2014)
(2) QueryClipse
(ICSME 2014)
(3) ContentSuggest
(4) SurfExample
(SCAM 2014)
(5) ExcClipse
10
Web search
Query formulation
Post-search analysis
Exception handling
User study
TECHNICAL DETAILS & PROGRAMMING
CONTEXT OF AN EXCEPTION
11
Programming context (i.e.,
context code)
Error message
Stack trace
1
2
3
SoftwareResearchLab,UofS
SURFCLIPSE: IDE-BASED CONTEXT-AWARE
META SEARCH ENGINE
12
MOTIVATIONAL EXPERIMENT
13
 75 programming exceptions (details later)
 Individual engine can provide solutions for at most
58 exceptions & each has some unique results.
 Combination of content & context is always better
than content only
Search Query Common for
All
Google
Unique
Yahoo Unique Bing
Unique
Content Only 32 09 16 18
Content and
Context
47 09 11 10
SoftwareResearchLab,UofS
THE KEY IDEA !! META SEARCH ENGINE
14
SoftwareResearchLab,UofS
Fig: Meta search engine
PROPOSED IDE-BASED META SEARCH MODEL
Start
Results
Web page
15
SoftwareResearchLab,UofS
PROPOSED IDE-BASED META SEARCH
MODEL
 Distinguished Features (5)
 IDE-Based solution
 Web search, search result and web browsing all from IDE
 No context-switching needed
 Meta search engine
 Captures data from multiple search engines
 Also applies custom ranking techniques
 Context-Aware search
 Uses stack traces information
 Uses context-code (surroundings of exception locations)
 Software As A Service (SAAS)
 Search is provided as a web service, and can be leveraged by
an IDE. http://srlabg53-2.usask.ca/wssurfclipse/ 16
SoftwareResearchLab,UofS
PROPOSED IDE-BASED META SEARCH
MODEL
 Two Working Modes
 Proactive Mode
 Auto-detects the occurrence of an exception
 Initiates search for exception by client itself
 Aligned with Cordeiro et al. (RSSE’ 2012) & Ponzanelli et al.
(ICSE 2013)
 Interactive Mode
 Developer starts search using context menu
 Also facilitates keyword-based search
 Aligned with traditional web search within the IDE
17
SoftwareResearchLab,UofS
PROPOSED METRICS & SCORES
 Content Matching Score (Scms)
 Cosine similarity based measurement
 Stack trace Matching Score (Sstm)
 Structural and lexical similarity measurement of stack
traces
 Code context Matching Score (Sccx)
 Code snippet similarity (code clones)
 StackOverflow Vote Score (Sso)
 Total votes for all posts in the SO result link
18
SoftwareResearchLab,UofS
PROPOSED METRICS & SCORES
 Site Traffic Rank Score (Sstr)-- Alexa and Compete
Rank of each link
 Search Engine weight (Ssew)---Relative reliability
or importance of each search engine. Experiments
with 75 programming queries against the search
engines.
 Heuristic weights of the metrics are determined
through controlled experiments.
19
SoftwareResearchLab,UofS
EXPERIMENT OVERVIEW
21
SoftwareResearchLab,UofS
75 exceptions Eclipse plug-in &
Java development
Gold set solutions Peers
RESULTS ON DIFFERENT RANKING ASPECTS
Score Components Metrics Proactive Mode
(Top 30)
Interactive Mode
(Top 30)
Content MP
TEF
R
0.0371
56 (75)
74.66%
0.0481
65 (75)
86.66%
Content +Context MP
TEF
R
0.0376
55 (75)
73.33%
0.0514
66 (75)
88.00%
Content + Context +
Popularity
MP
TEF
R
0.0381
56 (75)
74.66%
0.0519
66 (75)
88.00%
Content +Context +
Popularity
+Confidence
MP
TEF
R
0.0380
56 (75)
74.66%
0.0538
68 (75)
90.66%
[ MP = Mean Precision, R = Recall,
TEF= Total Exceptions Fixed]
22
SoftwareResearchLab,UofS
COMPARISON WITH EXISTING APPROACHES
Recommender Metrics Top 10 Top 20 Top 30
Cordeiro et al.
(only stack traces)
MP
TEF
R
0.0202
15 (75)
20.00%
0.0128
18 (75)
24.00%
0.0085
18 (75)
24.00%
Proposed Method
(Proactive Mode)
MP
TEF
R
0.0886
51 (75)
68.00%
0.0529
55 (75)
73.33%
0.0380
56 (75)
74.66%
Ponzanelli et al.
(only context-code)
MP
TEF
R
0.0243
7 (37)
18.92%
0.0135
7 (37)
18.92%
0.0099
7 (37)
18.92%
Proposed Method
(Proactive Mode)
MP
TEF
R
0.1000
30 (37)
81.08%
0.0621
32 (37)
86.48%
0.0450
32 (37)
86.48%
[ MP = Mean Precision, R = Recall,
TEF= Total Exceptions Fixed]
23
SoftwareResearchLab,UofS
COMPARISON WITH TRADITIONAL SEARCH
ENGINES
Search Engine Metrics Top 10 Top 20 Top 30
Google MP
TEF
R
0.1571
57 (75)
76.00%
0.0864
57 (75)
76.00%
0.0580
57 (75)
76.00%
Bing MP
TEF
R
0.1013
55 (75)
73.33%
0.0533
58 (75)
77.33%
0.0364
58 (75)
77.33%
Yahoo! MP
TEF
R
0.0986
54 (75)
72.00%
0.0539
57 (75)
76.00%
0.0369
57 (75)
76.00%
StackOverflow
Search
MP
TEF
R
0.0226
14 (75)
18.66%
0.0140
17 (75)
22.66%
0.0097
17 (75)
22.66%
Proposed Method
(Interactive mode)
MP
TEF
R
0.1229
59 (75)
78.66%
0.0736
64 (75)
85.33%
0.0538
68 (75)
90.66%
24
SoftwareResearchLab,UofS
CONTRIBUTIONS OF THIS THESIS
(1) SurfClipse (WCRE 2013,
CSMR/WCRE 2014)
(2) QueryClipse
(ICSME 2014)
(3) ContentSuggest
(4) SurfExample
(SCAM 2014)
(5) ExcClipse
25
Web search
Query formulation
Post-search analysis
Exception handling
User study
QUERYCLIPSE: CONTEXT-AWARE SEARCH
QUERY RECOMMENDER
26
MOTIVATING EXAMPLE
27
SoftwareResearchLab,UofS
Stack traceContext code
QueryClipse
2
1
Recommended search queries
PROPOSED CONTEXT-AWARE QUERY
RECOMMENDATION APPROACH
 Distinguishing Features (4)
 Context-Aware Query
 Exploits both stack trace and context code
 Extract search keywords carefully and systematically
 Ranked List for Queries
 Ranked list based on keyword importance in queries
 Automatic suggestion through auto-completion
 Custom Search Query
 Stack trace graph based on implied relationships
 Keyword importance based on network connectivity
 Query Length Customization
 Number of query keywords customizable
 Search-friendly & easily applicable for any search engines 28
SoftwareResearchLab,UofS
CONTENTSUGGEST: CONTEXT-AWARE PAGE
CONTENT RECOMMENDER
29
MOTIVATING EXAMPLE
30
1
2
3
 Only the most relevant page section displayed
 Less information overhead, less effort required
 No need to browse the page for relevance checking
SoftwareResearchLab,UofS
PROPOSED CONTEXT-AWARE PAGE CONTENT
SUGGESTION APPROACH
 Distinguishing Features (3)
 Relevant section(s) suggestion
 Analyzes both quality and relevance of the content
 Exploits stack trace & context code for relevance checking
 Partial automation in post-search analysis
 Less content, less overhead
 Need to analyze less content for page relevance checking
 Displayed content more useful than meta description
 Noise-free version of the page
 Removes advertisements, irrelevant widgets and so on
 Applies link-based heuristics
 Returns a noise-free version of the web page
31
SoftwareResearchLab,UofS
CONTRIBUTIONS OF THIS THESIS
(1) SurfClipse (WCRE 2013,
CSMR/WCRE 2014)
(2) QueryClipse
(ICSME 2014)
(3) ContentSuggest
(4) SurfExample
(SCAM 2014)
(5) ExcClipse
32
Web search
Query formulation
Post-search analysis
Exception handling
User study
SURFEXAMPLE: CONTEXT-AWARE CODE EXAMPLE
RECOMMENDER FOR EXCEPTION HANDLING
33
MOTIVATING EXAMPLE
34
SoftwareResearchLab,UofS
Context code
Recommended code example
SurfExample
PROPOSED CONTEXT-AWARE CODE EXAMPLE
RECOMMENDER FOR EXCEPTION HANDLING
 Distinguishing Features (3)
 Graph-based structural relevance
 Static relationship and data dependency graph
 Graph structure matching
 Handler quality Paradigm
 Novel idea to ensure quality of exception handlers
 Based on readability, amount & quality of the handler actions
 Seamless integration of dataset
 Exploits GitHub API for data collection
 Hundreds of popular and mature open source projects from
Eclipse, Apache and others
35
SoftwareResearchLab,UofS
CONTRIBUTIONS OF THIS THESIS
(1) SurfClipse (WCRE 2013,
CSMR/WCRE 2014)
(2) QueryClipse
(ICSME 2014)
(3) ContentSuggest
(4) SurfExample
(SCAM 2014)
(5) ExcClipse
36
Web search
Query formulation
Post-search analysis
Exception handling
User study
EXCCLIPSE: COMPARATIVE ANALYSIS
BETWEEN PROPOSED APPROACHES AND
TRADITIONAL ONES
37
USER STUDY OVERVIEW
38
SoftwareResearchLab,UofS
Six participants Four exceptions
Four tasks
USER STUDY OVERVIEW
39
SoftwareResearchLab,UofS
Questionnaire Observation checklist
Training Execution Evaluation
EVALUATION FEATURES
41
SoftwareResearchLab,UofS
Tool Feature Functionality Notation
Support for query formulation Web search F1
Accuracy & effectiveness of results Web search F2
Post-search content analysis Web search F3
Support for query formulation Code search F4
Relevance & accuracy of results Code search F5
Usability Overall F6
Efficiency Overall F7
Visualization support Web search F8
Visualization support Code search F9
FEATURE-WISE RATINGS (WEB SEARCH)
42
SoftwareResearchLab,UofS
FEATURE-WISE RATINGS (CODE SEARCH)
43
SoftwareResearchLab,UofS
FEATURE-WISE RATINGS
(NON-FUNCTIONAL)
44
SoftwareResearchLab,UofS
OVERALL RATINGS
45
SoftwareResearchLab,UofS
THREATS TO VALIDITY
 SurfClipse--Search engines constantly evolving,
same results may not be produced at later time.
 QueryClipse-- Long query generation due to
lengthy error message in the stack trace.
 ContentSuggest-- Changes in the look and feel of
the page due to removal of <style> and <script>
tags
 SurfExample-- Subjective bias in gold set
development
 ExcClipse--Limited number of participants
46
SoftwareResearchLab,UofS
CONCLUSION
47
CONCLUDING REMARKS
 SurfClipse – context-aware meta search engine
 IDE-based complete web search solution
 Outperforms two relevant existing approaches
 More recall than three search engines with precision
comparable to Google, the best performing engine.
 QueryClipse– context-aware query recommender
 More effective than traditional queries and queries by
existing approaches
 Highly applicable in terms of pyramid score
48
SoftwareResearchLab,UofS
CONCLUDING REMARKS
 ContentSuggest– context-aware page content
recommender
 Exploits exception details and recommends relevant
section(s) from the page
 Less information, less overhead for relevance check
 Great potential for problem solving
 SurfExample– code example recommender for
exception handling
 Graph-based structural relevance matching
 Handler Quality paradigm
 Outperforms four existing approaches in all metrics
49
SoftwareResearchLab,UofS
FUTURE WORK
 SurfClipse – DOM-based element extraction &
topic modeling
 QueryClipse– Semantic and customized query
recommendation
 ContentSuggest– More focused content
recommendation (e.g., paragraph of interest) for
problem solving
 SurfExample– More directed support (e.g.,
applicability of an example) for exception handling
50
SoftwareResearchLab,UofS
THANK YOU!!
51
SoftwareResearchLab,UofS
REFERENCES
[1] J. Cordeiro, B. Antunes, and P. Gomes. Context-based Recommendation to Support Problem Solving in
Software Development. In Proc. RSSE, pages 85 –89, June 2012.
[2] L. Ponzanelli, A. Bacchelli, and M. Lanza. Seahawk: Stack Overflow in the IDE. In Proc. ICSE, pages 1295–
1298, 2013
[3] J. Brandt, P. J. Guo, J. Lewenstein, M. Dontcheva, and S. R. Klemmer. Two Studies of Opportunistic
Programming: Interleaving Web Foraging, Learning, and Writing Code. In Proc. SIGCHI, pages 1589–1598,
2009.
[4] F. Sun, D. Song, and L. Liao. DOM Based Content Extraction via Text Density. In Proc. SIGIR, pages 245–254,
2011.
[5] T. Gottron. Content Code Blurring: A New Approach to Content Extraction. In Proc. DEXA, pages 29–33,
2008.
[6] S. Bajracharya, J. Ossher, and C. Lopes. Sourcerer: An Internet-Scale Software Repository. In Proc. SUITE,
pages 1–4, 2009
[7] E. A. Barbosa, A. Garcia, and M. Mezini. Heuristic Strategies for Recommendation of Exception Handling
Code. In Proc. SBES, pages 171–180, 2012
[8] R. Holmes and G. C. Murphy. Using Structural Context to Recommend Source Code Examples. In Proc.
ICSE, pages 117–125, 2005
[9] W. Takuya and H. Masuhara. A Spontaneous Code Recommendation Tool Based on Associative Search. In
Proc. SUITE, pages 17–20, 2011.
[10] M. M. Rahman, S. Yeasmin, and C. K. Roy. Towards a Context-Aware IDEBased Meta Search Engine for
Recommendation about Programming Errors and Exceptions. In Proc. CSMR-WCRE, pages 194–203, 2014
[11] M. M. Rahman and C.K. Roy. On the Use of Context in Recommending Exception Handling Code
Examples. In Proc. SCAM, 10 pp., 2014 (to appear)
[12] M. M. Rahman and C.K. Roy. SurfClipse: Context-Aware Meta Search in the IDE. In Proc. ICSME, 4 pp., 2014
(to appear)
[13] Slide 13, Meta Search Engine, http://en.wikipedia.org/wiki/Metasearch_engine 52
SoftwareResearchLab,UofS
APPENDICES
53
MAPPING BETWEEN PROBLEM SOLVING
STEPS & PROPOSED APPROACHES
54
Step II: Associated with
QueryClipse
Step I: Associated with SurfClipse
Step III: Associated with
ContentSuggest
Step IV: Associated with
SurfExample
Proposed
Approach
THREATS TO VALIDITY (SURFCLIPSE)
 Search not real time yet, generally takes about 20-
25 seconds per search. Multithreading used,
extensive parallel processing needed.
 Search engines constantly evolving, same results
may not be produced at later time.
 Experimented with common exceptions, which are
widely discussed and available in the web.
55
SoftwareResearchLab,UofS
TRADITIONAL SEARCH QUERIES
 Popular queries by search engines may not be
relevant all the time
 Preparing a suitable query is non-trivial
 Trial and error approach in query formulation
 Ad-hoc (e.g., error message) queries may not
reflect the context of the exception
56
SoftwareResearchLab,UofS
PROPOSED CONTEXT-AWARE QUERY
RECOMMENDATION APPROACH
57
SoftwareResearchLab,UofS
PROPOSED METRICS (3)
 Trace Token Rank (TTR)
 Trace graph developed based on implied relationship
 Calculated using Graph-based term-weighting
 An adaptation from Google’s PageRank algorithm
 Degree of Interest (DOI)
 Heuristic proximity of token to the exception location
 Associated with call references in the stack trace
 Trace Token Frequency (TTF)
 Frequency of trace token in context code
 Associated with method call and object instantiation
58
SoftwareResearchLab,UofS
EXPERIMENT OVERVIEW
 50 exceptions, their technical details and context
code segments collected from our first study.
 Recommended queries evaluated by searching with
Google, Bing and Yahoo!
 Queries compared with existing approaches
 Query ranks validated with experiments
 Applicability of query validated using a user study
 Performance metrics– precision, recall, % of
exceptions solved
59
SoftwareResearchLab,UofS
RESULTS ON DIFFERENT RANKING ASPECTS
60
Rank
Aspects
Metrics Google Bing Yahoo!
Top 10 Top 20 Top 10 Top 20 Top 10 Top 20
{DOI, TTR} MAPK
R
PTCS
36.36%
15.19%
48.00%
36.36%
15.19%
48.00%
49.24%
27.84%
70.00%
49.24%
30.68%
76.00%
51.70%
34.09%
76.00%
51.61%
35.23%
78.00%
{TTR, TTF} MAPK
R
PTCS
38.23%
15.34%
46.00%
38.23%
15.34%
46.00%
50.18%
29.55%
70.00%
50.09%
31.25%
74.00%
45.46%
30.68%
68.00%
44.60%
32.39%
70.00%
{DOI, TTF} MAPK
R
PTCS
37.26%
17.61%
50.00%
37.26%
17.61%
50.00%
49.53%
27.84%
72.00%
48.23%
30.11%
74.00%
53.49%
30.68%
78.00%
51.35%
32.95%
78.00%
{DOI, TTR,
TTF}
MAPK
R
PTCS
34.06%
13.64%
42.00%
34.06%
13.64%
42.00%
51.85%
27.84%
72.00%
50.44%
31.25%
76.00%
55.31%
31.82%
76.00%
53.40%
35.23%
80.00%
[ MP = Mean Average Precision at K, R = Recall,
PTCS= % of Exceptions Solved]
COMPARISON WITH EXISTING APPROACHES
61
SoftwareResearchLab,UofS
Approach Metrics Google Bing Yahoo!
Top 10 Top 20 Top 10 Top 20 Top 10 Top 20
Traditional
(Only error
message)
MAPK
R
PTCS
38.97%
19.88%
52.00%
38.97%
19.88%
52.00%
44.11%
24.43%
58.00%
43.82%
26.14%
60.00%
43.18%
25.00%
56.00%
43.18
25.00%
56.00%
Cordeiro et
al.
MAPK
R
PTCS
21.33%
10.80%
36.00%
21.17%
11.93%
38.00%
19.22%
11.93%
34.00%
19.22%
13.07%
36.00%
15.94%
10.80%
32.00%
16.60%
13.06%
40.00%
Ponzanelli et
al.
MAPK
R
PTCS
14.36%
9.09%
24.00%
14.36%
9.09%
24.00%
30.27%
12.50%
38.00%
29.98%
13.07%
38.00%
28.12%
12.50%
38.00%
28.12%
12.50%
38.00%
Proposed
approach
MAPK
R
PTCS
34.06%
13.64%
42.00%
34.06%
13.64%
42.00%
51.85%
27.84%
72.00%
50.44%
31.25%
76.00%
55.31%
31.82%
76.00%
53.40%
35.23%
80.00%
[ MP = Mean Average Precision at K, R = Recall,
PTCS= % of Exceptions Solved]
FINDINGS FROM USER STUDY
62
SoftwareResearchLab,UofS
Query No. 1 2 3 4 5 APS MAPS
PS (Rank I) 0.75 0.89 1.00 1.00 1.00 0.93
PS (Rank II) 0.67 0.72 0.93 1.00 0.63 0.79 0.84
PS (Rank III) 0.67 0.72 1.00 0.93 0.63 0.79
[ PS = Pyramid Score, APS = Average Pyramid Score,
MAPS= Mean Average Pyramid Score]
THREATS TO VALIDITY
 Long query generation due to lengthy error
message in the stack trace.
 Less user-friendly query due to complex program
tokens– class name, method name in the trace
information.
63
SoftwareResearchLab,UofS
PROPOSED CONTEXT-AWARE PAGE CONTENT
SUGGESTION APPROACH
64
SoftwareResearchLab,UofS
PROPOSED METRICS & SCORES (3)
 Content Density (CTD)
 Text Density
 Density of any textual content within a tag
 Link Density
 Density of link-based content (i.e., <a>, <input>)
 Code Density
 Density of code related content (i.e., <code>, <pre>)
 Content Relevance (CTR)
 Text Relevance
 Relevance of any textual content within a tag
 Code Relevance
 Relevance of code related content within a tag
 Content Score (CTS)
 Combines both Content Density and Content Relevance 65
SoftwareResearchLab,UofS
EXPERIMENT OVERVIEW
 500 web pages,150 exceptions and their details
(i.e., stack trace, context code) as dataset
 40% of the pages from StackOverflow Q & A site
 Evaluated against manually prepared gold sets
 Evaluated for both relevant and noise-free content
recommendation
 Compared with four existing approaches
 Performance metrics– precision, recall, F1-
measure
66
SoftwareResearchLab,UofS
RESULT ON DIFFERENT ASPECTS OF PAGE
CONTENT (RELEVANT CONTENT SUGGESTION)
67
SoftwareResearchLab,UofS
Content
Aspect
Metrics SO Pages Non-SO Pages All Pages
Content
Density
(CTD)
MP
MR
MF
50.91%
91.74%
62.32%
49.50%
75.71%
53.76%
50.07%
82.18%
57.22%
Content
Relevance
(CTR)
MP
MR
MF
86.63%
52.17%
61.07%
69.17%
57.66%
55.88%
76.23%
55.44%
57.98%
{CTD, CTR} MP
MR
MF
89.91%
74.90%
80.07%
74.12%
80.76%
73.91%
80.50%
78.39%
76.40%
[ MP = Mean Precision, MR = Mean Recall,
MF= Mean F1-measure]
COMPARISON WITH EXISTING APPROACHES
68
SoftwareResearchLab,UofS
Approach Metrics SO Pages Non-SO Pages All Pages
Sun et al. MP
MR
MF
80.61%
86.41%
83.14%
78.70%
75.67%
75.48%
79.49%
80.14%
78.67%
ACCB [50] MP
MR
MF
90.65%
77.32%
83.07%
93.07%
79.98%
84.64%
92.06%
78.87%
83.99%
Proposed
(noise-free content
extraction)
MP
MR
MF
91.27%
89.27%
90.00%
88.90%
86.20%
85.76%
89.88%
87.48%
87.53%
Sun et al. (adapted) MP
MR
MF
52.63%
86.49%
62.57%
38.89%
41.84%
34.49%
44.44%
59.88%
45.84%
Proposed
(relevant section
suggestion)
MP
MR
MF
89.91%
74.90%
80.07%
74.12%
80.76%
73.91%
80.50%
78.39%
76.40%
[ MP = Mean Precision, MR = Mean Recall,
MF= Mean F1-measure]
THREATS TO VALIDITY
 Changes in the look and feel of the page due to
removal of <style> and <script> tags
 Lack of a fully-fledged user study
69
SoftwareResearchLab,UofS
PROPOSED METRICS (3)
 Structural Relevance (Rstr)
 API Object Match (AOM)
 Field Access Match (FAM)
 Method Invocation Match (MIM)
 Data Dependency Match (DDM)
 Lexical Relevance (Rlex)
 Cosine Similarity
 Code Clone Measure
 Quality of Exception Handler (Qehc)
 Readability (RA)
 Average Handler Actions (AHA)
 Handler to Code Ratio (HCR)
70
SoftwareResearchLab,UofS
EXPERIMENT OVERVIEW
 65 exceptions and context code segments
 4400 code examples from 700+ repositories of
Eclipse, Apache, Facebook and Twitter
 Evaluated against manually prepared gold set
 Compared with four existing approaches
 Performance metrics– precision, recall, # and % of
exceptions handled
71
SoftwareResearchLab,UofS
RESULT ON DIFFERENT RANKING ASPECTS
72
SoftwareResearchLab,UofS
Ranking Aspects Metrics Top 5 Top 10 Top 15
Structure (Rstr) MAPK
R
PEH
38.07%
50.00%
69.23%
33.84%
61.93%
75.38%
32.64%
69.32%
81.54%
Content (Rlex) MAPK
R
PEH
35.00%
45.45%
66.15%
33.85%
63.63%
75.38%
33.08%
70.45%
81.54%
{Structure (Rstr),
Content (Rlex)}
MAPK
R
PEH
43.08%
51.70%
69.23%
38.69%
66.48%
75.38%
37.33%
74.43%
81.54%
{Structure (Rstr),
Content (Rlex),
Quality (Qehc)}
MAPK
R
PEH
41.92%
57.39%
73.85%
39.92%
68.75%
81.54%
38.64%
76.70%
86.15%
[ MAPK = Mean Average Precision at K, R = Recall,
PEH= % of exceptions handled]
COMPARISON WITH EXISTING APPROACHES
73
SoftwareResearchLab,UofS
Recommender Metrics Top 5 Top 10 Top 15
Barbosa et al. MAPK
R
PEH
16.15%
16.47%
27.69%
14.69%
25.57%
38.46%
13.72%
31.25%
44.62%
Holmes & Murphy MAPK
R
PEH
4.62%
11.36%
24.62%
2.31%
21.59%
38.46%
2.31%
27.84%
47.69%
Takuya & Masuhara MAPK
R
PEH
21.54%
15.34%
33.85%
20.51%
27.27%
47.69%
19.74%
30.68%
47.69%
Bajracharya et al. MAPK
R
PEH
8.46%
10.80%
18.46%
7.95%
15.91%
27.69%
6.41%
19.32%
30.77%
Proposed approach MAPK
R
PEH
41.92%
57.39%
73.85%
39.92%
68.75%
81.54%
38.64%
76.70%
86.15%
[ MAPK = Mean Average Precision at K, R = Recall,
PEH= % of exceptions handled]
THREATS TO VALIDITY
 Subjective bias in gold set development
 Limited size of dynamic corpus for recommendation
 Limited number of exceptions for experiments
74
SoftwareResearchLab,UofS
TRADITIONAL WEB SEARCH
 No ties between IDE and web
browsers
 Does not consider problem-
context
 Environment-switching is
distracting & time-consuming
 Often not much productive
(trial & error approach)
75
SoftwareResearchLab,UofS
TRADITIONAL SUPPORT FOR POST-SEARCH
CONTENT ANALYSIS
 Keyword highlighting in title based on search
query
 Very limited meta description using keywords or
phrases.
 Page URL, Page visit statistics
 Little clues for actual content in the web page
 Forces one to browse the page
76
SoftwareResearchLab,UofS
TRADITIONAL CODE SEARCH ENGINES
 No ties with the IDE
 Returns hundreds of result
pages
 Keyword matching search
 No support for search query
formulation
77
SoftwareResearchLab,UofS
PROPOSED CONTEXT-AWARE CODE EXAMPLE
RECOMMENDER FOR EXCEPTION HANDLING
78
SoftwareResearchLab,UofS
USER STUDY GROUPING
79
P1,P2,P3,P4,P5,P6
A (P1,P4,P5) B (P2,P3,P6)
EC1, EC2,
EC3, EC4
S1
(EC1,
EC2)
S2
(EC3,
EC4)
T/S1 + E/S2 T/S2 + E/S1
I (P1,P5) II (P4) I (P2) II (P3,P6)
TE ET TE ET

Más contenido relacionado

Similar a Exploiting Context in Dealing with Programming Errors and Exceptions

Toward Automatic Generation of SPARQL result set Visualizations
Toward Automatic Generation of SPARQL result set VisualizationsToward Automatic Generation of SPARQL result set Visualizations
Toward Automatic Generation of SPARQL result set Visualizations
Marcello Leida
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
Justin Basilico
 
SF1 - Apex Development Best Practises
SF1 - Apex Development Best PractisesSF1 - Apex Development Best Practises
SF1 - Apex Development Best Practises
Sebastian Wagner
 
Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems
MongoDB
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your Cluster
MongoDB
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncube
Malisa Ncube
 
Share Point Development With Unit Testing
Share Point Development With Unit TestingShare Point Development With Unit Testing
Share Point Development With Unit Testing
Jeremy Thake
 
Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial Intelligence
Lionel Briand
 
CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016
Masud Rahman
 
Test PDF file
Test PDF fileTest PDF file
Test PDF file
Prayag Verma
 
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
Masud Rahman
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
Alessandro Lavazzi
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
medsherb
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
Lionel Briand
 
An IDE-Based Context-Aware Meta Search Engine
An IDE-Based Context-Aware Meta Search EngineAn IDE-Based Context-Aware Meta Search Engine
An IDE-Based Context-Aware Meta Search Engine
Masud Rahman
 
IJET-V3I2P2
IJET-V3I2P2IJET-V3I2P2
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security TestingApplications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
Lionel Briand
 
Rachid kherrazi-testing-asd-interface-compliance-with-asd spec
Rachid kherrazi-testing-asd-interface-compliance-with-asd specRachid kherrazi-testing-asd-interface-compliance-with-asd spec
Rachid kherrazi-testing-asd-interface-compliance-with-asd spec
Rachid Kherrazi
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
David Solivan
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
QA or the Highway
 

Similar a Exploiting Context in Dealing with Programming Errors and Exceptions (20)

Toward Automatic Generation of SPARQL result set Visualizations
Toward Automatic Generation of SPARQL result set VisualizationsToward Automatic Generation of SPARQL result set Visualizations
Toward Automatic Generation of SPARQL result set Visualizations
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
 
SF1 - Apex Development Best Practises
SF1 - Apex Development Best PractisesSF1 - Apex Development Best Practises
SF1 - Apex Development Best Practises
 
Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems Using Compass to Diagnose Performance Problems
Using Compass to Diagnose Performance Problems
 
Using Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your ClusterUsing Compass to Diagnose Performance Problems in Your Cluster
Using Compass to Diagnose Performance Problems in Your Cluster
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncube
 
Share Point Development With Unit Testing
Share Point Development With Unit TestingShare Point Development With Unit Testing
Share Point Development With Unit Testing
 
Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial Intelligence
 
CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016
 
Test PDF file
Test PDF fileTest PDF file
Test PDF file
 
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
SurfClipse-- An IDE based context-aware Meta Search Engine (ERA Track)
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
 
An IDE-Based Context-Aware Meta Search Engine
An IDE-Based Context-Aware Meta Search EngineAn IDE-Based Context-Aware Meta Search Engine
An IDE-Based Context-Aware Meta Search Engine
 
IJET-V3I2P2
IJET-V3I2P2IJET-V3I2P2
IJET-V3I2P2
 
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security TestingApplications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
 
Rachid kherrazi-testing-asd-interface-compliance-with-asd spec
Rachid kherrazi-testing-asd-interface-compliance-with-asd specRachid kherrazi-testing-asd-interface-compliance-with-asd spec
Rachid kherrazi-testing-asd-interface-compliance-with-asd spec
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
 

Más de Masud Rahman

HereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityHereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie University
Masud Rahman
 
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
Masud Rahman
 
PhD Seminar - Masud Rahman, University of Saskatchewan
PhD Seminar - Masud Rahman, University of SaskatchewanPhD Seminar - Masud Rahman, University of Saskatchewan
PhD Seminar - Masud Rahman, University of Saskatchewan
Masud Rahman
 
PhD proposal of Masud Rahman
PhD proposal of Masud RahmanPhD proposal of Masud Rahman
PhD proposal of Masud Rahman
Masud Rahman
 
PhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanPhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud Rahman
Masud Rahman
 
Doctoral Symposium of Masud Rahman
Doctoral Symposium of Masud RahmanDoctoral Symposium of Masud Rahman
Doctoral Symposium of Masud Rahman
Masud Rahman
 
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
Masud Rahman
 
ICSE2018-Poster-Bug-Localization
ICSE2018-Poster-Bug-LocalizationICSE2018-Poster-Bug-Localization
ICSE2018-Poster-Bug-Localization
Masud Rahman
 
MSR2017-Challenge
MSR2017-ChallengeMSR2017-Challenge
MSR2017-Challenge
Masud Rahman
 
MSR2017-RevHelper
MSR2017-RevHelperMSR2017-RevHelper
MSR2017-RevHelper
Masud Rahman
 
STRICT-SANER2017
STRICT-SANER2017STRICT-SANER2017
STRICT-SANER2017
Masud Rahman
 
MSR2015-Challenge
MSR2015-ChallengeMSR2015-Challenge
MSR2015-Challenge
Masud Rahman
 
MSR2014-Challenge
MSR2014-ChallengeMSR2014-Challenge
MSR2014-Challenge
Masud Rahman
 
CodeInsight-SCAM2015
CodeInsight-SCAM2015CodeInsight-SCAM2015
CodeInsight-SCAM2015
Masud Rahman
 
STRICT-SANER2015
STRICT-SANER2015STRICT-SANER2015
STRICT-SANER2015
Masud Rahman
 
CMPT-842-BRACK
CMPT-842-BRACKCMPT-842-BRACK
CMPT-842-BRACK
Masud Rahman
 
RACK-Tool-ICSE2017
RACK-Tool-ICSE2017RACK-Tool-ICSE2017
RACK-Tool-ICSE2017
Masud Rahman
 
RACK-SANER2016
RACK-SANER2016RACK-SANER2016
RACK-SANER2016
Masud Rahman
 
QUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeQUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-Singapore
Masud Rahman
 
CORRECT-ICSE2016
CORRECT-ICSE2016CORRECT-ICSE2016
CORRECT-ICSE2016
Masud Rahman
 

Más de Masud Rahman (20)

HereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityHereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie University
 
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
The Forgotten Role of Search Queries in IR-based Bug Localization: An Empiric...
 
PhD Seminar - Masud Rahman, University of Saskatchewan
PhD Seminar - Masud Rahman, University of SaskatchewanPhD Seminar - Masud Rahman, University of Saskatchewan
PhD Seminar - Masud Rahman, University of Saskatchewan
 
PhD proposal of Masud Rahman
PhD proposal of Masud RahmanPhD proposal of Masud Rahman
PhD proposal of Masud Rahman
 
PhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanPhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud Rahman
 
Doctoral Symposium of Masud Rahman
Doctoral Symposium of Masud RahmanDoctoral Symposium of Masud Rahman
Doctoral Symposium of Masud Rahman
 
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
Supporting Source Code Search with Context-Aware and Semantics-Driven Code Se...
 
ICSE2018-Poster-Bug-Localization
ICSE2018-Poster-Bug-LocalizationICSE2018-Poster-Bug-Localization
ICSE2018-Poster-Bug-Localization
 
MSR2017-Challenge
MSR2017-ChallengeMSR2017-Challenge
MSR2017-Challenge
 
MSR2017-RevHelper
MSR2017-RevHelperMSR2017-RevHelper
MSR2017-RevHelper
 
STRICT-SANER2017
STRICT-SANER2017STRICT-SANER2017
STRICT-SANER2017
 
MSR2015-Challenge
MSR2015-ChallengeMSR2015-Challenge
MSR2015-Challenge
 
MSR2014-Challenge
MSR2014-ChallengeMSR2014-Challenge
MSR2014-Challenge
 
CodeInsight-SCAM2015
CodeInsight-SCAM2015CodeInsight-SCAM2015
CodeInsight-SCAM2015
 
STRICT-SANER2015
STRICT-SANER2015STRICT-SANER2015
STRICT-SANER2015
 
CMPT-842-BRACK
CMPT-842-BRACKCMPT-842-BRACK
CMPT-842-BRACK
 
RACK-Tool-ICSE2017
RACK-Tool-ICSE2017RACK-Tool-ICSE2017
RACK-Tool-ICSE2017
 
RACK-SANER2016
RACK-SANER2016RACK-SANER2016
RACK-SANER2016
 
QUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeQUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-Singapore
 
CORRECT-ICSE2016
CORRECT-ICSE2016CORRECT-ICSE2016
CORRECT-ICSE2016
 

Último

Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 
11.1 Role of physical biological in deterioration of grains.pdf
11.1 Role of physical biological in deterioration of grains.pdf11.1 Role of physical biological in deterioration of grains.pdf
11.1 Role of physical biological in deterioration of grains.pdf
PirithiRaju
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
Daniel Tubbenhauer
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
Texas Alliance of Groundwater Districts
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
İsa Badur
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
Gokturk Mehmet Dilci
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
vluwdy49
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
Sérgio Sacani
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
hozt8xgk
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
Sérgio Sacani
 
Katherine Romanak - Geologic CO2 Storage.pdf
Katherine Romanak - Geologic CO2 Storage.pdfKatherine Romanak - Geologic CO2 Storage.pdf
Katherine Romanak - Geologic CO2 Storage.pdf
Texas Alliance of Groundwater Districts
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
Advanced-Concepts-Team
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
Leonel Morgado
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
Anagha Prasad
 

Último (20)

Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 
11.1 Role of physical biological in deterioration of grains.pdf
11.1 Role of physical biological in deterioration of grains.pdf11.1 Role of physical biological in deterioration of grains.pdf
11.1 Role of physical biological in deterioration of grains.pdf
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
 
Katherine Romanak - Geologic CO2 Storage.pdf
Katherine Romanak - Geologic CO2 Storage.pdfKatherine Romanak - Geologic CO2 Storage.pdf
Katherine Romanak - Geologic CO2 Storage.pdf
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
 

Exploiting Context in Dealing with Programming Errors and Exceptions

  • 1. EXPLOITING CONTEXT IN DEALING WITH PROGRAMMING ERRORS AND EXCEPTIONS Mohammad Masudur Rahman Department of Computer Science University of Saskatchewan
  • 3. EXCEPTION DEBUGGING 3 Not a helpful message for understanding or solving the exception SoftwareResearchLab,UofS Web search!!
  • 4. SOLVING EXCEPTION (STEP I: WEB SEARCH) 4  The browser does not know the context (i.e., details) of the exception.  Not much helpful ranking  Hundreds of search results  Forces the developer to switch back and forth between IDE and browser.  Trial and error in searching SoftwareResearchLab,UofS Switching is often distracting
  • 5. SOLVING EXCEPTION (STEP II: QUERY SELECTION) 5 Selection of traditional search query Switching to web browser for web search SoftwareResearchLab,UofS This query may not be sufficient enough for most of the exceptions
  • 6. SOLVING EXCEPTION (STEP III: POST-SEARCH ANALYSIS) 6 • Only the most relevant section needs to be checked to determine the relevance of a page. • Frequent switching between IDE and web browser for content analysis • Manual analysis of a number of web pages is non-trivial and time-consuming 1 2 3 4
  • 7. SOLVING EXCEPTION (STEP IV: HANDLING EXCEPTIONS) 7  Only adds a generic handler (i.e., printStackTrace()) for the exception.  Not much helpful for effective handling of the exception
  • 8. OBSERVATIONS ON TRADITIONAL/AD-HOC APPROACH FOR EXCEPTION SOLVING  Step I: Web search may not be much effective or reliable  Step II: Support for search query formulation is not enough  Step III: Support for post-search analysis is insufficient  Step IV: Support for exception handling is not enough 8 SoftwareResearchLab,UofS
  • 9. DEALING WITH ERRORS & EXCEPTIONS: PROPOSED APPROACH 9
  • 10. CONTRIBUTIONS OF THIS THESIS (1) SurfClipse (WCRE 2013, CSMR/WCRE 2014) (2) QueryClipse (ICSME 2014) (3) ContentSuggest (4) SurfExample (SCAM 2014) (5) ExcClipse 10 Web search Query formulation Post-search analysis Exception handling User study
  • 11. TECHNICAL DETAILS & PROGRAMMING CONTEXT OF AN EXCEPTION 11 Programming context (i.e., context code) Error message Stack trace 1 2 3 SoftwareResearchLab,UofS
  • 13. MOTIVATIONAL EXPERIMENT 13  75 programming exceptions (details later)  Individual engine can provide solutions for at most 58 exceptions & each has some unique results.  Combination of content & context is always better than content only Search Query Common for All Google Unique Yahoo Unique Bing Unique Content Only 32 09 16 18 Content and Context 47 09 11 10 SoftwareResearchLab,UofS
  • 14. THE KEY IDEA !! META SEARCH ENGINE 14 SoftwareResearchLab,UofS Fig: Meta search engine
  • 15. PROPOSED IDE-BASED META SEARCH MODEL Start Results Web page 15 SoftwareResearchLab,UofS
  • 16. PROPOSED IDE-BASED META SEARCH MODEL  Distinguished Features (5)  IDE-Based solution  Web search, search result and web browsing all from IDE  No context-switching needed  Meta search engine  Captures data from multiple search engines  Also applies custom ranking techniques  Context-Aware search  Uses stack traces information  Uses context-code (surroundings of exception locations)  Software As A Service (SAAS)  Search is provided as a web service, and can be leveraged by an IDE. http://srlabg53-2.usask.ca/wssurfclipse/ 16 SoftwareResearchLab,UofS
  • 17. PROPOSED IDE-BASED META SEARCH MODEL  Two Working Modes  Proactive Mode  Auto-detects the occurrence of an exception  Initiates search for exception by client itself  Aligned with Cordeiro et al. (RSSE’ 2012) & Ponzanelli et al. (ICSE 2013)  Interactive Mode  Developer starts search using context menu  Also facilitates keyword-based search  Aligned with traditional web search within the IDE 17 SoftwareResearchLab,UofS
  • 18. PROPOSED METRICS & SCORES  Content Matching Score (Scms)  Cosine similarity based measurement  Stack trace Matching Score (Sstm)  Structural and lexical similarity measurement of stack traces  Code context Matching Score (Sccx)  Code snippet similarity (code clones)  StackOverflow Vote Score (Sso)  Total votes for all posts in the SO result link 18 SoftwareResearchLab,UofS
  • 19. PROPOSED METRICS & SCORES  Site Traffic Rank Score (Sstr)-- Alexa and Compete Rank of each link  Search Engine weight (Ssew)---Relative reliability or importance of each search engine. Experiments with 75 programming queries against the search engines.  Heuristic weights of the metrics are determined through controlled experiments. 19 SoftwareResearchLab,UofS
  • 20. EXPERIMENT OVERVIEW 21 SoftwareResearchLab,UofS 75 exceptions Eclipse plug-in & Java development Gold set solutions Peers
  • 21. RESULTS ON DIFFERENT RANKING ASPECTS Score Components Metrics Proactive Mode (Top 30) Interactive Mode (Top 30) Content MP TEF R 0.0371 56 (75) 74.66% 0.0481 65 (75) 86.66% Content +Context MP TEF R 0.0376 55 (75) 73.33% 0.0514 66 (75) 88.00% Content + Context + Popularity MP TEF R 0.0381 56 (75) 74.66% 0.0519 66 (75) 88.00% Content +Context + Popularity +Confidence MP TEF R 0.0380 56 (75) 74.66% 0.0538 68 (75) 90.66% [ MP = Mean Precision, R = Recall, TEF= Total Exceptions Fixed] 22 SoftwareResearchLab,UofS
  • 22. COMPARISON WITH EXISTING APPROACHES Recommender Metrics Top 10 Top 20 Top 30 Cordeiro et al. (only stack traces) MP TEF R 0.0202 15 (75) 20.00% 0.0128 18 (75) 24.00% 0.0085 18 (75) 24.00% Proposed Method (Proactive Mode) MP TEF R 0.0886 51 (75) 68.00% 0.0529 55 (75) 73.33% 0.0380 56 (75) 74.66% Ponzanelli et al. (only context-code) MP TEF R 0.0243 7 (37) 18.92% 0.0135 7 (37) 18.92% 0.0099 7 (37) 18.92% Proposed Method (Proactive Mode) MP TEF R 0.1000 30 (37) 81.08% 0.0621 32 (37) 86.48% 0.0450 32 (37) 86.48% [ MP = Mean Precision, R = Recall, TEF= Total Exceptions Fixed] 23 SoftwareResearchLab,UofS
  • 23. COMPARISON WITH TRADITIONAL SEARCH ENGINES Search Engine Metrics Top 10 Top 20 Top 30 Google MP TEF R 0.1571 57 (75) 76.00% 0.0864 57 (75) 76.00% 0.0580 57 (75) 76.00% Bing MP TEF R 0.1013 55 (75) 73.33% 0.0533 58 (75) 77.33% 0.0364 58 (75) 77.33% Yahoo! MP TEF R 0.0986 54 (75) 72.00% 0.0539 57 (75) 76.00% 0.0369 57 (75) 76.00% StackOverflow Search MP TEF R 0.0226 14 (75) 18.66% 0.0140 17 (75) 22.66% 0.0097 17 (75) 22.66% Proposed Method (Interactive mode) MP TEF R 0.1229 59 (75) 78.66% 0.0736 64 (75) 85.33% 0.0538 68 (75) 90.66% 24 SoftwareResearchLab,UofS
  • 24. CONTRIBUTIONS OF THIS THESIS (1) SurfClipse (WCRE 2013, CSMR/WCRE 2014) (2) QueryClipse (ICSME 2014) (3) ContentSuggest (4) SurfExample (SCAM 2014) (5) ExcClipse 25 Web search Query formulation Post-search analysis Exception handling User study
  • 26. MOTIVATING EXAMPLE 27 SoftwareResearchLab,UofS Stack traceContext code QueryClipse 2 1 Recommended search queries
  • 27. PROPOSED CONTEXT-AWARE QUERY RECOMMENDATION APPROACH  Distinguishing Features (4)  Context-Aware Query  Exploits both stack trace and context code  Extract search keywords carefully and systematically  Ranked List for Queries  Ranked list based on keyword importance in queries  Automatic suggestion through auto-completion  Custom Search Query  Stack trace graph based on implied relationships  Keyword importance based on network connectivity  Query Length Customization  Number of query keywords customizable  Search-friendly & easily applicable for any search engines 28 SoftwareResearchLab,UofS
  • 29. MOTIVATING EXAMPLE 30 1 2 3  Only the most relevant page section displayed  Less information overhead, less effort required  No need to browse the page for relevance checking SoftwareResearchLab,UofS
  • 30. PROPOSED CONTEXT-AWARE PAGE CONTENT SUGGESTION APPROACH  Distinguishing Features (3)  Relevant section(s) suggestion  Analyzes both quality and relevance of the content  Exploits stack trace & context code for relevance checking  Partial automation in post-search analysis  Less content, less overhead  Need to analyze less content for page relevance checking  Displayed content more useful than meta description  Noise-free version of the page  Removes advertisements, irrelevant widgets and so on  Applies link-based heuristics  Returns a noise-free version of the web page 31 SoftwareResearchLab,UofS
  • 31. CONTRIBUTIONS OF THIS THESIS (1) SurfClipse (WCRE 2013, CSMR/WCRE 2014) (2) QueryClipse (ICSME 2014) (3) ContentSuggest (4) SurfExample (SCAM 2014) (5) ExcClipse 32 Web search Query formulation Post-search analysis Exception handling User study
  • 32. SURFEXAMPLE: CONTEXT-AWARE CODE EXAMPLE RECOMMENDER FOR EXCEPTION HANDLING 33
  • 34. PROPOSED CONTEXT-AWARE CODE EXAMPLE RECOMMENDER FOR EXCEPTION HANDLING  Distinguishing Features (3)  Graph-based structural relevance  Static relationship and data dependency graph  Graph structure matching  Handler quality Paradigm  Novel idea to ensure quality of exception handlers  Based on readability, amount & quality of the handler actions  Seamless integration of dataset  Exploits GitHub API for data collection  Hundreds of popular and mature open source projects from Eclipse, Apache and others 35 SoftwareResearchLab,UofS
  • 35. CONTRIBUTIONS OF THIS THESIS (1) SurfClipse (WCRE 2013, CSMR/WCRE 2014) (2) QueryClipse (ICSME 2014) (3) ContentSuggest (4) SurfExample (SCAM 2014) (5) ExcClipse 36 Web search Query formulation Post-search analysis Exception handling User study
  • 36. EXCCLIPSE: COMPARATIVE ANALYSIS BETWEEN PROPOSED APPROACHES AND TRADITIONAL ONES 37
  • 37. USER STUDY OVERVIEW 38 SoftwareResearchLab,UofS Six participants Four exceptions Four tasks
  • 38. USER STUDY OVERVIEW 39 SoftwareResearchLab,UofS Questionnaire Observation checklist Training Execution Evaluation
  • 39. EVALUATION FEATURES 41 SoftwareResearchLab,UofS Tool Feature Functionality Notation Support for query formulation Web search F1 Accuracy & effectiveness of results Web search F2 Post-search content analysis Web search F3 Support for query formulation Code search F4 Relevance & accuracy of results Code search F5 Usability Overall F6 Efficiency Overall F7 Visualization support Web search F8 Visualization support Code search F9
  • 40. FEATURE-WISE RATINGS (WEB SEARCH) 42 SoftwareResearchLab,UofS
  • 41. FEATURE-WISE RATINGS (CODE SEARCH) 43 SoftwareResearchLab,UofS
  • 44. THREATS TO VALIDITY  SurfClipse--Search engines constantly evolving, same results may not be produced at later time.  QueryClipse-- Long query generation due to lengthy error message in the stack trace.  ContentSuggest-- Changes in the look and feel of the page due to removal of <style> and <script> tags  SurfExample-- Subjective bias in gold set development  ExcClipse--Limited number of participants 46 SoftwareResearchLab,UofS
  • 46. CONCLUDING REMARKS  SurfClipse – context-aware meta search engine  IDE-based complete web search solution  Outperforms two relevant existing approaches  More recall than three search engines with precision comparable to Google, the best performing engine.  QueryClipse– context-aware query recommender  More effective than traditional queries and queries by existing approaches  Highly applicable in terms of pyramid score 48 SoftwareResearchLab,UofS
  • 47. CONCLUDING REMARKS  ContentSuggest– context-aware page content recommender  Exploits exception details and recommends relevant section(s) from the page  Less information, less overhead for relevance check  Great potential for problem solving  SurfExample– code example recommender for exception handling  Graph-based structural relevance matching  Handler Quality paradigm  Outperforms four existing approaches in all metrics 49 SoftwareResearchLab,UofS
  • 48. FUTURE WORK  SurfClipse – DOM-based element extraction & topic modeling  QueryClipse– Semantic and customized query recommendation  ContentSuggest– More focused content recommendation (e.g., paragraph of interest) for problem solving  SurfExample– More directed support (e.g., applicability of an example) for exception handling 50 SoftwareResearchLab,UofS
  • 50. REFERENCES [1] J. Cordeiro, B. Antunes, and P. Gomes. Context-based Recommendation to Support Problem Solving in Software Development. In Proc. RSSE, pages 85 –89, June 2012. [2] L. Ponzanelli, A. Bacchelli, and M. Lanza. Seahawk: Stack Overflow in the IDE. In Proc. ICSE, pages 1295– 1298, 2013 [3] J. Brandt, P. J. Guo, J. Lewenstein, M. Dontcheva, and S. R. Klemmer. Two Studies of Opportunistic Programming: Interleaving Web Foraging, Learning, and Writing Code. In Proc. SIGCHI, pages 1589–1598, 2009. [4] F. Sun, D. Song, and L. Liao. DOM Based Content Extraction via Text Density. In Proc. SIGIR, pages 245–254, 2011. [5] T. Gottron. Content Code Blurring: A New Approach to Content Extraction. In Proc. DEXA, pages 29–33, 2008. [6] S. Bajracharya, J. Ossher, and C. Lopes. Sourcerer: An Internet-Scale Software Repository. In Proc. SUITE, pages 1–4, 2009 [7] E. A. Barbosa, A. Garcia, and M. Mezini. Heuristic Strategies for Recommendation of Exception Handling Code. In Proc. SBES, pages 171–180, 2012 [8] R. Holmes and G. C. Murphy. Using Structural Context to Recommend Source Code Examples. In Proc. ICSE, pages 117–125, 2005 [9] W. Takuya and H. Masuhara. A Spontaneous Code Recommendation Tool Based on Associative Search. In Proc. SUITE, pages 17–20, 2011. [10] M. M. Rahman, S. Yeasmin, and C. K. Roy. Towards a Context-Aware IDEBased Meta Search Engine for Recommendation about Programming Errors and Exceptions. In Proc. CSMR-WCRE, pages 194–203, 2014 [11] M. M. Rahman and C.K. Roy. On the Use of Context in Recommending Exception Handling Code Examples. In Proc. SCAM, 10 pp., 2014 (to appear) [12] M. M. Rahman and C.K. Roy. SurfClipse: Context-Aware Meta Search in the IDE. In Proc. ICSME, 4 pp., 2014 (to appear) [13] Slide 13, Meta Search Engine, http://en.wikipedia.org/wiki/Metasearch_engine 52 SoftwareResearchLab,UofS
  • 52. MAPPING BETWEEN PROBLEM SOLVING STEPS & PROPOSED APPROACHES 54 Step II: Associated with QueryClipse Step I: Associated with SurfClipse Step III: Associated with ContentSuggest Step IV: Associated with SurfExample Proposed Approach
  • 53. THREATS TO VALIDITY (SURFCLIPSE)  Search not real time yet, generally takes about 20- 25 seconds per search. Multithreading used, extensive parallel processing needed.  Search engines constantly evolving, same results may not be produced at later time.  Experimented with common exceptions, which are widely discussed and available in the web. 55 SoftwareResearchLab,UofS
  • 54. TRADITIONAL SEARCH QUERIES  Popular queries by search engines may not be relevant all the time  Preparing a suitable query is non-trivial  Trial and error approach in query formulation  Ad-hoc (e.g., error message) queries may not reflect the context of the exception 56 SoftwareResearchLab,UofS
  • 55. PROPOSED CONTEXT-AWARE QUERY RECOMMENDATION APPROACH 57 SoftwareResearchLab,UofS
  • 56. PROPOSED METRICS (3)  Trace Token Rank (TTR)  Trace graph developed based on implied relationship  Calculated using Graph-based term-weighting  An adaptation from Google’s PageRank algorithm  Degree of Interest (DOI)  Heuristic proximity of token to the exception location  Associated with call references in the stack trace  Trace Token Frequency (TTF)  Frequency of trace token in context code  Associated with method call and object instantiation 58 SoftwareResearchLab,UofS
  • 57. EXPERIMENT OVERVIEW  50 exceptions, their technical details and context code segments collected from our first study.  Recommended queries evaluated by searching with Google, Bing and Yahoo!  Queries compared with existing approaches  Query ranks validated with experiments  Applicability of query validated using a user study  Performance metrics– precision, recall, % of exceptions solved 59 SoftwareResearchLab,UofS
  • 58. RESULTS ON DIFFERENT RANKING ASPECTS 60 Rank Aspects Metrics Google Bing Yahoo! Top 10 Top 20 Top 10 Top 20 Top 10 Top 20 {DOI, TTR} MAPK R PTCS 36.36% 15.19% 48.00% 36.36% 15.19% 48.00% 49.24% 27.84% 70.00% 49.24% 30.68% 76.00% 51.70% 34.09% 76.00% 51.61% 35.23% 78.00% {TTR, TTF} MAPK R PTCS 38.23% 15.34% 46.00% 38.23% 15.34% 46.00% 50.18% 29.55% 70.00% 50.09% 31.25% 74.00% 45.46% 30.68% 68.00% 44.60% 32.39% 70.00% {DOI, TTF} MAPK R PTCS 37.26% 17.61% 50.00% 37.26% 17.61% 50.00% 49.53% 27.84% 72.00% 48.23% 30.11% 74.00% 53.49% 30.68% 78.00% 51.35% 32.95% 78.00% {DOI, TTR, TTF} MAPK R PTCS 34.06% 13.64% 42.00% 34.06% 13.64% 42.00% 51.85% 27.84% 72.00% 50.44% 31.25% 76.00% 55.31% 31.82% 76.00% 53.40% 35.23% 80.00% [ MP = Mean Average Precision at K, R = Recall, PTCS= % of Exceptions Solved]
  • 59. COMPARISON WITH EXISTING APPROACHES 61 SoftwareResearchLab,UofS Approach Metrics Google Bing Yahoo! Top 10 Top 20 Top 10 Top 20 Top 10 Top 20 Traditional (Only error message) MAPK R PTCS 38.97% 19.88% 52.00% 38.97% 19.88% 52.00% 44.11% 24.43% 58.00% 43.82% 26.14% 60.00% 43.18% 25.00% 56.00% 43.18 25.00% 56.00% Cordeiro et al. MAPK R PTCS 21.33% 10.80% 36.00% 21.17% 11.93% 38.00% 19.22% 11.93% 34.00% 19.22% 13.07% 36.00% 15.94% 10.80% 32.00% 16.60% 13.06% 40.00% Ponzanelli et al. MAPK R PTCS 14.36% 9.09% 24.00% 14.36% 9.09% 24.00% 30.27% 12.50% 38.00% 29.98% 13.07% 38.00% 28.12% 12.50% 38.00% 28.12% 12.50% 38.00% Proposed approach MAPK R PTCS 34.06% 13.64% 42.00% 34.06% 13.64% 42.00% 51.85% 27.84% 72.00% 50.44% 31.25% 76.00% 55.31% 31.82% 76.00% 53.40% 35.23% 80.00% [ MP = Mean Average Precision at K, R = Recall, PTCS= % of Exceptions Solved]
  • 60. FINDINGS FROM USER STUDY 62 SoftwareResearchLab,UofS Query No. 1 2 3 4 5 APS MAPS PS (Rank I) 0.75 0.89 1.00 1.00 1.00 0.93 PS (Rank II) 0.67 0.72 0.93 1.00 0.63 0.79 0.84 PS (Rank III) 0.67 0.72 1.00 0.93 0.63 0.79 [ PS = Pyramid Score, APS = Average Pyramid Score, MAPS= Mean Average Pyramid Score]
  • 61. THREATS TO VALIDITY  Long query generation due to lengthy error message in the stack trace.  Less user-friendly query due to complex program tokens– class name, method name in the trace information. 63 SoftwareResearchLab,UofS
  • 62. PROPOSED CONTEXT-AWARE PAGE CONTENT SUGGESTION APPROACH 64 SoftwareResearchLab,UofS
  • 63. PROPOSED METRICS & SCORES (3)  Content Density (CTD)  Text Density  Density of any textual content within a tag  Link Density  Density of link-based content (i.e., <a>, <input>)  Code Density  Density of code related content (i.e., <code>, <pre>)  Content Relevance (CTR)  Text Relevance  Relevance of any textual content within a tag  Code Relevance  Relevance of code related content within a tag  Content Score (CTS)  Combines both Content Density and Content Relevance 65 SoftwareResearchLab,UofS
  • 64. EXPERIMENT OVERVIEW  500 web pages,150 exceptions and their details (i.e., stack trace, context code) as dataset  40% of the pages from StackOverflow Q & A site  Evaluated against manually prepared gold sets  Evaluated for both relevant and noise-free content recommendation  Compared with four existing approaches  Performance metrics– precision, recall, F1- measure 66 SoftwareResearchLab,UofS
  • 65. RESULT ON DIFFERENT ASPECTS OF PAGE CONTENT (RELEVANT CONTENT SUGGESTION) 67 SoftwareResearchLab,UofS Content Aspect Metrics SO Pages Non-SO Pages All Pages Content Density (CTD) MP MR MF 50.91% 91.74% 62.32% 49.50% 75.71% 53.76% 50.07% 82.18% 57.22% Content Relevance (CTR) MP MR MF 86.63% 52.17% 61.07% 69.17% 57.66% 55.88% 76.23% 55.44% 57.98% {CTD, CTR} MP MR MF 89.91% 74.90% 80.07% 74.12% 80.76% 73.91% 80.50% 78.39% 76.40% [ MP = Mean Precision, MR = Mean Recall, MF= Mean F1-measure]
  • 66. COMPARISON WITH EXISTING APPROACHES 68 SoftwareResearchLab,UofS Approach Metrics SO Pages Non-SO Pages All Pages Sun et al. MP MR MF 80.61% 86.41% 83.14% 78.70% 75.67% 75.48% 79.49% 80.14% 78.67% ACCB [50] MP MR MF 90.65% 77.32% 83.07% 93.07% 79.98% 84.64% 92.06% 78.87% 83.99% Proposed (noise-free content extraction) MP MR MF 91.27% 89.27% 90.00% 88.90% 86.20% 85.76% 89.88% 87.48% 87.53% Sun et al. (adapted) MP MR MF 52.63% 86.49% 62.57% 38.89% 41.84% 34.49% 44.44% 59.88% 45.84% Proposed (relevant section suggestion) MP MR MF 89.91% 74.90% 80.07% 74.12% 80.76% 73.91% 80.50% 78.39% 76.40% [ MP = Mean Precision, MR = Mean Recall, MF= Mean F1-measure]
  • 67. THREATS TO VALIDITY  Changes in the look and feel of the page due to removal of <style> and <script> tags  Lack of a fully-fledged user study 69 SoftwareResearchLab,UofS
  • 68. PROPOSED METRICS (3)  Structural Relevance (Rstr)  API Object Match (AOM)  Field Access Match (FAM)  Method Invocation Match (MIM)  Data Dependency Match (DDM)  Lexical Relevance (Rlex)  Cosine Similarity  Code Clone Measure  Quality of Exception Handler (Qehc)  Readability (RA)  Average Handler Actions (AHA)  Handler to Code Ratio (HCR) 70 SoftwareResearchLab,UofS
  • 69. EXPERIMENT OVERVIEW  65 exceptions and context code segments  4400 code examples from 700+ repositories of Eclipse, Apache, Facebook and Twitter  Evaluated against manually prepared gold set  Compared with four existing approaches  Performance metrics– precision, recall, # and % of exceptions handled 71 SoftwareResearchLab,UofS
  • 70. RESULT ON DIFFERENT RANKING ASPECTS 72 SoftwareResearchLab,UofS Ranking Aspects Metrics Top 5 Top 10 Top 15 Structure (Rstr) MAPK R PEH 38.07% 50.00% 69.23% 33.84% 61.93% 75.38% 32.64% 69.32% 81.54% Content (Rlex) MAPK R PEH 35.00% 45.45% 66.15% 33.85% 63.63% 75.38% 33.08% 70.45% 81.54% {Structure (Rstr), Content (Rlex)} MAPK R PEH 43.08% 51.70% 69.23% 38.69% 66.48% 75.38% 37.33% 74.43% 81.54% {Structure (Rstr), Content (Rlex), Quality (Qehc)} MAPK R PEH 41.92% 57.39% 73.85% 39.92% 68.75% 81.54% 38.64% 76.70% 86.15% [ MAPK = Mean Average Precision at K, R = Recall, PEH= % of exceptions handled]
  • 71. COMPARISON WITH EXISTING APPROACHES 73 SoftwareResearchLab,UofS Recommender Metrics Top 5 Top 10 Top 15 Barbosa et al. MAPK R PEH 16.15% 16.47% 27.69% 14.69% 25.57% 38.46% 13.72% 31.25% 44.62% Holmes & Murphy MAPK R PEH 4.62% 11.36% 24.62% 2.31% 21.59% 38.46% 2.31% 27.84% 47.69% Takuya & Masuhara MAPK R PEH 21.54% 15.34% 33.85% 20.51% 27.27% 47.69% 19.74% 30.68% 47.69% Bajracharya et al. MAPK R PEH 8.46% 10.80% 18.46% 7.95% 15.91% 27.69% 6.41% 19.32% 30.77% Proposed approach MAPK R PEH 41.92% 57.39% 73.85% 39.92% 68.75% 81.54% 38.64% 76.70% 86.15% [ MAPK = Mean Average Precision at K, R = Recall, PEH= % of exceptions handled]
  • 72. THREATS TO VALIDITY  Subjective bias in gold set development  Limited size of dynamic corpus for recommendation  Limited number of exceptions for experiments 74 SoftwareResearchLab,UofS
  • 73. TRADITIONAL WEB SEARCH  No ties between IDE and web browsers  Does not consider problem- context  Environment-switching is distracting & time-consuming  Often not much productive (trial & error approach) 75 SoftwareResearchLab,UofS
  • 74. TRADITIONAL SUPPORT FOR POST-SEARCH CONTENT ANALYSIS  Keyword highlighting in title based on search query  Very limited meta description using keywords or phrases.  Page URL, Page visit statistics  Little clues for actual content in the web page  Forces one to browse the page 76 SoftwareResearchLab,UofS
  • 75. TRADITIONAL CODE SEARCH ENGINES  No ties with the IDE  Returns hundreds of result pages  Keyword matching search  No support for search query formulation 77 SoftwareResearchLab,UofS
  • 76. PROPOSED CONTEXT-AWARE CODE EXAMPLE RECOMMENDER FOR EXCEPTION HANDLING 78 SoftwareResearchLab,UofS
  • 77. USER STUDY GROUPING 79 P1,P2,P3,P4,P5,P6 A (P1,P4,P5) B (P2,P3,P6) EC1, EC2, EC3, EC4 S1 (EC1, EC2) S2 (EC3, EC4) T/S1 + E/S2 T/S2 + E/S1 I (P1,P5) II (P4) I (P2) II (P3,P6) TE ET TE ET

Notas del editor

  1. Hello everyone, My name is Mohammad Masudur Rahman. Welcome to my presentation. In this talk, I would show how the context of the programming errors or exceptions can be exploited in different kinds of recommendation for problem solving within the IDE. Thus the title of my talk is – Exploiting Context in Dealing with Programming Errors and Exceptions
  2. Programming exception is a very frequent and a common experience for software programmers or developers. Once an exception is encountered, the developer identifies the target source line that triggers the exception, and attempts to guess what makes the exception to be thrown. In order to dig deeper, the developer often debugs the source code.
  3. However, the debugging may not reveal the real cause behind the exception or may fail to provide any useful explanation which can be used for the solution of the exception. Thus at some point, the developer needs to look at web for solution or relevant information. Study shows that developers spend about 19% of their programming time in web surfing.
  4. In order to solve an exception using web search, they generally follow several steps. The first step is web search using search engines in the web browser. Here, they face several practical challenges: The web browser works in a different context and it does not know the detailed context of the encountered exceptions. Thus it returns results which might be inapplicable for the current programming problem and its context. For example, let us consider NullPointerException, this exception can trigger under hundreds of circumstances, and it is nearly impossible to return useful search results without knowing the detailed context of the exception. This search forces the developer to leave IDE and search in the browser, which is often distracting and time-consuming.
  5. One might be also interested to collect search query from the IDE. A traditional way for query selection is to copy the exception message, the first line of stack traces, and use it as the search query. - Sometimes, this query may return relevant results; however, there is a great chance that query would not be enough for most of the exceptions. - One may also attempt to develop a custom search query which often needs a deeper understanding about the cause or details of the exception, and it is also time-consuming. Moreover, the developer needs to switch to web browser from the IDE in order to perform the web search.
  6. In this step, the developer manually chooses the result pages one by one from the ranked list, and check the content for relevance. However, it is often found that They browse through the whole page patiently and at last discover that the page is not much relevant. Browsing and analyzing a number of pages is a great burden for the developers, and also time-consuming.
  7. Once the exception is solved properly, the next step a developer would take is to add an effective handler for the exception. The idea is to make the application robust enough so that it does not collapse with the occurrence of the exception in the future, and at the same time records collects enough information about the exception for further maintenance. However, The support from IDE for exception handling is not enough, it just adds an generic handler. Traditional code search engines also do not support much in finding relevant examples for exception handling.
  8. Thus we observe the following issues with traditional approaches while dealing with programming errors and exceptions. The support for query formulation is not enough. Search engines suggest popular queries, but they may not be relevant for the current problem at hand. The search engine is unaware of the detailed context of the exception, and thus the search may not be much effective. Support for post-search content analysis is extremely limited. Support for exception handling is not enough both from IDE and the code search engines.
  9. Now, lets see how our proposed approaches in this thesis help the developers in dealing with the programming errors and exceptions.
  10. In this thesis, we propose and evaluate four recommendation approaches to overcome those four challenges/limitations followed by a task-oriented user study. In the first study, we introduce SurfClipse: A context-aware meta search engine for programming errors and exceptions. In the second study, we propose and evaluate QueryClipse: A context-aware query recommender for web search. In the third study, we introduce ContentSuggest that recommends only the relevant sections from a given web page for manual analysis. In the fourth study, we propose and evaluate SurfExample: An IDE-based context-aware code example recommender that recommends code examples for exception handling. While each of the approaches is extensively evaluated and validated, in order to investigate the applicability of our approaches in real life problem solving, we integrate all four approaches into one plug-in ExcClipse, and conduct a user study with six graduate research students. In this talk, we would focus mostly on the first study in details, and would provide overview on the rest studies.
  11. One of our important observations about traditional or ad-hoc approaches is that the technical details or the programming context of an encountered exception is not properly used each of which has great potential for problem solving. In this thesis, we exploit such information extensively, and attempt to help in different search related activities. This slide shows some examples. Once an unhandled exception encounters, IDE reports the stack trace. The first line of stack trace generally describes the technical error message. The programming code that triggers the exception is context, it is also called the context code. the technical details and the programming context of the errors and exceptions, and recommend different
  12. SurfClipse: An IDE-based context-aware meta search engine.
  13. The search engine focuses on two important aspects: (1) context-awareness and (2) meta search. We conduct a simple test with 75 exceptions in order to determine the feasibility of those two ideas. In the first case, we just perform the regular keyword matching search using the error messages of the exceptions with 3 popular search engines Google, Bing and Yahoo. In the second case, we carefully choose some context tokens in the search queries and repeat the search. From the table, we see that context is very important for each of the search engines to return expected results. More importantly, we note that the search engines return solutions for different sets of exceptions, that means if we use only one search engine solutions for all exceptions cannot be obtained always at once. This may be due to their search indices or ranking algorithms. So, depending on a single one, for example, Google may not be a good idea.
  14. So, the key IDEA is - Meta Search engine.
  15. This is our proposed context-aware meta search model for IDE-based recommendation. It has tow modules: Client module (Eclipse plugin) Server module (Web service) Once the developer selects an exception from Error log or console view, the client module captures the error message, stack trace and the context code likely responsible for exception and sends to the computation (server) module. Upon getting the search request, the computation module sends the error message to multiple search engines. We use Google, Bing, Yahoo and the StackOverflow API to collect results and use them to develop the corpus. Once the corpus is developed, we apply our proposed metrics and algorithms to produce a result set that is relevant to the encountered exception. Then the results are sent to the client in the IDE panel. The developer can click each result and can browse page within their working environment.
  16. So, basically, we are providing four interesting and essential things in this model. A complete IDE-based web search solution Meta search from within the IDE Context-aware search SAAS based search solution, that can be leveraged by any IDE of any platform.
  17. The proposed model has two working modes–Proactive and Interactive. We design two modes to provide different needs of the developers and to meet demands of different problem solving situations. For example, the proactive mode provides recommendation without any effort. Once an exception occurs, the IDE detects the exception, develops the search query, collect other context details, and initiates the search. Once the results are available, the developer is notified of the results. In case of interactive mode, the developer can choose an error or exception encountered within the IDE, and can start the search through context-menu command. The IDE is responsible to extract the exception details and collect the results from the server. The model also provides a keyword-based interface where developer can perform keyword-based search. During keyword-based search, IDE also recommends a set of suitable keywords representing the current problem context (e.g., exception details).
  18. These are the individual metrics we consider to estimate those four aspects of ranking The metrics are grouped into different aspects for ranking. All weights are normalized.
  19. We consider the heuristic weights for the metrics through controlled iterations of experiments. We started with some wise guesses, and then ran iterations to reach the best weights for each ranking aspect.
  20. We conducted experiments with 75 exceptions related to Eclipse plugin development and Java Application development We collected them from the workspace of the graduate students, and different online sources
  21. The slide shows how different aspects of the ranking control the results. We see that content-relevance alone is not enough. However, we estimate content-relevance in a more efficient way in our approach where we consider stack trace also, which the search engines cannot do. Considering context in association with context is always helpful. Moreover, we considers two more aspects, which provides more positive effects in the results.
  22. Here we show the result comparison against two existing approaches. The proactive mode of our model is aligned with these two methods by automatic search query generation without developer involvement. In this mode, client searches with its generated query from the context (e.g., stack trace and context-code), and collects the results. The first approach by Cordeiro et al which considers only stack traces, and depends on StackOverflow data dump, definitely cannot answer all questions. It provides a recall of 24%, whereas Our proposed approach performs significantly well. The second approach Seahawk, considers the context-code, not specialized for exception related search. Still it is relevant to our works. However, we found it suffers from the same lack of the work by Cordeiro et al
  23. The interactive mode of our model is aligned with the working principles of search engines– search query generation with developer involvement. In this mode, the client recommends suitable keywords from the context, and developer chooses from them for search. We use the same set of keywords from the recommended list for both our approach and the search engines. So, basically, the real comparison should be against the search engines which we did, and found these results. All 3 search engines performed almost the same except with Google’s precision. Our method provides a precision comparable to Google, but it outperforms all in terms of recall. It provides 90.66% recall, whereas the search Engines provide 77.33% at best. Recently, we tested with 150 exceptions, and found 92% recall, whereas the search engines performed nearly 80% So, it also validates our previous experiment results.
  24. In the first study, we did not focus much on search query generation which is also one of most important supports that the developers need for effective web search. In the second study, we conduct our study on search query recommendation.
  25. QueryClipse– The context-aware search query recommender.
  26. In this study, what we do is— We analyze the stack trace and context code of an encountered exception and recommends a ranked list of suitable search queries.
  27. Thus QueryClipse provides four features Context-aware query: automatically analyzes the technical details and context of the exception and generates queries. Ranked list: Provides a ranked list queries based on extensive analysis Custom query: Generates token graph from stack trace based on implied relationships to assist in custom search query development. Query length customization: Query length can be customized
  28. Now, in the first two studies, we recommended relevant search queries and relevant web pages. However, as we observed the post-search content analysis is completely manual and the checking of page relevance is a tough job. This is time-consuming especially when a number of web pages are browsed. In the third study, we propose ContentSuggest– a context-aware page content recommender that recommends only the relevant section from the page.
  29. The traditional support for post-search content analysis is quite limited. For example, the search engine only highlights the query tokens, and provides a very little meta description about the page, Which is not often enough. Thus the developer needs to browse every single page in the list in order to see if it is relevant. What we do in this study is— We analyze the technical details and context of the encountered exception, and we also analyze different sections of a chosen web page, Then we display only the most relevant section so that the developer can check the relevance of the page without consulting the whole page. For example, this marked section is the most relevant for an exception of interest, and ContentSuggest displays that section for relevance checking of the page.
  30. Thus ContentSuggest provides three distinguishing features Relevant section suggestion – exploits available information about the exception in the IDE, and returns the relevant section only Less content, less overhead– The developer needs to consult less information for the same task, which is a great help. Noise-free version of the page– It also returns a noise-free version of the page that discards advertisements, unexpected widgets and so on.
  31. While the previous three studies are involved with the solution of an encountered exception in the IDE, exceptions should be also properly handled In order to make the application system robust and secure. However, existing support from IDE or the code search engines are not enough In this study, we propose and evaluate SurfExample: An IDE-based context-aware code example recommender that recommends code examples for exception handling.
  32. SurfExample– our code example recommender for exception handling.
  33. SurfExample takes the code under development in the IDE, analyzes it and collects relevant and useful code examples from GitHub code repositories. For example, the recommended code example is relevant, and at the same time, it also contains a list of carefully developed handlers. A developer can learn effective handling from different such examples, and improve his/her coding.
  34. Thus SurfExample has three distinguishing features from both technical and user’s perspectives. Graph-based structural relevance– While previous approaches are mostly based on heuristics, we propose a graph-based structural similarity matching technique. We introduce the handler quality paradigm, which was previously done through manual analysis that can be biased. We integrate with GitHub repositories using API endpoints, which provides access of a large number of quality examples within the IDE to the developers.
  35. While each of the studies is extensively evaluated and validated against existing studies from the literature, In order to further validate our approaches, we integrate all four approaches into one plug-in ExcClipse, and conduct a user study with six graduate research students.
  36. -- We involve six participants from SRLab -- Chose four tasks for each of four programming exceptions -- Used questionnaire and observation checklist for data collection -- Both participants and problem sets were grouped into different categories -- Each study was conducted in three sessions – training, execution and evaluation.
  37. We identify these nine features both functional and non-functional for comparing our approach with traditional alternatives.
  38. Each of the participants perform four tasks for each of the problem task And rated different features. We note that our approach is rated higher for each of the features.
  39. Each participant rated independently, and we have shown the average measures. We also conducted Mann-Whitney U test, and found that rating for our approach is significantly higher than that of traditional alternatives.
  40. This is the overall ratings by each of the participants which also show that Our approach is highly applicable in real life problem solving. We also checked significance test, found that the difference is significant.
  41. We experienced a few threats to validity with different approaches. For example, The search engines are constantly evolving, thus the statistics shown may change later. Sometimes QueryClipse can recommend long query if the error message or the tokens are too lengthy Code example gold set for SurfExample may have some subjective bias. The user study conducted a limited number of participants.
  42. Conclusion.
  43. Thus to conclude my talk, In the first study, we propose SurfClipse which found promising in terms of recommendation accuracy. In the second study, we propose QueryClipse that recommends more effective search queries compared to traditional queries or queries from existing approaches.
  44. ContentSuggest, the page content recommender has a great potential for problem solving. SurfExample, is a novel approach for the recommendation of exception handling code examples.
  45. In future, we plan for more granular and focused recommendation. Such as which particular paragraph in the web page contains solution for the exception More customized and semantic search query. Whether an exception should be handled or thrown.
  46. We experienced these 3 threats to validity. -search not real time yet -search engines are constantly evolving, so has reproducibility issues -experimented with widely available exceptions and bound by the limitations of provided results from search engines
  47. Each metric is normalized Only class name and method name chosen as keywords