SlideShare a Scribd company logo
1 of 22
The Forgotten Role of
Search Queries in IR-based
Bug Localization:
An Empirical Study
Masud Rahman*, Foutse Khomh$,
Shamima Yeasmin+, Chanchal Roy+
Dalhousie University*, Polytechnique Montréal$,
University of Saskatchewan+, Canada
Software Bugs
• 606 software bugs recorded in 2017
o $1.7 trillion costs to the global economy
o 3.7 billion users affected
o 314 companies impacted
• Developers spend ~50% of the time in
finding and fixing these bugs.
2
Bug Report & Bug Localization
Bug Localization
3
IR-Based Bug Localization
JDIValue, toString, execute,
EvaluationThread, run, NullPointerException
able cast null
Keyword
selection
127 Words
53
1
4
Query Reformulation in IR-
based Bug Localization
5
JDIValue, toString, execute,
EvaluationThread, run, NullPointerException
able cast null
88%
Research Questions
RQ1: How do the state-of-the-art approaches
perform in identifying appropriate search keywords
from bug reports for IR-based bug localization?
RQ2: Can optimal, near-optimal search queries be
constructed from the bug reports that lack bug
localization hints or simply contain natural language
only texts?
RQ3: How optimal, near-optimal, and non-optimal
search queries differ from each other in their
characteristics and performances?
6
Workflow of our Study
Bug-fixing
commits
Linking &
filtration
Refined
dataset
Bug reports
Finding
summary
7
RQ1: Frequency vs.
Graph-based keyword
selection
RQ2: Optimal vs. Baseline
search queries
RQ3: Optimal vs. Non-
optimal queries
Dataset, Metrics, & Setup
• Six subject systems: 2,320 bug reports
• Four performance metrics: Hit@K, MRR,
MAP, and Query Effectiveness (QE)
• QE: Rank of the first true positive.
• Baseline queries: title, description, title +
description
8
9
RQ1: Frequency vs. Graph-based
Keyword Selection for Search
PageRank Algorithm
RQ1: Frequency vs. Graph-based
Keywords for Bug Localization
10
Method Hit@1 Hit@10 MRR MAP
Baseline 31.98% 66.50% 0.43 42.69%
TF 24.39% 55.58% 0.34 33.94%
TF-IDF 27.02% 59.80% 0.37 36.76%
Kevic & Fritz 23.36% 52.92% 0.32 31.98%
Graph-based keyword selection
STRICT 25.82% 63.02% 0.37 37.31%
Query Min Median Average Max
Baseline 03 32 49 406
TF-IDF 03 10 10 10
STRICT 03 10 10 10
RQ1: Keyword Selection from
4 Subsets of Bug Reports
11
Method Hit@1 Hit@10 MRR MAP
Bug reports with good baseline and no localization hints (567)
Baseline 41.96% 100.00% 0.60 58.15%
STRICT 36.14% 84.83% 0.51 50.29%
Bug reports with good baseline and localization hints (954)
Baseline 50.01% 100.00% 0.66 66.63%
TF-IDF 41.59% 83.55% 0.54 55.15%
Bug reports with poor baseline and no localization hints (372)
Baseline 0% 0% 0 0%
STRICT 1.56% 16.89% 0.05 5.12%
Bug reports with poor baseline and localization hints (427)
Baseline 0% 0% 0 0%
STRICT 4.91% 25.77% 0.11 10.66%
34%
RQ2: Optimal Query
Generation from a Bug Report
12
P = {q1, q2, q3,… qn}
Selection
Crossover
Mutation
Fitness
calculation
Qop = {k1, k2……km}
QE, MAP
Primitive dialogs
RQ2: Optimal vs. Baseline
Queries in Bug Localization
13
Bug reports with poor baseline and no localization hints (372)
Baseline 0% 0% 0 0%
Optimal 50.04% 77.96% 0.58 56.47%
Bug reports with poor baseline and localization hints (427)
Baseline 0% 0% 0 0%
Optimal 80.70% 93.37% 0.85 86.19%
Method Hit@1 Hit@10 MRR MAP
All bug reports (2,320)
Baseline 31.98% 66.50% 0.43 42.69%
Optimal 87.41% 95.74% 0.90 90.00%
RQ3: Non-Optimal vs. Optimal
Search Queries
14
• Query dataset: 13,914 search queries.
• 4,893 optimal search queries
• 5,164 non-optimal queries
• QE: Rank of the first true positive.
• Optimal: QE = 1, Non-optimal: QE > 10
• 31 query characteristics from literature
• Query classification using Random
Forest algorithm.
15
RQ3: Query Classification &
Feature Importance
Query Precision Recall
Optimal 84.60% 79.80%
Non-optimal 81.90% 86.20%
Frequency, Entropy,
Location, POS
RQ3: Optimal vs. Non-Optimal
– Regression Analysis
16
Significant
Actionable Insights
• Frequency: Optimal keywords are less
frequent than non-optimal ones in a bug
report.
• Entropy: Optimal keywords are less
ambiguous than non-optimal ones.
• Location: Optimal keywords are more likely
to be found in the body section of a bug
report.
• POS: Optimal keywords are more likely to be
nouns than the non-optimal ones.
17
RQ3: Query Improvements
using Actionable Insights
18
Bug reports with poor baseline and no localization hints (372)
Method Hit@1 Hit@10 MRR MAP
Baseline 0% 0% 0 0%
Baseline + Insights 1.28% 16.09% 0.04 4.50%
STRICT 1.56% 16.89% 0.05 5.12%
Insights + STRICT 2.66% 15.18% 0.05 5.09%
Bug reports with poor baseline and localization hints (427)
Baseline 0% 0% 0 0%
Baseline + Insights 6.79% 34.29% 0.14 13.79%
STRICT 4.91% 25.77% 0.11 10.66%
STRICT + Insights 6.80% 32.83% 0.13 13.39%
Take-Away Messages
• 34% of bug reports lead to very poor search
queries (RQ1)
• Even state-of-the-art approaches are not
sufficient to detect appropriate keywords
from them (RQ1)
• Genetic algorithm (GA) shows that optimal
keywords exist in those bug reports (RQ2)
• Optimal search queries can achieve up to
50%--80% Hit@1 and 56%--86% MAP.
19
• Optimal keywords are different than non-
optimal keywords (RQ3)
• Four aspects: frequency, term entropy,
term location, and part of speech.
• Insights lead to 27%--34% higher Hit@10.
• ML: How to automatically predict the
appropriate keywords from a bug report?
• GA: How to automatically determine the
fitness of a candidate search query?
20
Take-Away Messages
Thank you! Questions?
21
Masud Rahman, PhD
masud.rahman@dal.ca
@masud2336
RQ2: Query Improvement &
Worsening Ratios
22

