SlideShare una empresa de Scribd logo
1 de 34
DOMPLETION 
DOM-Aware JavaScript Code Completion 
An approach to assist the Web Developers in 
writing DOM manipulating JavaScript code 
Kartik Bajaj, Karthik Pattabiraman, Ali Mesbah 
University of British Columbia 
{kbajaj, karthikp, amesbah}@ece.ubc.ca 1
Running Example (JavaScript) 
1. function add(a,b) { 
2. return a + b; 
3. } 
4. 
5. var input1 = 10; 
6. var input2 = 20; 
7. if(input1 != 0) { 
8. var sum = add(input1,input2); 
9. alert(sum); 
10. } else { 
11. var sum = input2; 
12. alert(sum); 
13. } 
2
Document Object Model (DOM) 
document.getElementsByTagName(“input”); 
3 
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val1” 
value=“10” 
INPUT 
class=“val2” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
document.getElementsByClassName(“val1”); 
document.getElementsByClassName(“val2”); 
document.querySelector(“html body #container input”);
DOM JavaScript Interaction 
1. function add(a,b) { 
2. return a + b; 
3. } 
4. 
5. var input1 = 10; 
5’. var input1 = document.getElementsByClassName(“val1”)[0].value; 
6. var input2 = 20; 
6’. var input2 = document.getElementsByClassName(“val2”)[0].value; 
7. if(input1 != 0) { 
8. var sum= add(input1,input2); 
9. alert(sum); 
9’. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 
9’’. document.getElementById(“result”).innerHTML += html; 
10. } else { 
11. var sum = input2; 
12. alert(input2); 
12’. var html += “<p id=‘false’>” + sum+ “</p>”; 
12’’. document.getElementById(“result”).innerHTML += html; 
13. } 
4
Updated DOM State(s) 
Input 21 
DOM State 0  DOM State 1 
5 
true” 
30” 
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val1” 
value=“10” 
INPUT 
class=“val2” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
P 
id=“false” 
html=“20” 
20 
2
DOM State Transition 
6 
S 2 
S 0 
S 1 
S 4 
S … S N 
S 3 
S 5 
User Input / User Action
Challenges 
7 
Is this class name correct? 
1. function add(a,b) { 
Does 2. return the element a + b; 
exist in DOM? 
3. } 
4. 
5. var input1 = document.getElementsByClassName(“val1”)[0].value; 
6. var input2 = document.getElementsByClassName(“val2”)[0].value; 
7. if(input1 != 0) { 
8. var sum= add(input1,input2); 
9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 
10. document.getElementById(“result”).innerHTML += html; 
11. } else { 
12. var sum = input2; 
13. var html += “<p id=‘false’>” + sum+ “</p>”; 
14. document.getElementById(“result”).innerHTML += html; 
15. } 
Does it have the property “value”? 
What is the updated DOM structure?
Straw man Approach 
Manually inspect the DOM 
Develop, Execute, Repeat 
Tedious and time consuming 
8
Problem Statement 
• JavaScript code is challenging to develop and 
analyze 
– Handling interactions between JS and DOM 
[MSR’14][ESEM’13] 
• Lack of tool support [ESEM’13] 
– Instant feedback required 
9
Related Work 
10 
???
Proposed Solution 
Analyze each DOM state and assist the 
developer while writing JavaScript Code 
BUT 
Number of DOM states can be infinite!!! 
11
Intuition 
DOM states exhibit patterns 
12 
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val1” 
value=“10” 
INPUT 
class=“val2” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val1” 
value=“10” 
INPUT 
class=“val2” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
P 
id=“true” 
html=“30” 
S 0 S 1
DOM Element Locators 
13 
BODY 
DIV 
id=“container” 
INPUT 
class=“val” 
value=“10” 
INPUT 
class=“val” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
html body div#container input.val1 
html body div#container input.val2 
html body div#container button#add 
html body div#container span.result 
html body div#container input.val1 
html body div#container input.val2 
html body div#container button#add 
html body div#container span.result p#true 
html body div#container input.val1 
html body div#container input.val2 
html body div#container button#add 
html body div#container span.result p#false 
HTML 
p 
id=“false” 
true” 
html=“30” 
S 012
Compression Techniques 
14 
html body div#container input.val1 
html body div#container input.val1.val2 
html body div#container input.val2 
html body div#container input.val{d} 
html body div#container button#add 
html body div#container span.result 
html body div#container input.val1 
html body div#container input.val2 
html body div#container button #add 
html body div#container span.result p#true 
html body div#container span.result 
p#true#flase 
html body div#container input.val1 
html body div#container input.val2 
html body div#container button #add 
Duplicates Removed 
Similar IDs combined 
Similar classes combined
DOM Analysis 
• Manual 
• Automatic 
• Crawl available DOM states. 
• Convert each DOM state to a list of DOM 
Element Locators. 
• Detect patterns in DOM Element Locators. 
15
JavaScript Code Analysis 
16 
1. function add(a,b) { 
2. return a + b; 
3. } 
4. 
5. var input1 = document.getElementsByClassName(“val1”)[0].value; 
6. var input2 = document.getElementsByClassName(“val2”)[0].value; 
7. if(input1 != 0) { 
8. var sum= add(input1,input2); 
9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 
10. document.getElementById(“result”).innerHTML += html; 
11. } else { 
12. var sum = input2; 
13. var html += “<p id=‘false’>” + sum+ “</p>”; 
14. document.getElementById(“result”).innerHTML += html; 
15. } 
..... 
if(condition) { 
then-statements; 
} else { 
else-statements; 
..... 
HTML 
BODY 
..... 
condition; 
log true; 
then-statements; 
..... 
..... 
condition; 
then-statements; 
..... 
..... 
condition; 
log false 
else-statements; 
..... 
..... 
condition; 
else-statements; 
..... 
DIV 
id=“container” 
INPUT 
class=“val1” 
value=“10” 
INPUT 
class=“val2” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
S0 
class=“result” 
html=“Result:”
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val” 
value=“10” 
INPUT 
class=“val” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
p 
id=“false” 
html=“30” 
HTML 
BODY 
DIV 
id=“container” 
INPUT 
class=“val” 
value=“10” 
INPUT 
class=“val” 
value=“20” 
BUTTON 
id=“add” 
value=“Add” 
SPAN 
class=“result” 
html=“Result:” 
p 
id=“true” 
html=“30” 
Example 
17 
1. function add(a,b) { 
2. return a + b; 
3. } 
4. 
5. var input1 = document.getElementsByClassName(“val1”)[0].value; 
6. var input2 = document.getElementsByClassName(“val2”)[0].value; 
7. input1 != 0; 
8. dompleteLog(“main”,true); 
9. var sum= add(input1,input2); 
10. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 
11. document.getElementById(“result”).innerHTML += html; 
1. function add(a,b) { 
2. return a + b; 
3. } 
4. 
5. var input1 = document.getElementsByClassName(“val1”)[0].value; 
6. var input2 = document.getElementsByClassName(“val2”)[0].value; 
7. input1 != 0; 
8. dompleteLog(“main”,false); 
9. var sum = input2; 
10. var html += “<p id=‘false’>” + sum+ “</p>”; 
11. document.getElementById(“result”).innerHTML += html; 
S1 
S2
Code Analysis 
• Generate possible code paths 
• Execute JavaScript code 
• Intercept calls to DOM API 
• Analyze Logs 
18
Suggestion Generation 
19 
DOM Analysis 
Output 
CodeAnalysis 
Output 
Suggestions
Approach Summary 
20 
DOM Analysis 
(Phase 1) 
Code Analysis 
(Phase 2) 
Suggestion Generation 
(Phase 3) 
Webapp URL 
JavaScript Code 
Suggestions 
Executed only once 
Executed every time
DOMpletion 
(Brackets IDE Plugin) 
Brackets Live Development 
21 
https://github.com/saltlab/dompletion
Screenshot 
22
Evaluation 
RQ1: Do DOM element locators converge? 
RQ2: How accurate are the code completion suggestions? 
– Precision 
– Recall 
RQ3: What is the performance overhead incurred? 
23
Experimental Objects 
24
RQ1: Convergence 
Crawled each application randomly, until the 
number DOM element locators tend to stabilize. 
25
RQ1: Results 
26 
Phormer 
Number of DOM Element Locators
RQ2: Performance 
Performed code-completion in the existing 
JavaScript Code. 
Compared results with the existing values 
used in the code. 
27
RQ2: Execution 
Actual Suggestion 
28 
1. function add(a,b) { 
2. return a + b; 
“val2” 
3. } 
4. var input1 = document.getElementsByClassName(“val1”)[0].value; 
5. var input2 = document.getElementsByClassName(“val2”)[0].value; 
6. var input2 = document.getElementByClassName(“ 
7. if(input1 != 0) { 
8. var sum= add(input1,input2); 
9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 
10. document.getElementById(“result”).innerHTML += html; 
11. } else { 
12. var sum = input2; 
13. var html += “<p id=‘false’>” + sum+ “</p>”; 
14. document.getElementById(“result”).innerHTML += html; 
15. }
RQ2: Results (Recall) 
29
RQ2: Results (Precision) 
30
RQ3: Performance 
DOM Analysis Phase 
• Crawled each web application until DOM element 
locators merge. 
• Recorded time elapsed by the end of each state 
Code Analysis Phase 
• Recorded time taken to list the suggestions 
31
RQ3: Results 
• DOM Analysis 
– 173 seconds (3 minutes approx.) 
• Code Analysis 
– Min time: 1 second 
– Max time: 6 seconds 
– Avg. time: 2.8 seconds 
32 
Incurred only once
User Study 
• 9 Participants 
Group A : Using DOMpletion 
Group B : Without DOMpletion 
• 4 Tasks to analyze the DOM JavaScript 
interactions 
103 
268 
Time (Seconds) 
Group A Group B 
97.50% 90.83% 
47.50% 
76.25% 
Recall Precision 
Group A Group B 33
Contributions 
1. Discussed challenges behind DOM based code completion. 
2. Fully automated code completion technique using static and 
dynamic analysis of JavaScript code and DOM. 
3. Implementation in an open source tool called DOMpletion. 
4. Empirical evaluation to assess DOMpletion. 
https://github.com/saltlab/dompletion 
34 
Up to 83 % Recall and 90% Precision 
2.8 seconds average time

Más contenido relacionado

La actualidad más candente

A (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesA (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesDavid Wengier
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline codeRajeev Sharan
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client servertrilestari08
 
Christopher Latham Portfolio
Christopher Latham PortfolioChristopher Latham Portfolio
Christopher Latham Portfoliolathamcl
 
GR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf
 
Automatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method DeclarationsAutomatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method DeclarationsICSM 2010
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascriptDoeun KOCH
 
Javascript The Good Parts v2
Javascript The Good Parts v2Javascript The Good Parts v2
Javascript The Good Parts v2Federico Galassi
 
Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript ConceptsNaresh Kumar
 
Grails transactions
Grails   transactionsGrails   transactions
Grails transactionsHusain Dalal
 
[4developers] The saga pattern v3- Robert Pankowiecki
[4developers] The saga pattern v3- Robert Pankowiecki[4developers] The saga pattern v3- Robert Pankowiecki
[4developers] The saga pattern v3- Robert PankowieckiPROIDEA
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"LogeekNightUkraine
 
Christopher Latham Portfolio
Christopher Latham PortfolioChristopher Latham Portfolio
Christopher Latham Portfoliolathamcl
 
Promise: async programming hero
Promise: async programming heroPromise: async programming hero
Promise: async programming heroThe Software House
 

La actualidad más candente (19)

A (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesA (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project Files
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client server
 
Christopher Latham Portfolio
Christopher Latham PortfolioChristopher Latham Portfolio
Christopher Latham Portfolio
 
GR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails WebflowGR8Conf 2011: Grails Webflow
GR8Conf 2011: Grails Webflow
 
Automatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method DeclarationsAutomatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method Declarations
 
Let's JavaScript
Let's JavaScriptLet's JavaScript
Let's JavaScript
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Java day9n
Java day9nJava day9n
Java day9n
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
 
Javascript The Good Parts v2
Javascript The Good Parts v2Javascript The Good Parts v2
Javascript The Good Parts v2
 
MaintainStaffTable
MaintainStaffTableMaintainStaffTable
MaintainStaffTable
 
Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript Concepts
 
Grails transactions
Grails   transactionsGrails   transactions
Grails transactions
 
[4developers] The saga pattern v3- Robert Pankowiecki
[4developers] The saga pattern v3- Robert Pankowiecki[4developers] The saga pattern v3- Robert Pankowiecki
[4developers] The saga pattern v3- Robert Pankowiecki
 
Marcus Portfolio
Marcus  PortfolioMarcus  Portfolio
Marcus Portfolio
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
 
Christopher Latham Portfolio
Christopher Latham PortfolioChristopher Latham Portfolio
Christopher Latham Portfolio
 
Promise: async programming hero
Promise: async programming heroPromise: async programming hero
Promise: async programming hero
 

Similar a Dompletion: DOM-Aware JavaScript Code Completion

Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QAAlban Gérôme
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonMLRiza Fahmi
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonMLRiza Fahmi
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5arajivmordani
 
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Simon Fowler
 
The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212Mahmoud Samir Fayed
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.Nerd Tzanetopoulos
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jqueryciberglo
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps OfflinePedro Morais
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 

Similar a Dompletion: DOM-Aware JavaScript Code Completion (20)

Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
 
Introduction to ReasonML
Introduction to ReasonMLIntroduction to ReasonML
Introduction to ReasonML
 
Perkenalan ReasonML
Perkenalan ReasonMLPerkenalan ReasonML
Perkenalan ReasonML
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5a
 
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Model-View-Update, and Beyond!
Model-View-Update, and Beyond!
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Novidades do c# 7 e 8
Novidades do c# 7 e 8Novidades do c# 7 e 8
Novidades do c# 7 e 8
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
Django quickstart
Django quickstartDjango quickstart
Django quickstart
 
Service Workers
Service WorkersService Workers
Service Workers
 

Más de SALT Lab @ UBC

Hidden-Web Induced by Client-Side Scripting: An Empirical Study
Hidden-Web Induced by Client-Side Scripting: An Empirical StudyHidden-Web Induced by Client-Side Scripting: An Empirical Study
Hidden-Web Induced by Client-Side Scripting: An Empirical StudySALT Lab @ UBC
 
Efficient JavaScript Mutation Testing
Efficient JavaScript Mutation TestingEfficient JavaScript Mutation Testing
Efficient JavaScript Mutation TestingSALT Lab @ UBC
 
Automated Analysis of CSS Rules to Support Style Maintenance
Automated Analysis of CSS Rules to Support Style MaintenanceAutomated Analysis of CSS Rules to Support Style Maintenance
Automated Analysis of CSS Rules to Support Style MaintenanceSALT Lab @ UBC
 
Mining Questions Asked by Web Developers
Mining Questions Asked by Web DevelopersMining Questions Asked by Web Developers
Mining Questions Asked by Web DevelopersSALT Lab @ UBC
 
Works For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug ReportsWorks For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug ReportsSALT Lab @ UBC
 
Vejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript FaultsVejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript FaultsSALT Lab @ UBC
 
Understanding JavaScript Event-based Interactions
Understanding JavaScript Event-based InteractionsUnderstanding JavaScript Event-based Interactions
Understanding JavaScript Event-based InteractionsSALT Lab @ UBC
 
DOM-based Test Adequacy Criteria for Web Applications
DOM-based Test Adequacy Criteria for Web ApplicationsDOM-based Test Adequacy Criteria for Web Applications
DOM-based Test Adequacy Criteria for Web ApplicationsSALT Lab @ UBC
 
Leveraging Existing Tests in Automated Test Generation for Web Applications
Leveraging Existing Tests in Automated Test Generation for Web ApplicationsLeveraging Existing Tests in Automated Test Generation for Web Applications
Leveraging Existing Tests in Automated Test Generation for Web ApplicationsSALT Lab @ UBC
 

Más de SALT Lab @ UBC (9)

Hidden-Web Induced by Client-Side Scripting: An Empirical Study
Hidden-Web Induced by Client-Side Scripting: An Empirical StudyHidden-Web Induced by Client-Side Scripting: An Empirical Study
Hidden-Web Induced by Client-Side Scripting: An Empirical Study
 
Efficient JavaScript Mutation Testing
Efficient JavaScript Mutation TestingEfficient JavaScript Mutation Testing
Efficient JavaScript Mutation Testing
 
Automated Analysis of CSS Rules to Support Style Maintenance
Automated Analysis of CSS Rules to Support Style MaintenanceAutomated Analysis of CSS Rules to Support Style Maintenance
Automated Analysis of CSS Rules to Support Style Maintenance
 
Mining Questions Asked by Web Developers
Mining Questions Asked by Web DevelopersMining Questions Asked by Web Developers
Mining Questions Asked by Web Developers
 
Works For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug ReportsWorks For Me! Characterizing Non-Reproducible Bug Reports
Works For Me! Characterizing Non-Reproducible Bug Reports
 
Vejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript FaultsVejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript Faults
 
Understanding JavaScript Event-based Interactions
Understanding JavaScript Event-based InteractionsUnderstanding JavaScript Event-based Interactions
Understanding JavaScript Event-based Interactions
 
DOM-based Test Adequacy Criteria for Web Applications
DOM-based Test Adequacy Criteria for Web ApplicationsDOM-based Test Adequacy Criteria for Web Applications
DOM-based Test Adequacy Criteria for Web Applications
 
Leveraging Existing Tests in Automated Test Generation for Web Applications
Leveraging Existing Tests in Automated Test Generation for Web ApplicationsLeveraging Existing Tests in Automated Test Generation for Web Applications
Leveraging Existing Tests in Automated Test Generation for Web Applications
 

Último

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 

Último (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Dompletion: DOM-Aware JavaScript Code Completion

  • 1. DOMPLETION DOM-Aware JavaScript Code Completion An approach to assist the Web Developers in writing DOM manipulating JavaScript code Kartik Bajaj, Karthik Pattabiraman, Ali Mesbah University of British Columbia {kbajaj, karthikp, amesbah}@ece.ubc.ca 1
  • 2. Running Example (JavaScript) 1. function add(a,b) { 2. return a + b; 3. } 4. 5. var input1 = 10; 6. var input2 = 20; 7. if(input1 != 0) { 8. var sum = add(input1,input2); 9. alert(sum); 10. } else { 11. var sum = input2; 12. alert(sum); 13. } 2
  • 3. Document Object Model (DOM) document.getElementsByTagName(“input”); 3 HTML BODY DIV id=“container” INPUT class=“val1” value=“10” INPUT class=“val2” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” document.getElementsByClassName(“val1”); document.getElementsByClassName(“val2”); document.querySelector(“html body #container input”);
  • 4. DOM JavaScript Interaction 1. function add(a,b) { 2. return a + b; 3. } 4. 5. var input1 = 10; 5’. var input1 = document.getElementsByClassName(“val1”)[0].value; 6. var input2 = 20; 6’. var input2 = document.getElementsByClassName(“val2”)[0].value; 7. if(input1 != 0) { 8. var sum= add(input1,input2); 9. alert(sum); 9’. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 9’’. document.getElementById(“result”).innerHTML += html; 10. } else { 11. var sum = input2; 12. alert(input2); 12’. var html += “<p id=‘false’>” + sum+ “</p>”; 12’’. document.getElementById(“result”).innerHTML += html; 13. } 4
  • 5. Updated DOM State(s) Input 21 DOM State 0  DOM State 1 5 true” 30” HTML BODY DIV id=“container” INPUT class=“val1” value=“10” INPUT class=“val2” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” P id=“false” html=“20” 20 2
  • 6. DOM State Transition 6 S 2 S 0 S 1 S 4 S … S N S 3 S 5 User Input / User Action
  • 7. Challenges 7 Is this class name correct? 1. function add(a,b) { Does 2. return the element a + b; exist in DOM? 3. } 4. 5. var input1 = document.getElementsByClassName(“val1”)[0].value; 6. var input2 = document.getElementsByClassName(“val2”)[0].value; 7. if(input1 != 0) { 8. var sum= add(input1,input2); 9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 10. document.getElementById(“result”).innerHTML += html; 11. } else { 12. var sum = input2; 13. var html += “<p id=‘false’>” + sum+ “</p>”; 14. document.getElementById(“result”).innerHTML += html; 15. } Does it have the property “value”? What is the updated DOM structure?
  • 8. Straw man Approach Manually inspect the DOM Develop, Execute, Repeat Tedious and time consuming 8
  • 9. Problem Statement • JavaScript code is challenging to develop and analyze – Handling interactions between JS and DOM [MSR’14][ESEM’13] • Lack of tool support [ESEM’13] – Instant feedback required 9
  • 11. Proposed Solution Analyze each DOM state and assist the developer while writing JavaScript Code BUT Number of DOM states can be infinite!!! 11
  • 12. Intuition DOM states exhibit patterns 12 HTML BODY DIV id=“container” INPUT class=“val1” value=“10” INPUT class=“val2” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” HTML BODY DIV id=“container” INPUT class=“val1” value=“10” INPUT class=“val2” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” P id=“true” html=“30” S 0 S 1
  • 13. DOM Element Locators 13 BODY DIV id=“container” INPUT class=“val” value=“10” INPUT class=“val” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” html body div#container input.val1 html body div#container input.val2 html body div#container button#add html body div#container span.result html body div#container input.val1 html body div#container input.val2 html body div#container button#add html body div#container span.result p#true html body div#container input.val1 html body div#container input.val2 html body div#container button#add html body div#container span.result p#false HTML p id=“false” true” html=“30” S 012
  • 14. Compression Techniques 14 html body div#container input.val1 html body div#container input.val1.val2 html body div#container input.val2 html body div#container input.val{d} html body div#container button#add html body div#container span.result html body div#container input.val1 html body div#container input.val2 html body div#container button #add html body div#container span.result p#true html body div#container span.result p#true#flase html body div#container input.val1 html body div#container input.val2 html body div#container button #add Duplicates Removed Similar IDs combined Similar classes combined
  • 15. DOM Analysis • Manual • Automatic • Crawl available DOM states. • Convert each DOM state to a list of DOM Element Locators. • Detect patterns in DOM Element Locators. 15
  • 16. JavaScript Code Analysis 16 1. function add(a,b) { 2. return a + b; 3. } 4. 5. var input1 = document.getElementsByClassName(“val1”)[0].value; 6. var input2 = document.getElementsByClassName(“val2”)[0].value; 7. if(input1 != 0) { 8. var sum= add(input1,input2); 9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 10. document.getElementById(“result”).innerHTML += html; 11. } else { 12. var sum = input2; 13. var html += “<p id=‘false’>” + sum+ “</p>”; 14. document.getElementById(“result”).innerHTML += html; 15. } ..... if(condition) { then-statements; } else { else-statements; ..... HTML BODY ..... condition; log true; then-statements; ..... ..... condition; then-statements; ..... ..... condition; log false else-statements; ..... ..... condition; else-statements; ..... DIV id=“container” INPUT class=“val1” value=“10” INPUT class=“val2” value=“20” BUTTON id=“add” value=“Add” SPAN S0 class=“result” html=“Result:”
  • 17. HTML BODY DIV id=“container” INPUT class=“val” value=“10” INPUT class=“val” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” p id=“false” html=“30” HTML BODY DIV id=“container” INPUT class=“val” value=“10” INPUT class=“val” value=“20” BUTTON id=“add” value=“Add” SPAN class=“result” html=“Result:” p id=“true” html=“30” Example 17 1. function add(a,b) { 2. return a + b; 3. } 4. 5. var input1 = document.getElementsByClassName(“val1”)[0].value; 6. var input2 = document.getElementsByClassName(“val2”)[0].value; 7. input1 != 0; 8. dompleteLog(“main”,true); 9. var sum= add(input1,input2); 10. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 11. document.getElementById(“result”).innerHTML += html; 1. function add(a,b) { 2. return a + b; 3. } 4. 5. var input1 = document.getElementsByClassName(“val1”)[0].value; 6. var input2 = document.getElementsByClassName(“val2”)[0].value; 7. input1 != 0; 8. dompleteLog(“main”,false); 9. var sum = input2; 10. var html += “<p id=‘false’>” + sum+ “</p>”; 11. document.getElementById(“result”).innerHTML += html; S1 S2
  • 18. Code Analysis • Generate possible code paths • Execute JavaScript code • Intercept calls to DOM API • Analyze Logs 18
  • 19. Suggestion Generation 19 DOM Analysis Output CodeAnalysis Output Suggestions
  • 20. Approach Summary 20 DOM Analysis (Phase 1) Code Analysis (Phase 2) Suggestion Generation (Phase 3) Webapp URL JavaScript Code Suggestions Executed only once Executed every time
  • 21. DOMpletion (Brackets IDE Plugin) Brackets Live Development 21 https://github.com/saltlab/dompletion
  • 23. Evaluation RQ1: Do DOM element locators converge? RQ2: How accurate are the code completion suggestions? – Precision – Recall RQ3: What is the performance overhead incurred? 23
  • 25. RQ1: Convergence Crawled each application randomly, until the number DOM element locators tend to stabilize. 25
  • 26. RQ1: Results 26 Phormer Number of DOM Element Locators
  • 27. RQ2: Performance Performed code-completion in the existing JavaScript Code. Compared results with the existing values used in the code. 27
  • 28. RQ2: Execution Actual Suggestion 28 1. function add(a,b) { 2. return a + b; “val2” 3. } 4. var input1 = document.getElementsByClassName(“val1”)[0].value; 5. var input2 = document.getElementsByClassName(“val2”)[0].value; 6. var input2 = document.getElementByClassName(“ 7. if(input1 != 0) { 8. var sum= add(input1,input2); 9. var html = “<p id=‘true’> + add(input1,input2) + “</p>”; 10. document.getElementById(“result”).innerHTML += html; 11. } else { 12. var sum = input2; 13. var html += “<p id=‘false’>” + sum+ “</p>”; 14. document.getElementById(“result”).innerHTML += html; 15. }
  • 31. RQ3: Performance DOM Analysis Phase • Crawled each web application until DOM element locators merge. • Recorded time elapsed by the end of each state Code Analysis Phase • Recorded time taken to list the suggestions 31
  • 32. RQ3: Results • DOM Analysis – 173 seconds (3 minutes approx.) • Code Analysis – Min time: 1 second – Max time: 6 seconds – Avg. time: 2.8 seconds 32 Incurred only once
  • 33. User Study • 9 Participants Group A : Using DOMpletion Group B : Without DOMpletion • 4 Tasks to analyze the DOM JavaScript interactions 103 268 Time (Seconds) Group A Group B 97.50% 90.83% 47.50% 76.25% Recall Precision Group A Group B 33
  • 34. Contributions 1. Discussed challenges behind DOM based code completion. 2. Fully automated code completion technique using static and dynamic analysis of JavaScript code and DOM. 3. Implementation in an open source tool called DOMpletion. 4. Empirical evaluation to assess DOMpletion. https://github.com/saltlab/dompletion 34 Up to 83 % Recall and 90% Precision 2.8 seconds average time

Notas del editor

  1. describe the meaning approach to assist the web developers in writing JavaScript code that interacts with DOM
  2. before we go further lets have a quick look at the running example which we follow throughout the presentation The code looks simple.. however when writing code for web applications the code needs to be modified to get input and redirect outputs to the web application.. For this javascript code, lets use this really simple calculator application.. Before we go futher lets have a quick look how this web application is represneted in the web browser and how does javascript code written by the programmer interacts with it..
  3. each web application is represented in the form of Document Object Model tree i.e DOM tree each node in the DOM tree corresponds to certain elements in the web application. For example, in this case the two highlighted leaf nodes represent the two input elements. In order for the web developer to interacts with these elements The takeway from this slide is there are more than one ways for a developer to select DOM elements and developers need to precisely analyze the DOM before selecting the DOM element.
  4. dom is highly dynamic and interleaves and evolves with javascript code ----- Meeting Notes (2014-09-10 13:19) ----- red part separate
  5. code completions for interactions between JS and DOM Loosely typed JS Highly dynamic DOM These approaches are static and mainly used for finding errors in the code not for code-completion
  6. I order to compare the dom states, we need to get rid of the irrelevant information and focus on what exactly matters to the developers..
  7. long time to generate why do we need to compress?? need to provide quick answer to the developers simulate unseen dom states using the detected patterns
  8. DOM Analysis Phase 1 In this phase, we crawl the web application. This crawling can be either automated based on the randomized crawler or the developer can crawl the web app manually, if the developer wants to focus on limited number of DOM states. Next, for DOM state we create a list of DOM element locators. By DOM element locators we refer to the combination of tag names, class names and ids attached to each element along with the hierarchical information. Next, we detect patterns among these DOM element locators. the basic intuition behind our work is that these DOM element locators tend to converge over the increasing number of DOM states and exhibit patterns that can be recognized. During the evaluation phase we validate this intuition. The output of this phase looks like this ----- Meeting Notes (2014-09-08 16:54) ----- general algo read the paper
  9. ----- Meeting Notes (2014-09-10 13:19) ----- show DOM in the corner
  10. To provide a brief overview of our approach, we require two inputs from the developer. The 1st one being the URL of the web application for which the developer is writing the JavaScript Code. If the web application is not running the developer can also provide the HTML code as an input to the system. The 2nd one is the JavaScript that the developer is writing. The 1st phase of our approach begins in the background and does not require any specific instruction from the developer. It starts with the 1st DOM state, keep exploring next available DOM states and collecting information. The 2nd phase starts when the developer hits the code completion key. The JavaScript code written till then is taken as an input and dynamically analyzed. The outputs of 1st and 2nd phase are then compared to generate suggestions for the user. ----- Meeting Notes (2014-09-08 16:54) ----- comes later phase for summary ----- Meeting Notes (2014-09-10 13:19) ----- dnt animate
  11. We have implemented DOMpletion as plugin for the Brackets IDE using its Live Development feature to analyze the DOM. The Brackets IDE is built as a Desktop application using nodejs. We use Esprima JavaScript parser built in JavaScript to parse the JavaScript code given as input. Therefore, keeping our implementation of DOM-Aware code completion tool in JavaScript itself.
  12. Evaluation We cover three main points: Convergence of DOM element locators, i.e the intuition we had for the DOM analysis phase. Accuracy in terms of precision and recall for the proposed technique. Performance overhead caused by DOMpletion
  13. ----- Meeting Notes (2014-09-10 13:19) ----- this applies to other web sites too css selector tpo
  14. ----- Meeting Notes (2014-09-10 13:19) ----- show code demo to complete
  15. hierarchical information definition how far the suggestion is and make it a positive statement say about no hierarchy too
  16. related work graph ----- Meeting Notes (2014-09-10 13:19) ----- summary of results show just email address