38 string CLONE_LABELS_FILE_PATH =
"/home/luan/linux/test-duplication-code/parser/bigclonebench/clone_labels.txt";
39 string EXTENSION =
".java";
40 int NUMBER_OF_TYPES = 6;
41 int NOT_CLONE_TYPE_ID = 5;
42 string RECALL_PER_TYPE_PRINT =
"Recall Value of each type";
43 double MINIMUM_SIMILARITY_TEMP = 0;
46 vector<string> ID_TO_TYPE_LABEL = {
56 map<pair<int, int>,
int> id_pair_to_type;
57 vector<int> count_of_samples_by_type;
62 void read_clone_labels();
69 int path_to_id(
Path path);
75 vector<tuple<double, int, int>> similar_path_pairs_formated_with_id();
83 bool is_relevant_pair(
int id0,
int id1);
90 set<pair<int, int>> filter_similar_id_pairs_only_relevant_ones(
91 vector<pair<int, int>> similar_id_pairs);
99 vector<pair<int, int>> filter_similar_path_pairs_by_similarity(
100 vector<tuple<double, int, int>> similar_id_pairs,
101 double minimum_similarity);
108 vector<int> build_frequency_corrected_guessed_by_type(
109 vector<pair<int, int>> similar_id_pairs);
117 double calc_recall(vector<int> frequency,
int type);
123 void print_recall_per_type(vector<int> frequency);
129 void evaluate(
double minimum_similarity);
133 "Evaluate clone detection results using the BigCloneBench dataset "
134 "methodology. The command compares detected similarities against "
135 "ground truth labels and reports recall metrics per clone type.")
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.