An Empirical Analysis of JavaScript Dead Code in the Wild – Replication Package (Green Lab 2019-2020)
This project refers to the course assignment An Empirical Analysis of JavaScript Dead Code in the Wild
of the 2019-2020 edition of the Vrije Universiteit Amsterdam, Computer Science Master Degree, Green Lab course. This repository contains all information required to replicate the experimentation, described by the instructions in this README.
This project goal is to investigate to what extent JavaScript dead code impacts popular mobile web apps in the wild (where in the wild
is a synonym for in production
) in terms of page load time and energy consumption.
These instructions will get you a copy of the project up and running on your local machine for experiment replication purpose.
The project makes uses of the following packages
- Lacuna V2: Provides the analyse and removal JavaScript dead code. Originally forked from Kishanjay repository, for which several adjustements were made.
- Android Runner: Provides the automation of the experiment execution in Android devices. Forked from S2-group repostiory. No updates were required.
- GL Kebab R: Provides the randomization in the experiment design and the data analysis of the results produced by Android Runner.
- GL Kebab Subjects: Provides the experiment subjects and scripts to automate Lacuna V2 execution.
- GL Kebab Android Runner Scripts: Provides scripts used when running Android Runner for this project.
Android Runner limit the usage of Linux and macOS machines only. As it requires extra effort to running on macOS, this project experiment was executed in a Linux machine.
Each package has its requirements, overall, this project was executed using:
- Linux distribution -- Ubuntu 18.04 LTS
- Android device -- LG Nexus 5X -- Android OS v8.1.0
- Android Studio SDK
- Python v2.7
- JDK v8
- NodeJS v10
- NPM v6
- R
While older versions of the linux distribution, Android OS, NodeJS and NPM might work, they were not tested.
It is not recommended the use of Virtual Machines.
You can refer to each package readme available at each subpackage for installation process and how to use. They should be used in the following order:
This project uses git subtree to manage the dependency packages. An automation script is available at gitsubtree.command, which provides the following commands:
sh gitsubtree set_git_remote
: Save the remote packages URL by executinggit remote add <package_name> <package_url>
for all packages.sh gitsubtree set_git_remote
: Remove the remote packages URLs by executinggit remote remove <package_name>
for all packages.sh gitsubtree pull_subtrees
: Fetch the changes from the remote packages and merge to the local repository by executinggit subtree add --prefix=<dest_path> --squash <package_name> master
for all packages;
For replication of the experiment, it is not necessary to fetch the packages. The packages should be fetched during development only. Modifications in the packages should be made in the package repository.
- Azim AFroozeh – azimafroozeh;
- Saliha Tabbassum – saalihairshad;
- Stan Swanborn – StanSwanborn;
- Thijmen Kurk – ThijmenKurk;
- Wesley Shann – sshann;
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
For the guidance over the project and detailed feedback during the experimentation design, planning and execution, we thank:
- Dr. Ivano Malavolta – Lecturer for Green Lab course 2019 edition;
- PhD Student Eoin Grua – Teacher Assitant for Green Lab course 2019 edition;
For providing the required tools to make this project possible
- Kishan Nirghin – for providing Lacuna V2 and giving a usage tutorial of the tool;
- Software and Services Group - VU – for providing Android Runner;