Go to file
2017-05-04 10:18:32 +02:00
evaluation_results Added implementation, testdata and results 2016-04-30 05:54:05 +02:00
src Added missing generated Java Src 2016-09-10 11:25:03 +08:00
test_data Added implementation, testdata and results 2016-04-30 05:54:05 +02:00
README.md Update README.md 2017-05-04 10:18:32 +02:00

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

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

The work contained in this repository has been published as:

Sven Peldszus, Géza Kulcsár, Malte Lochau, Sandro Schulze: Continuous Detection of Design Flaws in Evolving Object-Oriented Programs using Incremental Multi-pattern Matching. In: Proceedings of the 31st International Conference on Automated Software Engineering (ASE), September 2016

HULK - Continuous Object-Oriented Design-Flaw Detection

Design flaws in object-oriented programs may seriously corrupt code quality thus increasing the risk for introducing subtle errors during software maintenance and evolution. Most recent approaches identify design flaws in an ad-hoc manner, either focusing on software metrics, locally restricted code smells, or on coarse-grained architectural anti-patterns. In our approach, we utilize an abstract program model capturing high-level object-oriented code entities, further augmented with qualitative and quantitative design-related information such as coupling/cohesion. Based on this model, we propose a comprehensive methodology for specifying object-oriented design flaws by means of compound rules integrating code metrics, code smells and anti-patterns in a modular way. This approach allows for efficient, automated design-flaw detection through incremental multi-pattern matching, by facilitating systematic information reuse among multiple detection rules as well as between subsequent detection runs on continuously evolving programs.

This site contains the source code of our tool implementation HULK which comprises well-known anti-patterns for Java programs, as well as the results of our experimental evaluation which show high detection precision, scalability to real-size programs, as well as a remarkable gain in efficiency due to information reuse.

Installation and Usage

Requirements:

  • Eclipse Modeling Tools (tested with Mars.2)
  • Eclipse plug-ins:
    • Xtext (available at the Eclipse Marketplace)
    • MoDisco (available at the Eclipse Modeling Components)
    • eMoflon (installation instructions at http://www.emoflon.org)
  • SourceMeter (https://www.sourcemeter.com/)

Installation:

  1. Download the HULK source from src
  2. Import HULK as Eclipse projects
  3. Launch a fresh Eclipse instance from the workspace containing the HULK projects
  4. Import source code of Java projects to be analysed into the freshly opened workspace
  5. Create an environment variable "SOURCE_METER_JAVA" pointing to the SourceMeterJava executable

Usage:

  1. Right-click on the project folder to be analysed -> Hulk -> Scan...
  2. In the pop-up window, choose anti-patterns and/or code smells to be detected
  3. After detection, results appear in a fresh pop-up window, where all the relecant symptoms and metrics can be explored

Evaluation

We evaluated HULK on an established corpus of 13 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:

All source codes can be found under test_data. Evaluation results can be found under evaluation_results.