Auto-locating and fix-propagating for HTML validation errors to PHP server-side code
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 c...
Saved in:
| Published in | 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011) pp. 13 - 22 |
|---|---|
| Main Authors | , , , |
| Format | Conference Proceeding |
| Language | English |
| Published |
Washington, DC, USA
IEEE Computer Society
06.11.2011
IEEE |
| Series | ACM Conferences |
| Subjects | |
| Online Access | Get full text |
| ISBN | 1457716380 9781457716386 |
| ISSN | 1938-4300 |
| DOI | 10.1109/ASE.2011.6100047 |
Cover
| Summary: | 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. |
|---|---|
| ISBN: | 1457716380 9781457716386 |
| ISSN: | 1938-4300 |
| DOI: | 10.1109/ASE.2011.6100047 |