FASE 2014 - Submission 146

This area is dedicated to the research paper A Lightweight Approach to Synchronize Model and Code Refactorings submitted to the 17th International Conference on Fundamental Approaches to Software Engineering (FASE 2014). It contains various material concerning the installation and evaluation of the approach respectively its prototype implementation.

Installation Guide

  1. Please download the Juno Eclipse Modeling Tools from http://www.eclipse.org/downloads/packages/release/juno/sr2
  2. . Unzip and start Eclipse and update the system (Help > Check for Updates).
  3. Restart Eclipse and install the EMF model transformation language Henshin (Help > Install New Software... > Work with: http://download.eclipse.org/modeling/emft/henshin/updates/release > next > ...).
  4. Restart Eclipse and install the prototype implementation (branch of EMF Refactor): Help > Install New Software... > Work with: http://download.eclipse.org/emf-refactor/updatesite-fase2014 > next > ....
  5. Restart Eclipse.

Projects

For evaluation purposes please download fase2014_projects.zip from above and import the example projects pdfsam_code, pdfsam_model, and VehicleRentalCompany into your workspace (File > Import... > General > Existing Projects into Workspace > Next > Select archive file > Browse (to the zip file) > Select all > Finish).

Scenarios

For the evaluation of the approach (respectively the implemented prototype) the following scenarios are performed on the project above:

VehicleRentalCompany

Model -> Code
  1. Refactoring Hide Attribute on Customer::customerCard.
  2. Refactoring Rename Class on Customer (new name: Kunde).
  3. Refactoring Rename Attribute on Customer::customerCard (new name: kundenkarte).
  4. Refactoring Rename Operation on VehicleRental::rentTruck (new name: rentLKW).
  5. Refactoring Pull Up Attribute on Auto::manufacturer.
  6. Refactoring Push Down Attribute on Vehicle::manufacturer.
  7. Refactoring Introduce Parameter Object on VehicleRental::rentCar.
Code -> Model
  1. Refactoring Hide Field on Customer::customerCard.
  2. Refactoring Rename Class on Kunde (new name: Customer).
  3. Refactoring Rename Field on Customer::kundenkarte (new name: customerCard).
  4. Refactoring Rename Method on VehicleRental::rentCar (new name: renCar).
  5. Refactoring Pull Up Field on Truck::manufacturer.
  6. Refactoring Push Down Field on Vehicle::manufacturer.
  7. Refactoring Introduce Parameter Object on VehicleRental::rentCar.

PDFsam

Model -> Code
  1. Refactoring Hide Attribute on o.p.g.business.listener.mediators.ApplicationExitMediator::EXIT_COMMAND.
  2. Refactoring Rename Class on o.p.g.guiclient.business.PagesWorker (new name: PageWorker).
  3. Refactoring Rename Attribute on o.p.g.guiclient.business.PagesWorker::REMOVE (new name: DELETE).
  4. Refactoring Rename Operation on o.p.g.guiclient.business.PageWorker::execute(String...) (new name: executes).
  5. Refactoring Pull Up Attribute on o.p.g.gui.panels.JSettingsPanel::PLUGIN_AUTHOR.
  6. Refactoring Push Down Attribute on o.p.g.gui.panels.AbstractPlugablePanel::PLUGIN_AUTHOR.
  7. Refactoring Introduce Parameter Object on o.p.g.commons.panels.JPdfSelectionPanel.
Code -> Model
  1. Refactoring Hide Field on o.p.g.business.listener.mediators.ApplicationExitMediator::SAVE_AND_EXIT_COMMAND.
  2. Refactoring Rename Class on o.p.g.guiclient.business.PageWorker (new name: PagesWorker).
  3. Refactoring Rename Field on o.p.g.guiclient.business.PagesWorker::DELETE (new name: REMOVE).
  4. Refactoring Rename Method on o.p.g.guiclient.business.PageWorker::execute(String...) (new name: executes).
  5. Refactoring Pull Up Field on o.p.g.gui.panels.JSettingsPanel::PLUGIN_AUTHOR.
  6. Refactoring Push Down Field on o.p.g.gui.panels.AbstractPlugablePanel::PLUGIN_AUTHOR.
  7. Refactoring Introduce Parameter Object on o.p.g.commons.panels.JPdfSelectionPanel.


Results

For evaluating hypothesis H1 ('If both approaches perform a synchronized refactoring, the results are equal.'), we used all the positive test cases (both refactorings are applicable) for the refactoring pair RenameAttribute;RenameField for evaluating whether both approaches lead to the same results. After we performed this refactoring for each direction and each approach, we compared the resulting artifacts using the text comparison facility in Eclipse (for Java code) and the model comparison functionality provided by EMF Compare. The corresponding code and model comparisons showing no differences can be found here: For evaluating hypothesis H2 ('The dynamic mapping of model and code is fast enough.'), we measured the time needed for dynamically mapping the corresponding elements. The measurements are performed on a Mac Book Air MId 2011 machine (4 GB RAM; Intel i5-2557M dual core 2.7 Ghz). The following tables show the corresponding results in microseconds.

VehicleRentalCompany

Refactoring Model -> Code (lazy) Code -> Model (lazy) Model -> Code (strict) Code -> Model (strict)
1 3961 4245 1076 1698
2 5249 1784 839 529
3 2658 2084 698 765
4 2886 2269 1241 1033
5 2721 3311 673 1570
6 2570 3443 872 1342
7 1657 2600 496 1337

PDFsam

Refactoring Model -> Code (lazy) Code -> Model (lazy) Model -> Code (strict) Code -> Model (strict)
1 24511 35335 535 1638
2 31805 29244 1311 546
3 6929 24285 975 694
4 13943 20509 873 1387
5 11845 38233 801 1631
6 8584 33281 781 1548
7 6391 27818 526 2924
Incubation

This component is currently in its Validation (Incubation) Phase.

Incubation