Skip to content
Snippets Groups Projects
README.md 1.7 KiB
Newer Older
soniapku's avatar
soniapku committed
# CREC

## I. Introduction

This project is built to automatically recommend clones for refactoring, which leverages both the present status and the past evolution of clones. 

* This project is implemented for the research paper “Automatic Clone Recommendation for Refactoring Based on the Present and the Past” accepted by [ICSME 2018](https://icsme2018.github.io/).*

## II. Environment

* OS: GNU Linux (Tested on Ubuntu 14.04 LTS) 
* JDK: JDK1.8

## III. How to run

soniapku's avatar
soniapku committed
In the runnable folder, there is a shell scipt named as "runCREC.sh". It contains the following steps:

* Check necessary software to make sure you have installed git.
* Git clone a project repository from the Internet (git clone JFreeChart's repository by default).
* Get all historical commit IDs.
* Sample versions.
* Detect clones for sampled versions.
* Collect refactored clones.
* Extract features of refactored clones.

To collect refactored clones and extract features for other projects, please change the projectName and project repository settings in the script.

*CREC* was developed as an [Eclipse](http://www.eclipse.org/mars/) Java Project. If you want to view the source code, you can simply **import** the project into your workspace(in the code folder).
soniapku's avatar
soniapku committed

soniapku's avatar
soniapku committed
## IV.  Structure of the project
```powershell
soniapku's avatar
soniapku committed
  |--- README.md           :  user guidance
  |--- codes               :  source code
soniapku's avatar
soniapku committed
  |--- runnable            :  shell for preparation
soniapku's avatar
soniapku committed
  |--- features            :  features extracted by CREC
  |--- refactorInstances   :  refactor instances collected by CREC
  |--- unrefactorInstances :  not refactor instances collected by CREC
  |--- results             :  machine learning results in paper
soniapku's avatar
soniapku committed
<u> All suggestions are welcomed.</u>