Identifying Classes in Legacy JavaScript Code

Abstract : JavaScript is the most popular programming language for the Web. Although the language is prototype-based, developers can emulate class-based abstractions in JavaScript to master the increasing complexity of their applications. Identifying classes in legacy JavaScript code can support these developers at least in the following activities: (i) program comprehension; (ii) migration to the new JavaScript syntax that supports classes; and (iii) implementation of supporting tools, including IDEs with class-based views and reverse engineering tools. In this paper, we propose a strategy to detect class-based abstractions in the source code of legacy JavaScript systems. We report on a large and in-depth study to understand how class emulation is employed, using a dataset of 918 JavaScript applications available on GitHub. We found that almost 70% of the JavaScript systems we study make some usage of classes. We also performed a field study with the main developers of 60 popular JavaScript systems in order to validate our findings. The overall results range from 97% to 100% for precision, from 70% to 89% for recall, and from 82% to 94% for F-score.
Type de document :
Article dans une revue
Journal of Software: Evolution and Process, John Wiley & Sons, Ltd., 2017, 〈10.1002/smr.1864〉
Liste complète des métadonnées

https://hal.inria.fr/hal-01471905
Contributeur : Lse Lse <>
Soumis le : lundi 20 février 2017 - 13:13:48
Dernière modification le : mardi 3 juillet 2018 - 11:49:30
Document(s) archivé(s) le : dimanche 21 mai 2017 - 13:54:45

Fichier

submittedJSEM.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Collections

Citation

Leonardo Silva, Marco Valente, Alexandre Bergel, Nicolas Anquetil, Anne Etien. Identifying Classes in Legacy JavaScript Code. Journal of Software: Evolution and Process, John Wiley & Sons, Ltd., 2017, 〈10.1002/smr.1864〉. 〈hal-01471905〉

Partager

Métriques

Consultations de la notice

484

Téléchargements de fichiers

724