More Related Content

Similar to Optimal Search Queries Improve Bug Localization by Up to 80

SurfExample- Recommendation of Exception Handling Code Examples
SurfExample- Recommendation of Exception Handling Code ExamplesSurfExample- Recommendation of Exception Handling Code Examples
SurfExample- Recommendation of Exception Handling Code ExamplesMasud Rahman
 
Machine Learning for Malware Detection: Beyond Accuracy Rates
Machine Learning for Malware Detection: Beyond Accuracy RatesMachine Learning for Malware Detection: Beyond Accuracy Rates
Machine Learning for Malware Detection: Beyond Accuracy RatesMarcus Botacin
 
Multisensor data fusion in Food Quality Assessment
Multisensor data fusion in Food Quality AssessmentMultisensor data fusion in Food Quality Assessment
Multisensor data fusion in Food Quality AssessmentAlka Mishra
 
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...geraintduck
 
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...Sagar Deogirkar
 
Results from the Enterprise Search and Findability Survey 2012
Results from the Enterprise Search and Findability Survey 2012Results from the Enterprise Search and Findability Survey 2012
Results from the Enterprise Search and Findability Survey 2012Findwise
 
Intelligent and Automatic In vivo Detection and Quantification of Transplante...
Intelligent and Automatic In vivo Detection and Quantification of Transplante...Intelligent and Automatic In vivo Detection and Quantification of Transplante...
Intelligent and Automatic In vivo Detection and Quantification of Transplante...Michigan State University Research
 
Genomics Crash Course for Data Engineers
Genomics Crash Course for Data EngineersGenomics Crash Course for Data Engineers
Genomics Crash Course for Data EngineersAllen Day, PhD
 
