SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Graph-Based Pattern-Oriented, ContextSensitive Source Code Completion
Nguyen, T.T. ; Nguyen,
H.A. ; Tamrawi, A. ;
Nguyen, H.V. ; Al-Kofahi,
J. ; Nguyen, T.N.
Presented By: Mohammad Masudur Rahman
Contents
 Code

Completion
 Thesis Statement
 Motivating Example
 Terminologies
 Methodology
 Empirical Evaluation & Results
 My Observation & Future Thoughts
2
Code Completion








3

Built-in feature of modern all IDEs
Speed up development
Longer Identifier names for program comprehension
Less overhead for developers
Mostly single variable, method supports- API
packages
Template based support – control structure, event
handling and others
Thesis Statement
 Novel

approach with graph-based code
completion
 Graph based feature extracting, searching,
ranking of API usage pattern, matching with
editing context of current code.
 Empirical evaluation shows correctness and
usefulness- 95% precision, 92% recall, 93%
f-score over 24 real world systems
4
Motivating Example (Single-line)

5

Fig 1: Current State of Code Completion (Eclipse 3.6)
Motivating Example (Multi-line)

6

Fig 2: SWT Usage Example
Motivating Example (Query)

Fig 3: SWT Query Example
7
Terminologies
 GRAPACC
 API

Usage Pattern
 Groum Based Model
 Context-sensitive Weight

8
GRAPACC
 Graph-Based
 Pattern-Oriented
 Context-Sensitive
 Code

9

Completion
API Usage Pattern

10

Fig 4: SWT API Usage
Groum Based Model

11

Fig 5: Groum Conversion
Context-Sensitive Weight
1
w f (q) =
(d + 1)
Wf (q)=Context-sensitive weight of feature q
q= feature of Query, Q
d=distance to the closest token in Groum Model

12
Methodology
 Query

Processing and Feature Extraction
 Pattern Managing, Searching and Ranking
 Pattern Oriented Code Completion

13
Query Processing and Feature
Extraction
 Tokenizing
 Partial

Parsing
 Groum Building
 Feature Extracting and Weighting

14
Tokenizing, Partial Parsing
 Lexical

analysis
 Preserves keywords related to control
structure, rest are removed elsewhere but
saved
 Eclipse java parser
 PPA tool returns AST (Abstract Syntax
Tree)
 Unresolved nodes assigned ‘Unknown Type’
15
Groum Building
 Groum

from AST
 Unresolved nodes are
discarded but considered
as tokens
 Query converted to the
following Groum

16

Fig 6: Groum of Query
Feature Extraction & Weighting
 Groum

nodes mapped to tokens in
tokenization step
 Feature extracted from Groum for path, L<=3
 3 factors contribute to feature weight
 Structured based factor (size)
 Structured based factor (centrality)
 User based factor
17
Feature Extraction & Weighting
 ws(q)=

size based weight for feature, q of
Query, Q (w(q)=1+size(q); 1<= size(q)<=3)
 wc(q)= Centrality based weight for feature, q
of Query, Q (wc(q)=n / s, n=no of
neighbors, s=size)
 (wf(q)=1/(d+1)), distance between focus
node and the closest token in feature path
Groum Model
18
Feature Extraction & Weighting







19

w(q)= total weight for feature, q of Query, Q
ws(q)= size based weight for feature, q of Query, Q
wc(q)= Centrality based weight for feature, q of
Query, Q
wf(q)= used based weight for feature, q of Query, Q
Pattern Managing, Searching and
Ranking
 Pr(P)

is popularity of pattern P = frequency of
Pattern P
 Weight of feature p in Pattern P using inverse
indexing
 Np,P=occurrence

20

of feature p in P, NP=total no of

features in P
 Np=No of patterns containing p, N=total no of pattern
in database
Pattern Managing, Searching and
Ranking








21

