32 std::string CLONE_LABELS_FILE_PATH =
"/home/luan/linux/test-duplication-code/parser/bigclonebench/clone_labels.txt";
33 std::string EXTENSION =
".java";
34 int NUMBER_OF_TYPES = 6;
35 int NOT_CLONE_TYPE_ID = 5;
36 std::string RECALL_PER_TYPE_PRINT =
"Recall Value of each type";
37 double MINIMUM_SIMILARITY_TEMP = 0;
40 std::vector<std::string> ID_TO_TYPE_LABEL = {
50 std::map<std::pair<int, int>,
int> id_pair_to_type;
51 std::vector<int> count_of_samples_by_type;
56 void read_clone_labels();
63 int path_to_id(
Path path);
69 std::vector<std::tuple<double, int, int>> similar_path_pairs_formated_with_id();
77 bool is_relevant_pair(
int id0,
int id1);
84 std::set<std::pair<int, int>> filter_similar_id_pairs_only_relevant_ones(
85 std::vector<std::pair<int, int>> similar_id_pairs);
93 std::vector<std::pair<int, int>> filter_similar_path_pairs_by_similarity(
94 std::vector<std::tuple<double, int, int>> similar_id_pairs,
95 double minimum_similarity);
102 std::vector<int> build_frequency_corrected_guessed_by_type(
103 std::vector<std::pair<int, int>> similar_id_pairs);
111 double calc_recall(std::vector<int> frequency,
int type);
117 void print_recall_per_type(std::vector<int> frequency);
123 void evaluate(
double minimum_similarity);
127 "Evaluate clone detection results using the BigCloneBench dataset "
128 "methodology. The command compares detected similarities against "
129 "ground truth labels and reports recall metrics per clone type.")
Evaluates clone detection using BigCloneBench methodology.
COMMAND_DESCRIPTION("Evaluate clone detection results using the BigCloneBench dataset " "methodology. The command compares detected similarities against " "ground truth labels and reports recall metrics per clone type.") explicit BigCloneTailorEvaluator(Similarity_Table *_similarity_table)
Constructs evaluator with similarity data.
bool validate(const ParsedOptions &options) override
Validate the arguments already analyzed.
bool run(const ParsedOptions &options) override
Handles BigCloneBench evaluation command.
const CliOption * options() const final
Represents a logical path to a function in the codebase.
Represents a similarity graph between functions (paths).
Logical path abstraction for source code elements.
Similarity relationships storage and analysis.