Morpheus: Variability-Aware Refactoring in the Wild

– Supplementary Website –

Overview





Uni Logo

Software Product-Line Group

Overview

This website provides supplementary material for the paper "Morpheus: Variability-Aware Refactoring in the Wild". The paper describes our experiences on the development and the evaluation of variability-aware refactorings of configurable systems written in C. To this end, we have developed three different refactorings that are common in modern development environments such as Eclipse and Visual Studio (Rename Identifier, Extract Function, Inline Function). To evaluate our approach, we applied different random refactorings to three industry-scale case studies, namely the BusyBox toolsuite (www.busybox.net), the relational database-management system SQLite (www.sqlite.org) and the cryptographic library OpenSSL (www.openssl.org).

HowTo

The experiments in the paper were conducted with the Morpheus tool (Morpheus website). The specific version we used for the experiments is available here.

We provide the case studies on this page (BusyBox Case Study, SQLite Case Study, OpenSSL Case Study). If you are interested in the raw results of our experiments, they are also provided here (BusyBox, OpenSSL and SQLite).

In order to use the Morhpeus tool for yourself just follow these steps:

$ git clone https://github.com/aJanker/TypeChef.git
$ ./TypeChef/publish.sh
$ cd ..
$ git clone https://github.com/joliebig/Morpheus.git
$ cd Morpheus
$ ./mkrun.sh
$ ./morpheus.sh --showGui 'pathToCsourceFile'
Running example_a.c from the morpheus paper (put it in the Morpheus folder, change directory to Morpheus folder) for example:
$ ./morpheus.sh --showGui example_a.c
You can now select the whole line #8 in the program, right click and choose refactor -> rename -> rename global, enter a new name and Morpheus will correctly transform alle different definitions of 'global'.

How to refactor Refactor result

Keep in mind that all file inclusion will be added into the output file. This means including for example will generate a huge result file. Just look at the end of the file to find the part of the original code which got refactored!

Case study modifications

BusyBox

This case study contains code for hexadecimal variables which are not conform to the C99 standard. In order to be able to parse the source files we had to fix the hexadecimal variables by adding a '0' before the actual value.
File blacklist for the BusyBox case study.
Identifier name blacklist for renaming identifiers in the BusyBox case study files.

OpenSSL

File blacklist for the OpenSSL case study.
Identifier name blacklist for renaming identifiers in the OpenSSL case study files.

Contact

The paper "Morpheus: Variability-Aware Refactoring in the Wild" has been written by Jörg Liebig, Andreas Janker, Florian Garbe, Christian Lengauer, and Sven Apel. For questions regarding the paper, please contact the main author Jörg Liebig.