26namespace fs = std::filesystem;
41 static constexpr const char* TEMPLATE_COUNT =
42 "The total number of functions that are "
43 "similar to the found one is {count}. "
44 "More info about them are listed below.";
46 string PROJECT_PATH_MESSAGE =
"Enter your project path:";
47 string MINIMUM_SIMILARITY_MESSAGE =
"Enter minimum similarity desired on using the tool:";
50 string INITIAL_MESSAGE =
"Initiating Preprocessing";
51 string BREAKER_MESSAGE =
"Reading codebase... (this may take a while)";
52 string DUPLICATION_MESSAGE =
"Finding duplication in the codebase... (this may take a while)";
53 string SAVING_MESSAGE =
"Saving results...";
54 string END_MESSAGE =
"Finished preprocessing";
57 string MESSAGE_DUPLICATION_FINDER_TYPE_1 =
"Enter the number of the duplication finder technique you want to use:";
58 string MESSAGE_DUPLICATION_FINDER_TYPE_2 =
"1) NLP text similarity using gensim";
59 string MESSAGE_DUPLICATION_FINDER_TYPE_3 =
"2) Count proportion of equal lines using diff command";
60 string INVALID_CODE_DUPLICATION_FINDER =
"Valid options are '1' or '2' only. Stopping Program...";
69 tuple<string, double, bool> read_parameters();
77 void preprocess(
const fs::path& path,
double similarity,
bool use_duplication_finder_by_tool);
95 PreprocessorBuild(
bool force_preprocess,
const fs::path& path,
double similarity);
97 COMMAND_DESCRIPTION(
"Creates the foundation for fast query responses during the main operation phase.")
const CliOption * options() const final
Codebase preprocessing orchestrator.
bool validate(const ParsedOptions &options) override
Validate the arguments already analyzed.
bool run(const ParsedOptions &options) override
Executes the main logic of the command.
#define COMMAND_DESCRIPTION(str)
Configuration management interface.
Code duplication preprocessing system.
Main function extraction interface.
Code duplication results parser.