Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
big_clone_formater.hpp
Go to the documentation of this file.
1
11#pragma once
12
13#include <cassert>
14#include <iomanip>
15#include <iostream>
16#include <string>
17#include <tuple>
18
20#include <arkanjo/base/path.hpp>
22
24
25using namespace std;
26
36class BigCloneFormater : public CommandBase<BigCloneFormater> {
37 private:
38 Similarity_Table* similarity_table;
39
45 string format_relative_path(string relative_path);
46
52 string build_path_formated_string(Path path);
53
60 auto process_similar_path_pair(Path path1, Path path2, double similarity);
61
62 public:
64 "Format clone detection results into the BigCloneBench evaluation "
65 "output format. The command converts internal similarity data into "
66 "the standardized BigCloneEval compatible representation.")
67
68
74 explicit BigCloneFormater(Similarity_Table* _similarity_table);
75
76 bool validate(const ParsedOptions& options) override;
77
81 bool run(const ParsedOptions& options) override;
82};
Formats clone detection results for BigCloneBench evaluation.
COMMAND_DESCRIPTION("Format clone detection results into the BigCloneBench evaluation " "output format. The command converts internal similarity data into " "the standardized BigCloneEval compatible representation.") explicit BigCloneFormater(Similarity_Table *_similarity_table)
Constructs formatter and processes similarity table.
bool run(const ParsedOptions &options) override
Handles BigCloneEval formatting command.
bool validate(const ParsedOptions &options) override
Validate the arguments already analyzed.
const CliOption * options() const final
Path manipulation class for tool-specific directory structure.
Definition path.hpp:27
Represents a similarity graph between functions (paths).
Function abstraction for temporary codebase.
Path abstraction for temporary codebase.
Similarity relationships storage and analysis.