-
Notifications
You must be signed in to change notification settings - Fork 2
/
create_clones_for_gptclonebench.py
39 lines (31 loc) · 1.15 KB
/
create_clones_for_gptclonebench.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from process_semanticclonebench import process_semanticbench_main
from cross_language_process import cross_language_main
from distinctive_run_nicad import run_nicad_main
import argparse
import click
def clone_creation():
print("We are going to create clone by utilizing GPT-3 and SemanticCloneBench")
str = """\nWhich type of clones you want to generate?
1. Semantic clone for same language
2. Cross Language clone
Select 1 or 2
"""
type = click.prompt(str, type=int)
while type not in [1, 2]:
type = click.prompt(str, type=int)
if type == 1:
config_location = click.prompt(
"\nGive the location of Semantic Clone Config file"
)
process_semanticbench_main(config_location)
run_config_location = click.prompt(
"\nGive the location of Config file to run NiCad on the generated clones"
)
run_nicad_main(run_config_location)
elif type == 2:
config_location = click.prompt(
"\nGive the location of Cross language Clone Config file"
)
cross_language_main(config_location)
if __name__ == "__main__":
clone_creation()