Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
duplication_finder_diff.hpp
Go to the documentation of this file.
1
13#pragma once
14
16#include <string>
17#include <tuple>
18#include <vector>
19#include <filesystem>
20using namespace std;
21namespace fs = std::filesystem;
22
31 private:
32 string SAVING_MESSAGE = "Saving results...";
33
34 fs::path base_path;
35 double similarity;
36
42 vector<string> find_files(const fs::path& folder_path);
43
49 bool is_empty_line(string line);
50
56 vector<string> remove_blank_lines(vector<string> content);
57
64 bool is_equal_files(vector<string> content1, vector<string> content2);
65
72 double find_similarity(string path1, string path2);
73
79 vector<tuple<double, string, string>> find_similar_pairs(vector<string>& file_paths);
80
85 void save_duplications(vector<tuple<double, string, string>>& file_duplication_pairs);
86
87 public:
93 DuplicationFinderDiff(const fs::path& base_path_, double similarity_);
94
98 void execute();
99};
Code duplication preprocessor.
void execute()
Executes the preprocessing pipeline.
DuplicationFinderDiff(const fs::path &base_path_, double similarity_)
Constructs preprocessor with configuration.
Defines utility functions used across all files.