For each feature p, L(p), a list of patterns from which
p can be extracted
p for pattern feature, q for query feature
Now sim(p,q)>∂,then p is added to F, set of mapped
features for q
For each pєF, top n ranked patterns from L(p) is
added to C, candidate patterns for relevance
computation
Now for each P in C, compute fit(P,Q)
Feature Similarity

is a name-based similarity between two
features given that feature is a collection of
labels and has the form
Of X.Y.Z where
X=package name
Y=class name
Z=method name
22
Name-based Similarity (nsim)

=





23

wsim(X, X’) is word-based similarity
X, X’ are broken down and two sequence of words
L(x) and L(y)
Similarity computed as Lo/Lm
Lo is length of LCS, Lm is average length of two
sequences
Pattern Matching (Relevance)

24
Pattern Matching

SM(P,Q)=total weight of Matched feature pair
Fit (P, Q)=Relevance degree between P and Q
25

Pr(P)=Popularity of Pattern P
Pattern Oriented Code Completion

 Matched

pattern is selected and
corresponding node in Groum is matched
 The missing nodes are fulfilled with code
26
Empirical Evaluation
 Precision
 Recall
 F-score
 java.io,

java.util :API used as library
 28 real world open-source systems
 4 for training, 24 for testing

27
Empirical Evaluation

28
My Observation
 Planning

to use semantic web technology
 Data and control dependency relationship
can be improved using semantic relationship
like conceptual similarity
 Matching of pattern is complex and errorprone, semantic score can be beneficial

29
Thanks
 Questions??

30

Weitere ähnliche Inhalte

Was ist angesagt?

Getting the Most out of Transition-based Dependency Parsing
Getting the Most out of Transition-based Dependency ParsingGetting the Most out of Transition-based Dependency Parsing
Getting the Most out of Transition-based Dependency ParsingJinho Choi
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblasgraphulo
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblasMIT
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysisDr. Rajdeep Chatterjee
 
Paper Study - Demand-Driven Computation of Interprocedural Data Flow
Paper Study - Demand-Driven Computation of Interprocedural Data FlowPaper Study - Demand-Driven Computation of Interprocedural Data Flow
Paper Study - Demand-Driven Computation of Interprocedural Data FlowMin-Yih Hsu
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsArvind Krishnaa
 
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...Laurens De Vocht
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm AnalyzingHaluan Irsad
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms ISri Prasanna
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisAnindita Kundu
 
40+ examples of user defined methods in java with explanation
40+ examples of user defined methods in java with explanation40+ examples of user defined methods in java with explanation
40+ examples of user defined methods in java with explanationHarish Gyanani
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihmSajid Marwat
 
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMYComputer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMYklirantga
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationAmrinder Arora
 
Introduction to datastructure and algorithm
Introduction to datastructure and algorithmIntroduction to datastructure and algorithm
Introduction to datastructure and algorithmPratik Mota
 

Was ist angesagt? (20)

Getting the Most out of Transition-based Dependency Parsing
Getting the Most out of Transition-based Dependency ParsingGetting the Most out of Transition-based Dependency Parsing
Getting the Most out of Transition-based Dependency Parsing
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblas
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblas
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
Paper Study - Demand-Driven Computation of Interprocedural Data Flow
Paper Study - Demand-Driven Computation of Interprocedural Data FlowPaper Study - Demand-Driven Computation of Interprocedural Data Flow
Paper Study - Demand-Driven Computation of Interprocedural Data Flow
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...
Using Triple Pattern Fragments To Enable Streaming of Top-k Shortest Paths vi...
 
Algorithmic Notations
Algorithmic NotationsAlgorithmic Notations
Algorithmic Notations
 
Algorithm Analyzing
Algorithm AnalyzingAlgorithm Analyzing
Algorithm Analyzing
 
Algorithms Question bank
Algorithms Question bankAlgorithms Question bank
Algorithms Question bank
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 
Flex ch
Flex chFlex ch
Flex ch
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
 