Relevance Improvements at Cengage - Ivan Provalov
Relevance Improvements at Cengage - Ivan ProvalovRelevance Improvements at Cengage - Ivan Provalov
Relevance Improvements at Cengage - Ivan Provalovlucenerevolution
 
Semantic Analysis to Compute Personality Traits from Social Media Posts
Semantic Analysis to Compute Personality Traits from Social Media PostsSemantic Analysis to Compute Personality Traits from Social Media Posts
Semantic Analysis to Compute Personality Traits from Social Media PostsGiulio Carducci
 
Improving IR-Based Bug Localization with Context-Aware-Query Reformulation
Improving IR-Based Bug Localization with Context-Aware-Query ReformulationImproving IR-Based Bug Localization with Context-Aware-Query Reformulation
Improving IR-Based Bug Localization with Context-Aware-Query ReformulationMasud Rahman
 
Hendrix 2015 composite endpoints redacted
Hendrix 2015 composite endpoints redacted Hendrix 2015 composite endpoints redacted
Hendrix 2015 composite endpoints redacted Alzforum
 
PhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanPhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanMasud Rahman
 
Evaluating the Usefulness of IR-Based Fault LocalizationTechniques
Evaluating the Usefulness of IR-Based Fault LocalizationTechniquesEvaluating the Usefulness of IR-Based Fault LocalizationTechniques
Evaluating the Usefulness of IR-Based Fault LocalizationTechniquesAlex Orso
 

Similar to Optimal Search Queries Improve Bug Localization by Up to 80 (17)

SurfExample- Recommendation of Exception Handling Code Examples
SurfExample- Recommendation of Exception Handling Code ExamplesSurfExample- Recommendation of Exception Handling Code Examples
SurfExample- Recommendation of Exception Handling Code Examples
 
Vanderbilt b
Vanderbilt bVanderbilt b
Vanderbilt b
 
Machine Learning for Malware Detection: Beyond Accuracy Rates
Machine Learning for Malware Detection: Beyond Accuracy RatesMachine Learning for Malware Detection: Beyond Accuracy Rates
Machine Learning for Malware Detection: Beyond Accuracy Rates
 
Multisensor data fusion in Food Quality Assessment
Multisensor data fusion in Food Quality AssessmentMultisensor data fusion in Food Quality Assessment
Multisensor data fusion in Food Quality Assessment
 
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...
SMBM 2012: Ambiguity and Variability of Database and Software Names in Bioinf...
 
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
Comparative Study of Machine Learning Algorithms for Sentiment Analysis with ...
 
Results from the Enterprise Search and Findability Survey 2012
Results from the Enterprise Search and Findability Survey 2012Results from the Enterprise Search and Findability Survey 2012
Results from the Enterprise Search and Findability Survey 2012
 
Intelligent and Automatic In vivo Detection and Quantification of Transplante...
Intelligent and Automatic In vivo Detection and Quantification of Transplante...Intelligent and Automatic In vivo Detection and Quantification of Transplante...
Intelligent and Automatic In vivo Detection and Quantification of Transplante...
 
Genomics Crash Course for Data Engineers
Genomics Crash Course for Data EngineersGenomics Crash Course for Data Engineers
Genomics Crash Course for Data Engineers
 
Relevance Improvements at Cengage - Ivan Provalov
Relevance Improvements at Cengage - Ivan ProvalovRelevance Improvements at Cengage - Ivan Provalov
Relevance Improvements at Cengage - Ivan Provalov
 
Trivandrum
TrivandrumTrivandrum
Trivandrum
 
BH-US-06-Bilar.pdf
BH-US-06-Bilar.pdfBH-US-06-Bilar.pdf
BH-US-06-Bilar.pdf
 
Semantic Analysis to Compute Personality Traits from Social Media Posts
Semantic Analysis to Compute Personality Traits from Social Media PostsSemantic Analysis to Compute Personality Traits from Social Media Posts
Semantic Analysis to Compute Personality Traits from Social Media Posts
 
Improving IR-Based Bug Localization with Context-Aware-Query Reformulation
Improving IR-Based Bug Localization with Context-Aware-Query ReformulationImproving IR-Based Bug Localization with Context-Aware-Query Reformulation
Improving IR-Based Bug Localization with Context-Aware-Query Reformulation
 
Hendrix 2015 composite endpoints redacted
Hendrix 2015 composite endpoints redacted Hendrix 2015 composite endpoints redacted
Hendrix 2015 composite endpoints redacted
 
PhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanPhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud Rahman
 
Evaluating the Usefulness of IR-Based Fault LocalizationTechniques
Evaluating the Usefulness of IR-Based Fault LocalizationTechniquesEvaluating the Usefulness of IR-Based Fault LocalizationTechniques
Evaluating the Usefulness of IR-Based Fault LocalizationTechniques
 

More from Masud Rahman

HereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityHereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityMasud 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 SaskatchewanMasud Rahman
 
PhD proposal of Masud Rahman
PhD proposal of Masud RahmanPhD proposal of Masud Rahman
PhD proposal of Masud RahmanMasud Rahman
 
Doctoral Symposium of Masud Rahman
Doctoral Symposium of Masud RahmanDoctoral Symposium of Masud Rahman
Doctoral Symposium of Masud RahmanMasud 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-LocalizationMasud Rahman
 
CodeInsight-SCAM2015
CodeInsight-SCAM2015CodeInsight-SCAM2015
CodeInsight-SCAM2015Masud Rahman
 
RACK-Tool-ICSE2017
RACK-Tool-ICSE2017RACK-Tool-ICSE2017
RACK-Tool-ICSE2017Masud Rahman
 
QUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeQUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeMasud Rahman
 
CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016Masud Rahman
 
ACER-ASE2017-slides
ACER-ASE2017-slidesACER-ASE2017-slides
ACER-ASE2017-slidesMasud Rahman
 
CMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureCMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureMasud Rahman
 

More from Masud Rahman (20)

HereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityHereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie University
 
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
 
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-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016
 
ACER-ASE2017-slides
ACER-ASE2017-slidesACER-ASE2017-slides
ACER-ASE2017-slides
 
CMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureCMPT470-usask-guest-lecture
CMPT470-usask-guest-lecture
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

