DocumentCode
2599910
Title
Auto-locating and fix-propagating for HTML validation errors to PHP server-side code
Author
Nguyen, Hung Viet ; Nguyen, Hoan Anh ; Nguyen, Tung Thanh ; Nguyen, Tien N.
Author_Institution
Electr. & Comput. Eng. Dept., Iowa State Univ., Ames, IA, USA
fYear
2011
fDate
6-10 Nov. 2011
Firstpage
13
Lastpage
22
Abstract
Checking/correcting HTML validation errors in Web pages is helpful for Web developers in finding/fixing bugs. However, existing validating/fixing tools work well only on static HTML pages and do not help fix the corresponding server code if validation errors are found in HTML pages, due to several challenges with dynamically generated pages in Web development. We propose PhpSync, a novel automatic locating/fixing tool for HTML validation errors in PHP-based Web applications. Given an HTML page produced by a server-side PHP program, PhpSync uses Tidy, an HTML validating/correcting tool to find the validation errors in that HTML page. If errors are detected, it leverages the fixes from Tidy in the given HTML page and propagates them to the corresponding location(s) in PHP code. Our core solutions include 1) a symbolic execution algorithm on the given PHP program to produce a single tree-based model, called D-model, which approximately represents its possible client page outputs, 2) an algorithm mapping any text in the given HTML page to the text(s) in the node(s) of the D-model and then to the PHP code, and 3) a fix-propagating algorithm from the fixes in the HTML page to the PHP code via the D-model and the mapping algorithm. Our empirical evaluation shows that on average, PhpSync achieves 96.7% accuracy in locating the corresponding locations in PHP code from client pages, and 95% accuracy in propagating the fixes to the server-side code.
Keywords
Internet; hypermedia markup languages; program verification; D-model; HTML validation errors; PHP server-side code; PhpSync; Tidy; Web developers; Web pages; automatic fixing tool; automatic locating tool; fix-propagating algorithm; single tree-based model; symbolic execution algorithm; Accuracy; Approximation algorithms; Browsers; HTML; Servers; Three dimensional displays; Web pages; Bug Localization; Fix Propagation; PHP Dynamic Web Applications; Validation Errors;
fLanguage
English
Publisher
ieee
Conference_Titel
Automated Software Engineering (ASE), 2011 26th IEEE/ACM International Conference on
Conference_Location
Lawrence, KS
ISSN
1938-4300
Print_ISBN
978-1-4577-1638-6
Type
conf
DOI
10.1109/ASE.2011.6100047
Filename
6100047
Link To Document