36 string BETWEEN_RELATIVE_AND_FUNCTION_NAME =
"::";
37 string START_LINE_COMPARATION_PRINT =
"Functions find: ";
38 string BETWEEN_TWO_FUNCTION =
" AND ";
39 string NUMBER_LINES_MESSAGE =
" , TOTAL NUMBER LINES IN FUNCTIONS: ";
40 string INITIAL_TEXT_PRINT_1 =
"It was found a total of ";
41 string INITIAL_TEXT_PRINT_2 =
" pair of duplicate functions in the codebase. Which the first ";
42 string INITIAL_TEXT_PRINT_3 =
" can be found below.";
43 int INITIAL_PROCESSED_RESULTS = 0;
47 string pattern_to_match;
48 bool both_path_need_to_match_pattern;
49 int processed_results = INITIAL_PROCESSED_RESULTS;
62 int find_number_pairs_show(
int number_pair_found);
69 string format_initial_message(
int number_pair_found);
77 bool match_pattern(
Path path1,
Path path2);
84 string format_path_message_in_pair(
Path path);
91 int find_number_lines(
Path path1);
98 void print_similar_path_pair(
Path path1,
Path path2);
105 void process_similar_path_pair(
Path path1,
Path path2);
112 int find_number_pair_found(vector<pair<Path,Path>> similar_path_pairs);
119 vector<pair<Path,Path>> build_similar_path_pairs(
bool sorted_by_number_of_duplicated_code);
125 void explorer(
bool sorted_by_number_of_duplicated_code);
137 int _limit_on_results,
138 string _pattern_to_match,
139 bool _both_path_need_to_match,
140 bool sorted_by_number_of_duplicated_code=
false);
Similarity_Explorer(Similarity_Table *_similarity_table, int _limit_on_results, string _pattern_to_match, bool _both_path_need_to_match, bool sorted_by_number_of_duplicated_code=false)
Constructs explorer with configuration.