Optimal Search Queries Improve Bug Localization by Up to 80

  • 1. The Forgotten Role of Search Queries in IR-based Bug Localization: An Empirical Study Masud Rahman*, Foutse Khomh$, Shamima Yeasmin+, Chanchal Roy+ Dalhousie University*, Polytechnique Montréal$, University of Saskatchewan+, Canada
  • 2. Software Bugs • 606 software bugs recorded in 2017 o $1.7 trillion costs to the global economy o 3.7 billion users affected o 314 companies impacted • Developers spend ~50% of the time in finding and fixing these bugs. 2
  • 3. Bug Report & Bug Localization Bug Localization 3
  • 4. IR-Based Bug Localization JDIValue, toString, execute, EvaluationThread, run, NullPointerException able cast null Keyword selection 127 Words 53 1 4
  • 5. Query Reformulation in IR- based Bug Localization 5 JDIValue, toString, execute, EvaluationThread, run, NullPointerException able cast null 88%
  • 6. Research Questions RQ1: How do the state-of-the-art approaches perform in identifying appropriate search keywords from bug reports for IR-based bug localization? RQ2: Can optimal, near-optimal search queries be constructed from the bug reports that lack bug localization hints or simply contain natural language only texts? RQ3: How optimal, near-optimal, and non-optimal search queries differ from each other in their characteristics and performances? 6
  • 7. Workflow of our Study Bug-fixing commits Linking & filtration Refined dataset Bug reports Finding summary 7 RQ1: Frequency vs. Graph-based keyword selection RQ2: Optimal vs. Baseline search queries RQ3: Optimal vs. Non- optimal queries
  • 8. Dataset, Metrics, & Setup • Six subject systems: 2,320 bug reports • Four performance metrics: Hit@K, MRR, MAP, and Query Effectiveness (QE) • QE: Rank of the first true positive. • Baseline queries: title, description, title + description 8
  • 9. 9 RQ1: Frequency vs. Graph-based Keyword Selection for Search PageRank Algorithm
  • 10. RQ1: Frequency vs. Graph-based Keywords for Bug Localization 10 Method Hit@1 Hit@10 MRR MAP Baseline 31.98% 66.50% 0.43 42.69% TF 24.39% 55.58% 0.34 33.94% TF-IDF 27.02% 59.80% 0.37 36.76% Kevic & Fritz 23.36% 52.92% 0.32 31.98% Graph-based keyword selection STRICT 25.82% 63.02% 0.37 37.31% Query Min Median Average Max Baseline 03 32 49 406 TF-IDF 03 10 10 10 STRICT 03 10 10 10
  • 11. RQ1: Keyword Selection from 4 Subsets of Bug Reports 11 Method Hit@1 Hit@10 MRR MAP Bug reports with good baseline and no localization hints (567) Baseline 41.96% 100.00% 0.60 58.15% STRICT 36.14% 84.83% 0.51 50.29% Bug reports with good baseline and localization hints (954) Baseline 50.01% 100.00% 0.66 66.63% TF-IDF 41.59% 83.55% 0.54 55.15% Bug reports with poor baseline and no localization hints (372) Baseline 0% 0% 0 0% STRICT 1.56% 16.89% 0.05 5.12% Bug reports with poor baseline and localization hints (427) Baseline 0% 0% 0 0% STRICT 4.91% 25.77% 0.11 10.66% 34%
  • 12. RQ2: Optimal Query Generation from a Bug Report 12 P = {q1, q2, q3,… qn} Selection Crossover Mutation Fitness calculation Qop = {k1, k2……km} QE, MAP Primitive dialogs
  • 13. RQ2: Optimal vs. Baseline Queries in Bug Localization 13 Bug reports with poor baseline and no localization hints (372) Baseline 0% 0% 0 0% Optimal 50.04% 77.96% 0.58 56.47% Bug reports with poor baseline and localization hints (427) Baseline 0% 0% 0 0% Optimal 80.70% 93.37% 0.85 86.19% Method Hit@1 Hit@10 MRR MAP All bug reports (2,320) Baseline 31.98% 66.50% 0.43 42.69% Optimal 87.41% 95.74% 0.90 90.00%
  • 14. RQ3: Non-Optimal vs. Optimal Search Queries 14 • Query dataset: 13,914 search queries. • 4,893 optimal search queries • 5,164 non-optimal queries • QE: Rank of the first true positive. • Optimal: QE = 1, Non-optimal: QE > 10 • 31 query characteristics from literature • Query classification using Random Forest algorithm.
  • 15. 15 RQ3: Query Classification & Feature Importance Query Precision Recall Optimal 84.60% 79.80% Non-optimal 81.90% 86.20% Frequency, Entropy, Location, POS
  • 16. RQ3: Optimal vs. Non-Optimal – Regression Analysis 16 Significant
  • 17. Actionable Insights • Frequency: Optimal keywords are less frequent than non-optimal ones in a bug report. • Entropy: Optimal keywords are less ambiguous than non-optimal ones. • Location: Optimal keywords are more likely to be found in the body section of a bug report. • POS: Optimal keywords are more likely to be nouns than the non-optimal ones. 17
  • 18. RQ3: Query Improvements using Actionable Insights 18 Bug reports with poor baseline and no localization hints (372) Method Hit@1 Hit@10 MRR MAP Baseline 0% 0% 0 0% Baseline + Insights 1.28% 16.09% 0.04 4.50% STRICT 1.56% 16.89% 0.05 5.12% Insights + STRICT 2.66% 15.18% 0.05 5.09% Bug reports with poor baseline and localization hints (427) Baseline 0% 0% 0 0% Baseline + Insights 6.79% 34.29% 0.14 13.79% STRICT 4.91% 25.77% 0.11 10.66% STRICT + Insights 6.80% 32.83% 0.13 13.39%
  • 19. Take-Away Messages • 34% of bug reports lead to very poor search queries (RQ1) • Even state-of-the-art approaches are not sufficient to detect appropriate keywords from them (RQ1) • Genetic algorithm (GA) shows that optimal keywords exist in those bug reports (RQ2) • Optimal search queries can achieve up to 50%--80% Hit@1 and 56%--86% MAP. 19
  • 20. • Optimal keywords are different than non- optimal keywords (RQ3) • Four aspects: frequency, term entropy, term location, and part of speech. • Insights lead to 27%--34% higher Hit@10. • ML: How to automatically predict the appropriate keywords from a bug report? • GA: How to automatically determine the fitness of a candidate search query? 20 Take-Away Messages
  • 21. Thank you! Questions? 21 Masud Rahman, PhD masud.rahman@dal.ca @masud2336
  • 22. RQ2: Query Improvement & Worsening Ratios 22