Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
preprocessor.hpp
Go to the documentation of this file.
1
13#ifndef PREPROCESSOR_HPP
14#define PREPROCESSOR_HPP
15
16#include <string>
17#include <tuple>
18#include "parser.hpp"
19#include "function_breaker.hpp"
20#include "../base/config.hpp"
23using namespace std;
24
37 private:
38 // User interaction messages
39 string PROJECT_PATH_MESSAGE = "Enter your project path:";
40 string MINIMUM_SIMILARITY_MESSAGE = "Enter minimum similarity desired on using the tool:";
41 string CONFIG_PATH = "config.txt";
42 string PATH_MESSAGE = "path of the current preprocess: ";
43 string TIME_MESSAGE = "Finished time: ";
44
45 // Processing stage messages
46 string INITIAL_MESSAGE = "Initiating Preprocessing";
47 string BREAKER_MESSAGE = "Reading codebase... (this may take a while)";
48 string DUPLICATION_MESSAGE = "Finding duplication in the codebase... (this may take a while)";
49 string SAVING_MESSAGE = "Saving results...";
50 string END_MESSAGE = "Finished preprocessing";
51
52 // Duplication finder selection messages
53 string MESSAGE_DUPLICATION_FINDER_TYPE_1 = "Enter the number of the duplication finder technique you want to use:";
54 string MESSAGE_DUPLICATION_FINDER_TYPE_2 = "1) NLP text similarity using gensim";
55 string MESSAGE_DUPLICATION_FINDER_TYPE_3 = "2) Count proportion of equal lines using diff command";
56 string INVALID_CODE_DUPLICATION_FINDER = "Valid options are '1' or '2' only. Stopping Program...";
57
65 tuple<string,double,bool> read_parameters();
66
71 void save_current_run_params(string path);
72
79 void preprocess(string path, double similarity, bool use_duplication_finder_by_tool);
80
81 public:
86 Preprocessor(bool force_preprocess);
87
95 Preprocessor(bool force_preprocess, string path, double similarity);
96};
97
98#endif
Codebase preprocessing orchestrator.
Preprocessor(bool force_preprocess)
Constructs preprocessor with optional forcing.
Configuration management interface.
Code duplication preprocessing system.
Main duplication detection tool interface.
Main function extraction interface.
Definition json.hpp:5678
Code duplication results parser.