40+ examples of user defined methods in java with explanation
40+ examples of user defined methods in java with explanation40+ examples of user defined methods in java with explanation
40+ examples of user defined methods in java with explanation
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
R020998
R020998R020998
R020998
 
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMYComputer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic Notation
 
Introduction to datastructure and algorithm
Introduction to datastructure and algorithmIntroduction to datastructure and algorithm
Introduction to datastructure and algorithm
 

Andere mochten auch

Learn, Use, Share3
Learn, Use, Share3Learn, Use, Share3
Learn, Use, Share3jpatton
 
Learn, Use, Share3
Learn, Use, Share3Learn, Use, Share3
Learn, Use, Share3jpatton
 
Learn, Use, Share1
Learn, Use, Share1Learn, Use, Share1
Learn, Use, Share1jpatton
 
Instalación y configuración de Postfix en Ubuntu 15.04
Instalación y configuración de Postfix en Ubuntu 15.04Instalación y configuración de Postfix en Ubuntu 15.04
Instalación y configuración de Postfix en Ubuntu 15.04josejl68
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Andere mochten auch (7)

Learn, Use, Share3
Learn, Use, Share3Learn, Use, Share3
Learn, Use, Share3
 
Michael Karasick - Web 2.0 Innovation
Michael Karasick - Web 2.0 InnovationMichael Karasick - Web 2.0 Innovation
Michael Karasick - Web 2.0 Innovation
 
Learn, Use, Share3
Learn, Use, Share3Learn, Use, Share3
Learn, Use, Share3
 
Learn, Use, Share1
Learn, Use, Share1Learn, Use, Share1
Learn, Use, Share1
 
Instalación y configuración de Postfix en Ubuntu 15.04
Instalación y configuración de Postfix en Ubuntu 15.04Instalación y configuración de Postfix en Ubuntu 15.04
Instalación y configuración de Postfix en Ubuntu 15.04
 
Nitin Paranjape - Toastmasters Reverberations 2010
Nitin Paranjape - Toastmasters Reverberations 2010Nitin Paranjape - Toastmasters Reverberations 2010
Nitin Paranjape - Toastmasters Reverberations 2010
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Ähnlich wie Graph-Based Code Completion

TMPA-2015: Implementing the MetaVCG Approach in the C-light System
TMPA-2015: Implementing the MetaVCG Approach in the C-light SystemTMPA-2015: Implementing the MetaVCG Approach in the C-light System
TMPA-2015: Implementing the MetaVCG Approach in the C-light SystemIosif Itkin
 
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...IRJET Journal
 
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and AnalysisWiwat Ruengmee
 
The Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency StaticallyThe Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency StaticallyRay Buse
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...IJMIT JOURNAL
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...IJMIT JOURNAL
 
International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)IJMIT JOURNAL
 
Semantic Intensity Spectrum and Semantic Integration Algorithms
Semantic Intensity Spectrum and Semantic Integration AlgorithmsSemantic Intensity Spectrum and Semantic Integration Algorithms
Semantic Intensity Spectrum and Semantic Integration AlgorithmsYannis Kalfoglou
 
IR-ranking
IR-rankingIR-ranking
IR-rankingFELIX75
 
Subjective evaluation answer ppt
Subjective evaluation answer pptSubjective evaluation answer ppt
Subjective evaluation answer pptMrunal Pagnis
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
 
Implementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmImplementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmDipesh Shome
 
Discovering Novel Information with sentence Level clustering From Multi-docu...
Discovering Novel Information with sentence Level clustering  From Multi-docu...Discovering Novel Information with sentence Level clustering  From Multi-docu...
Discovering Novel Information with sentence Level clustering From Multi-docu...irjes
 
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)neeraj7svp
 
Continuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsContinuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsCHOOSE
 

Ähnlich wie Graph-Based Code Completion (20)

