3string Big_Clone_Formater::format_relative_path(
string relative_path){
4 for(
auto &c : relative_path){
12string Big_Clone_Formater::build_path_formated_string(
Path path){
14 relative_path = format_relative_path(relative_path);
17 auto [line_declaration,start_line,end_line] = function.get_scope_function_in_file();
27auto Big_Clone_Formater::process_similar_path_pair(
Path path1,
Path path2,
double similarity){
28 auto string_path1 = build_path_formated_string(path1);
29 auto string_path2 = build_path_formated_string(path2);
31 string comparation_string = string_path1 +
',' + string_path2 +
',';
32 cout << comparation_string;
33 cout << fixed << setprecision(2) << similarity <<
'\n';
38 for(
auto [similarity,path1,path2] : similar_paths){
39 process_similar_path_pair(path1,path2,similarity);
Represents a code function with its content and metadata.
Path manipulation class for tool-specific directory structure.
string build_relative_path()
Builds relative path portion.
Manages and analyzes function similarity relationships.
vector< tuple< double, Path, Path > > get_all_path_pairs_and_similarity_sorted_by_similarity()
Gets all similar path pairs with scores, sorted.
NLOHMANN_BASIC_JSON_TPL_DECLARATION std::string to_string(const NLOHMANN_BASIC_JSON_TPL &j)
user-defined to_string function for JSON values