3void Counter_Duplication_Code::mark_path_as_processed(
Path path){
4 processed_paths.insert(path);
7bool Counter_Duplication_Code::is_path_processed_path(
Path path){
8 return processed_paths.find(path) != processed_paths.end();
11int Counter_Duplication_Code::get_number_of_lines_in_path(
Path path){
13 return function.number_of_lines();
16void Counter_Duplication_Code::register_code_duplication(
Path path1,
Path path2,
int number_of_lines){
21void Counter_Duplication_Code::process_path(
Path path){
22 if(is_path_processed_path(path)){
25 int number_of_lines = get_number_of_lines_in_path(path);
26 mark_path_as_processed(path);
28 for(
auto similar_path : similar_paths){
29 mark_path_as_processed(similar_path);
30 register_code_duplication(path, similar_path, number_of_lines);
34void Counter_Duplication_Code::process_every_path_in_similarity_table(){
36 for(
auto path : paths){
42 similarity_table = _similarity_table;
43 process_every_path_in_similarity_table();
void print_duplication_code_trie()
Prints the trie structure with duplication counts.
void add_folder_duplication_code(vector< string > folder_path, int number_of_duplication_lines)
Adds duplication count for a folder path.
Counter_Duplication_Code(Similarity_Table *_similarity_table)
Constructs analyzer with similarity data.
Represents a code function with its content and metadata.
Path manipulation class for tool-specific directory structure.
vector< string > get_common_folders(Path path)
Finds common folders with another path.
Manages and analyzes function similarity relationships.
vector< Path > get_path_list()
Gets list of all known paths.
vector< Path > get_similar_path_to_the_reference(Path reference)
Gets paths similar to reference path.
Code duplication reporting system.