TMPA-2015: Implementing the MetaVCG Approach in the C-light System
TMPA-2015: Implementing the MetaVCG Approach in the C-light SystemTMPA-2015: Implementing the MetaVCG Approach in the C-light System
TMPA-2015: Implementing the MetaVCG Approach in the C-light System
 
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
An Optimized Parallel Algorithm for Longest Common Subsequence Using Openmp –...
 
lcr
lcrlcr
lcr
 
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and Analysis
 
The Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency StaticallyThe Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency Statically
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...
 
International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)
 
Dycops2019
Dycops2019 Dycops2019
Dycops2019
 
Semantic Intensity Spectrum and Semantic Integration Algorithms
Semantic Intensity Spectrum and Semantic Integration AlgorithmsSemantic Intensity Spectrum and Semantic Integration Algorithms
Semantic Intensity Spectrum and Semantic Integration Algorithms
 
IR-ranking
IR-rankingIR-ranking
IR-ranking
 
Lk module3
Lk module3Lk module3
Lk module3
 
Subjective evaluation answer ppt
Subjective evaluation answer pptSubjective evaluation answer ppt
Subjective evaluation answer ppt
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
Implementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor AlgorithmImplementation of K-Nearest Neighbor Algorithm
Implementation of K-Nearest Neighbor Algorithm
 
Discovering Novel Information with sentence Level clustering From Multi-docu...
Discovering Novel Information with sentence Level clustering  From Multi-docu...Discovering Novel Information with sentence Level clustering  From Multi-docu...
Discovering Novel Information with sentence Level clustering From Multi-docu...
 
Simulation Software Performances And Examples
Simulation Software Performances And ExamplesSimulation Software Performances And Examples
Simulation Software Performances And Examples
 
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)
PSF_Introduction_to_R_Package_for_Pattern_Sequence (1)
 
For project
For projectFor project
For project
 
Continuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based SystemsContinuous Architecting of Stream-Based Systems
Continuous Architecting of Stream-Based Systems
 

Mehr von Masud Rahman

HereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityHereWeCode 2022: Dalhousie University
HereWeCode 2022: Dalhousie UniversityMasud 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 SaskatchewanMasud Rahman
 
PhD proposal of Masud Rahman
PhD proposal of Masud RahmanPhD proposal of Masud Rahman
PhD proposal of Masud RahmanMasud Rahman
 
PhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam of Masud RahmanPhD Comprehensive exam of Masud Rahman
PhD Comprehensive exam 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
 

Mehr von 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-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016CORRECT-ToolDemo-ASE2016
CORRECT-ToolDemo-ASE2016
 

