-
Notifications
You must be signed in to change notification settings - Fork 1
Understanding the notation of DetectionResults files
Here we explain the notation of the DetectionResults files. This is useful when we use RefGen's Simulation Mode.
RefGen generates two **DetectionResults ** files, using the following naming convention:
Suppose that you execute RefGen in simulation mode with the following parameters, and which performs simulated refactoring using parameters in file config.prop
. See Simulation Mode.
java -jar RefGen.jar config.prop 0 jsoup
DetectionResults in number of run for antipattern type.ini
Where number of run is 0, and represent the second parameter (after the configuration file ) when executing RefGen.
This file is the anti-pattern's detection results before refactoring.
It also generates the file: DetectionResults in results-number of run for Blob This file contains the anti-pattern's detection results after refactoring.
Here we show an example of a DetectionResults file
In Line 5 we observe the first instance of Blob type detected. In line 7, we see observe two values joined by an equal sign ("="). The first part we see the number of instance, the percentage of accuracy , the name of the meta attribute (the anti-pattern's type); after "=" the value of the meta attribute (Blob).
Since RefGen is based on DECOR, anti-pattern's detection is based on rules defined for each type, which include metrics, association properties and code lexicon. For further information we refer you to DECOR's original publication.
In our particular example, the Blob was characterized by having a LargeClass, associated with a DataClass.
The qualified name of the large class is found in line 11 (org.jsoup.parser.HtmlTreeBuilder), while the DataClass' name is found line 16.
For LargeClass, DECOR consider all classes which the sum number of methods and attributes (NMD+NAD) is larger than the Max Bound of all classes obtained by using the Boxplot technique. For this example, the MaxBound is 63.5 (line 14), while the sum of methods and attributes of class org.jsoup.parser.HtmlTreeBuilder is 110.