Go to file
2017-10-30 13:19:21 +01:00
evaluation_results Added implementation, testdata and results 2017-10-26 15:46:41 +02:00
src Added implementation, testdata and results 2017-10-26 15:46:41 +02:00
test_data Added implementation, testdata and results 2017-10-26 15:46:41 +02:00
README.md Update README.md 2017-10-30 13:19:21 +01:00

The GOBLIN tool has been integrated into the GRaViTY tool: https://github.com/GRaViTY-Tool

This repository only hosts the version presented on FASE 2018 and will not receive any maintenance. Please use the GRaViTY tool if you are not explicitly interested in this specific version of GOBLIN.

GOBLIN - Generic Objective-Based Layout Improvements for Non-designs

Refactorings constitute an effective means to improve quality and maintainability of evolving object-oriented programs. Searchbased techniques have recently shown very promising results in semiautomatically solving the underlying multi-objective optimization problem, namely: finding optimal sequences of behavior-preserving program transformations that (1) maximize code-quality metrics and (2) minimize the number of changes. However, besides purely functional behavior preservation, the impact of refactorings on extra-functional properties like security have received only little attention so far. To this end, we propose as a further objective of refactorings to minimize the size of the attack surface of programs (i.e., to maximize strictness of declared accessibility of class members). Minimizing the attack surface naturally competes with applicability of established move-method-refactorings for improving coupling/cohesion metrics.

This site contains the source code of our tool implementation GOBLIN, as well as the results of our experimental evaluation which show the impact of attack surface minimization on design-improving refactorings by using different accessibility control strategies.

Installation and Usage

Requirements:

Installation:

  1. Download the GOBLIN source from src
  2. Import GOBLIN as Eclipse projects
  3. Import source code of Java projects to be analysed into the freshly opened workspace

Usage:

  1. Create Program graphs of the Java projects that should be analyzed via rightclick on the project -> GRaViTY -> Generate Program Graph
  2. Change the value of the parameter "INITIAL_MODEL" of SearchParameters.java in the folder "src.momotFiles" to match the path of the generated Program graphs
  3. Run "SearchTypeGraph.java" as Java Application
  4. After the optimization several folders will be created containing evaluation data
  • the folder solutions contains a text file for each final solution on the pareto front. The file will contain the Refactorings of the solution.
  • The folder objectives contains a file listing the different fitness values of all final solutions.
  1. The tests can be executed via the Tests.launch file, new tests can be added via the "Test Workspace.launch" file

Evaluation

We evaluated GOBLIN on an established corpus of 8 open-source Java projects selected from related literature on anti-pattern and code smell detection. Sources for the corpus are:

Based on these papers and our own investigations for simple examples, the following projects has been selected for the evaluation corpus:

The source code for all projects of our corpus can be found under test_data. Evaluation results can be found under evaluation_results.