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:
the first step concern the creation of the dataset
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)
The source code is available on GitHub
These are lighter versions containing the .jar and the documentation:
- Java 8 or higher
Right now this is not enough, if you want to be sure that all the machine learning algorithms will run without any problem you need to install WEKA:
- Ubuntu: sudo apt-get install weka
- Other: https://www.cs.waikato.ac.nz/ml/weka/downloading.html
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
For every further information, please check out:
- The tutorial: wekanosetutorial.pdf
Video tutorial of WekaNose is available on YouTube:
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: email@example.com