31 std::set<Path> processed_paths;
39 void mark_path_as_processed(
Path path);
46 bool is_path_processed_path(
Path path);
53 static int get_number_of_lines_in_path(
const Path& path);
61 void register_code_duplication(
const Path& path1,
const Path& path2,
int number_of_lines);
67 void process_path(
const Path& path);
72 void process_every_path_in_similarity_table();
80 std::vector<std::string> common_folders(
const Path& path1,
const Path& path2)
const;
84 "Analyze and report duplicated lines across the codebase, grouped by "
85 "folder hierarchy. The command processes all detected duplications and "
86 "displays the total number of duplicated lines per directory.")
const CliOption * options() const final
Trie structure for hierarchical duplication counting.
Code duplication analyzer and reporter.
COMMAND_DESCRIPTION("Analyze and report duplicated lines across the codebase, grouped by " "folder hierarchy. The command processes all detected duplications and " "displays the total number of duplicated lines per directory.") explicit CounterDuplicationCode(Similarity_Table *_similarity_table)
Constructs analyzer with similarity data.
bool validate(const ParsedOptions &options) override
Validate the arguments already analyzed.
bool run(const ParsedOptions &options) override
Handles duplication analysis command.
Represents a logical path to a function in the codebase.
Represents a similarity graph between functions (paths).
Trie-based code duplication counter.
Logical path abstraction for source code elements.
Similarity relationships storage and analysis.