Kürzlich hochgeladen

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Kürzlich hochgeladen (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
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 ...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

Graph-Based Code Completion

  • 1. Graph-Based Pattern-Oriented, ContextSensitive Source Code Completion Nguyen, T.T. ; Nguyen, H.A. ; Tamrawi, A. ; Nguyen, H.V. ; Al-Kofahi, J. ; Nguyen, T.N. Presented By: Mohammad Masudur Rahman
  • 2. Contents  Code Completion  Thesis Statement  Motivating Example  Terminologies  Methodology  Empirical Evaluation & Results  My Observation & Future Thoughts 2
  • 3. Code Completion       3 Built-in feature of modern all IDEs Speed up development Longer Identifier names for program comprehension Less overhead for developers Mostly single variable, method supports- API packages Template based support – control structure, event handling and others
  • 4. Thesis Statement  Novel approach with graph-based code completion  Graph based feature extracting, searching, ranking of API usage pattern, matching with editing context of current code.  Empirical evaluation shows correctness and usefulness- 95% precision, 92% recall, 93% f-score over 24 real world systems 4
  • 5. Motivating Example (Single-line) 5 Fig 1: Current State of Code Completion (Eclipse 3.6)
  • 7. Motivating Example (Query) Fig 3: SWT Query Example 7
  • 8. Terminologies  GRAPACC  API Usage Pattern  Groum Based Model  Context-sensitive Weight 8
  • 9. GRAPACC  Graph-Based  Pattern-Oriented  Context-Sensitive  Code 9 Completion
  • 10. API Usage Pattern 10 Fig 4: SWT API Usage
  • 11. Groum Based Model 11 Fig 5: Groum Conversion
  • 12. Context-Sensitive Weight 1 w f (q) = (d + 1) Wf (q)=Context-sensitive weight of feature q q= feature of Query, Q d=distance to the closest token in Groum Model 12
  • 13. Methodology  Query Processing and Feature Extraction  Pattern Managing, Searching and Ranking  Pattern Oriented Code Completion 13
  • 14. Query Processing and Feature Extraction  Tokenizing  Partial Parsing  Groum Building  Feature Extracting and Weighting 14
  • 15. Tokenizing, Partial Parsing  Lexical analysis  Preserves keywords related to control structure, rest are removed elsewhere but saved  Eclipse java parser  PPA tool returns AST (Abstract Syntax Tree)  Unresolved nodes assigned ‘Unknown Type’ 15
  • 16. Groum Building  Groum from AST  Unresolved nodes are discarded but considered as tokens  Query converted to the following Groum 16 Fig 6: Groum of Query
  • 17. Feature Extraction & Weighting  Groum nodes mapped to tokens in tokenization step  Feature extracted from Groum for path, L<=3  3 factors contribute to feature weight  Structured based factor (size)  Structured based factor (centrality)  User based factor 17
  • 18. Feature Extraction & Weighting  ws(q)= size based weight for feature, q of Query, Q (w(q)=1+size(q); 1<= size(q)<=3)  wc(q)= Centrality based weight for feature, q of Query, Q (wc(q)=n / s, n=no of neighbors, s=size)  (wf(q)=1/(d+1)), distance between focus node and the closest token in feature path Groum Model 18
  • 19. Feature Extraction & Weighting     19 w(q)= total weight for feature, q of Query, Q ws(q)= size based weight for feature, q of Query, Q wc(q)= Centrality based weight for feature, q of Query, Q wf(q)= used based weight for feature, q of Query, Q
  • 20. Pattern Managing, Searching and Ranking  Pr(P) is popularity of pattern P = frequency of Pattern P  Weight of feature p in Pattern P using inverse indexing  Np,P=occurrence 20 of feature p in P, NP=total no of features in P  Np=No of patterns containing p, N=total no of pattern in database
  • 21. Pattern Managing, Searching and Ranking      21 For each feature p, L(p), a list of patterns from which p can be extracted p for pattern feature, q for query feature Now sim(p,q)>∂,then p is added to F, set of mapped features for q For each pєF, top n ranked patterns from L(p) is added to C, candidate patterns for relevance computation Now for each P in C, compute fit(P,Q)
  • 22. Feature Similarity is a name-based similarity between two features given that feature is a collection of labels and has the form Of X.Y.Z where X=package name Y=class name Z=method name 22
  • 23. Name-based Similarity (nsim) =     23 wsim(X, X’) is word-based similarity X, X’ are broken down and two sequence of words L(x) and L(y) Similarity computed as Lo/Lm Lo is length of LCS, Lm is average length of two sequences
  • 25. Pattern Matching SM(P,Q)=total weight of Matched feature pair Fit (P, Q)=Relevance degree between P and Q 25 Pr(P)=Popularity of Pattern P
  • 26. Pattern Oriented Code Completion  Matched pattern is selected and corresponding node in Groum is matched  The missing nodes are fulfilled with code 26
  • 27. Empirical Evaluation  Precision  Recall  F-score  java.io, java.util :API used as library  28 real world open-source systems  4 for training, 24 for testing 27
  • 29. My Observation  Planning to use semantic web technology  Data and control dependency relationship can be improved using semantic relationship like conceptual similarity  Matching of pattern is complex and errorprone, semantic score can be beneficial 29