|
Arkanjo 0.2
A tool for find code duplicated functions in codebases
|
Random pair selector for similar code segments. More...
#include <random_selector.hpp>
Inheritance diagram for RandomSelector:
Collaboration diagram for RandomSelector:Public Member Functions | |
| COMMAND_DESCRIPTION ("Select random pairs of functions within a specified similarity range. " "The provided MIN_SIMILARITY and MAX_SIMILARITY parameters define the " "inclusive similarity interval, and up to MAX_QUANTITY pairs are randomly " "selected and displayed.") explicit RandomSelector(Similarity_Table *_similarity_table) | |
| Constructs selector with configuration. | |
| bool | validate (const ParsedOptions &options) override |
| Validate the arguments already analyzed. | |
| bool | run (const ParsedOptions &options) override |
| Handles random selection command. | |
Public Member Functions inherited from CommandBase< RandomSelector > | |
| virtual void | print_help (const std::string command_name, const OptionsCollector *collector) const |
| const CliOption * | options () const final |
| bool | do_run (const std::string command_name, const ParsedOptions &options, const OptionsCollector *collector=nullptr) override |
Public Member Functions inherited from ICommand | |
| virtual | ~ICommand ()=default |
| virtual std::string_view | description () const =0 |
Static Public Attributes | |
| static constexpr CliOption | options_ [] |
Random pair selector for similar code segments.
Selects and displays random pairs of similar functions within configurable similarity thresholds, with formatted output and color-coded display options.
Definition at line 34 of file random_selector.hpp.
| RandomSelector::COMMAND_DESCRIPTION | ( | "Select random pairs of functions within a specified similarity range. " "The provided MIN_SIMILARITY and MAX_SIMILARITY parameters define the " "inclusive similarity | interval, |
| and up to MAX_QUANTITY pairs are randomly " "selected and displayed." | ) |
Constructs selector with configuration.
| _similarity_table | Source of similarity data |
| _minimum_similarity | Minimum similarity threshold (0-100) |
| _maximum_similarity | Maximum similarity threshold (0-100) |
| _maximum_quantity | Maximum number of pairs to select |
|
overridevirtual |
Handles random selection command.
Implements ICommand.
Definition at line 73 of file random_selector.cpp.
|
overridevirtual |
Validate the arguments already analyzed.
Verify that all required options have been selected and that the values provided are valid.
| options | The ParsedOptions structure will be populated with the arguments. |
Implements ICommand.
Definition at line 61 of file random_selector.cpp.
|
staticconstexpr |
Definition at line 73 of file random_selector.hpp.