User Tools

Site Tools


This is an old revision of the document!

The detection of design smells (i.e., occurrences of anti-patterns and of their code smells) can be simply done in batch, programmatically. There are two possible ways.

Standalone SmellDetectionCaller

The standalone SmellDetectionCaller can be found on GitHub or BitBucket.

The Eclipse Java project 0 - SmellDetectionCaller contains the Java, class, and JAR files needed to identify occurrences of code and design smells in Java source code, Java binary class-files, or C++ source code.

The class ptidej.sad.smelldetectioncaller.SmellDetectionCaller must be modified to change the path to a folder or a JAR file in which is located the code of the program to be analysed.

The remaining Eclipse Java projects are only used to regenerate the JAR files necessary to run the class ptidej.sad.smelldetectioncaller.SmellDetectionCaller. These JAR files are in the Ptidej.jar, which contains the bare minimum code from Ptidej, and the JAR files in Ptidej_lib, which contains all the JAR supporting Ptidej.

How to Build JAR Version

  1. Execute once /SmellDetectionCaller/src/ptidej/sad/smelldetectioncaller/ as launch configuration SmellDetectionCaller.
  2. Select /SmellDetectionCaller/src/ptidej/sad/smelldetectioncaller/
  3. Export as “Java/Runnable JAR file”
    1. Select as launch configuration SmellDetectionCaller.
    2. Select as export destination 0 - SmellDetectionCaller\Ptidej.jar.
    3. Select Copy required libraries into a sub-folder next to the generated JAR.
    4. Check Save as ANT script.
    5. Select as ANT script location \0 - SmellDetectionCaller\Generate JARs.xml.

Full Ptidej SmellDetectionCaller

smelldetectioncaller.1509973646.txt.gz · Last modified: 2019/10/06 20:37 (external edit)