zhangxunhui 81abe9b497 | ||
---|---|---|
bin | ||
models | ||
sql_templates | ||
.flake8 | ||
.gitignore | ||
.isort.cfg | ||
.pre-commit-config.yaml | ||
BlobCommitRelationExtractor.py | ||
BlobExtractor.py | ||
BlobMethodExtractor.py | ||
CloneOperator.py | ||
CloneRelationFunctionExtractor.py | ||
CommitExtractor.py | ||
CommitRelationExtractor.py | ||
ConfigOperator.py | ||
FileOperator.py | ||
FunctionIdUpdater.py | ||
GitOperator.py | ||
GlobalConstants.py | ||
GraphExtractor.py | ||
MethodFunctionRelationExtractor.py | ||
MySQLOperator.py | ||
PointerOperator.py | ||
RCDMain.py | ||
README.md | ||
RepoExecutor.py | ||
RiskEvaluator.py | ||
TimeOperator.py | ||
config.template.yml | ||
deleteProject.py | ||
delete_handled_blobs.py | ||
delete_repos.example | ||
factorExtractor.py | ||
repos.example | ||
requirements.txt | ||
utils.py |
README.md
RCD: Risky Clone Detection
This is a project for finding factors related to bad clones.
Install environments:
- git:
- download git
- python:
- create python virtual environment based on Anaconda using command
conda create -n bad_clone python=3.7.11
. - activate the environment using command
conda activate bad_clone
- install dependent python packages using command
pip install -r requirements.txt
- create python virtual environment based on Anaconda using command
- Mysql:
- this project uses Mysql 8.0.30
- copy the configuration template and rename it using command
cp ./config.template.yml ./config.yml
- set the section of the config with the hints in the template
- Java
- To run the clone detector NIL, jdk 1.8+ is needed.
run the project
- Start collecting data for repositories by running the following commands:
git clone https://gitlink.org.cn/MillerEvan/bad_clone_prediction.git
cp repos.example repos # You need to add your own repositories in the repos file
conda activate bad_clone
python RCDMain.py
- Delete the data for specific repositories:
cp delete_repos.example delete_repos # You need to add your own repositories in the delete_repos file
python deleteProject.py