WekaNose

Reference

Umberto Azadi, Francesca Arcelli Fontana, and Marco Zanoni. 2018. Machine learning based code smell detection through WekaNose. In Proceedings of the 40th International Conference on Software Engineering: Companion Proceedings (ICSE ’18). ACM, New York, NY, USA, 288-289. DOI: https://doi.org/10.1145/3183440.3194974 PDF Poster

WekaNose is a tool that allows to perform an experiment, that aims to study code smell detection through machine learning techniques. The experiment’s purpose is to select rules or obtain trained algorithms, that can classify an instance (method or class) as affected or not by a code smell. These rules have the main advantage that they are extracted through an example-based approach, rather than a heuristic-based one.

This experiment is divided into two main part:

  1. the first step concern the creation of the dataset
  2. the second one involves the training and the testing of the machine learning algorithms using the dataset created in the first part.

Furthermore, it is possible to use the trained machine learning algorithms to accomplish the detection through the WekaNose SonarQube plug-in. (For more info about it see the “SonarQube plug-in” tab below)

Download

Requirements

How to run

For run WekaNose you just need to type in the command line:

java -jar WekaNose.jar

N.B. Do NOT open the jar double-clicking on it, because the workspace’s path (./WekaNose/result) will be compromised

Documentation

For every further information, please check out:

Video Demo-Tutorial

Video tutorial of WekaNose is available on YouTube:

SonarQube plug-in

The WekaNose SonarQube plug-in can be used to accomplish the code smell detection using up to 20 machine learning algorithms trained using the WekaNose dataset format.

  • It is possible to download the plug-in by clicking here (for immediate download) or here (.zip file shared through google drive)
  • Tutorial (for installation and usage): wn_tutorial_sonarqube_plugin.pdf
  • The updated source code is available on GitHub

For any further information or if you need a custom version that accepts more then 20 machine learning algorithms, please contact: u.azadi@campus.unimib.it