38 string BETWEEN_RELATIVE_AND_FUNCTION_NAME =
"::";
39 string START_LINE_COMPARATION_PRINT =
"Functions find: ";
40 string BETWEEN_TWO_FUNCTION =
" AND ";
41 string NUMBER_LINES_MESSAGE =
" , TOTAL NUMBER LINES IN FUNCTIONS: ";
42 string INITIAL_TEXT_PRINT_1 =
"It was found a total of ";
43 string INITIAL_TEXT_PRINT_2 =
" pair of duplicate functions in the codebase. Which the first ";
44 string INITIAL_TEXT_PRINT_3 =
" can be found below.";
45 int INITIAL_PROCESSED_RESULTS = 0;
49 string pattern_to_match;
50 bool both_path_need_to_match_pattern;
51 int processed_results = INITIAL_PROCESSED_RESULTS;
64 int find_number_pairs_show(
int number_pair_found);
71 string format_initial_message(
int number_pair_found);
79 bool match_pattern(
Path path1,
Path path2);
86 string format_path_message_in_pair(
Path path);
93 int find_number_lines(
Path path1);
100 void print_similar_path_pair(
Path path1,
Path path2);
107 void process_similar_path_pair(
Path path1,
Path path2);
114 int find_number_pair_found(vector<pair<Path,Path>> similar_path_pairs);
121 vector<pair<Path,Path>> build_similar_path_pairs(
bool sorted_by_number_of_duplicated_code);
127 void explorer(
bool sorted_by_number_of_duplicated_code);
139 int _limit_on_results,
140 string _pattern_to_match,
141 bool _both_path_need_to_match,
142 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.