Statically identifying class dependencies in legacy JavaScript systems: First results
Author
dc.contributor.author
Silva, Leonardo Humberto
Author
dc.contributor.author
Valente, Marco Tulio
Author
dc.contributor.author
Bergel, Alexandre
Admission date
dc.date.accessioned
2019-05-29T13:30:01Z
Available date
dc.date.available
2019-05-29T13:30:01Z
Publication date
dc.date.issued
2017
Cita de ítem
dc.identifier.citation
En: 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER)
Identifier
dc.identifier.other
10.1109/SANER.2017.7884647
Identifier
dc.identifier.uri
https://repositorio.uchile.cl/handle/2250/168892
Abstract
dc.description.abstract
Identifying dependencies between classes is an essen-tial activity when maintaining and evolving software applications.It is also known that JavaScript developers often use classes tostructure their projects. This happens even in legacy code, i.e.,code implemented in JavaScript versions that do not providesyntactical support to classes. However, identifying associationsand other dependencies between classes remain a challenge dueto the lack of static type annotations. This paper investigates theuse of type inference to identify relations between classes in legacyJavaScript code. To this purpose, we rely on Flow, a state-of-the-art type checker and inferencer tool for JavaScript. We performa study using code with and without annotating the class importstatements in two modular applications. The results show thatprecision is 100% in both systems, and that the annotated versionimproves the recall, ranging from 37% to 51% for dependenciesin general and from 54% to 85% for associations. Therefore,we hypothesize that these tools should also depend on dynamicanalysis to cover all possible dependencies in JavaScript code.