CLIONE is a code clone modification support bot.
CLIONE execution is triggered by Pull Requests, and it notifies inconsistently modified or newly added clone sets between the pull requests.
- Click here to register your GitHub account and repository to which you want to apply CLIONE.
- Create
.clione/config.tomlin your project. - Edit
config.tomlby refering Settings - Configuration is over. Let's create a pull request.
Due to my graduation, CLIONE is currently unavailable as a GitHub bot. If you are interested in CLIONE, prepare your own server and deploy CLIONE on yourself.
simirality is integer type, and others are string type.
Simple example is here.
| Name | Description | Default value |
|---|---|---|
| src | Relative path of source directory. ex: src/main/java |
src |
| lang | Programming language. Following languages are selectable.java, kotlin,python, cpp |
java |
| clone_detector | Clone Detector. Following detectors are selectable. Parentheses are the supported languages.NiCad(java, python, cpp),SourcererCC(java, kotlin, python, cpp) |
NiCad |
| granularity | Granularity of clones. Followings are selectable.method,block |
block |
| similarity | Similarity of clones. If you enter an integer d between 0 and 10, the clones are detected with a similarity of 10*d%. | 8 |
You can build your own CLIONE server.
- Setting your GitHub Apps (see https://developer.github.com/apps/).
- Download Txl and NiCad clone detector from here and install them (if you use them).
git clone git@github.com:T45K/CLIONE- Fill in
src/main/resources/github.properties,src/main/resources/verify.propertiesandsrc/main/resources/resource.properties. ./gradlew run(default port is3000).
You can also use CLIONE as a stand alone tool to detect modification-target clones from past pull requests.
- Download
TXLandNiCadclone detector from here and install them (if you use them). git clone git@github.com:T45K/CLIONE- Fill in
src/main/resources/resource.propertiesandsrc/main/resources/stand_alone.properties.
Settings(src, lang, etc.,) should be described instand_alone.properties. ./gradlre standalone -Pargs = "user(or organization)_name/repo_name"
CLIONEはコードクローン修正支援ボットです.
プルリクエスト作成時に,プルリクエスト内で行われた変更の前後で,一貫修正されていないクローンセットや,新しく追加されたクローンセットを通知します.
- こちら からGitHubアカウントと適用したいリポジトリを登録してください.
- CLIONEを利用したいプロジェクトに内に
.clione/config.tomlファイルを作成してください. - 設定を参考に
config.tomlを編集してください. - 設定は以上です.あとはプルリクエストを作成してみてください.
開発者の卒業に伴い,現在上記の方法でCLIONEを使うことはできません. CLIONEを利用したい場合,下記の「サーバとして使う」を参考にして自身のサーバを用意してください.
similarityは整数型,それ以外は文字列型で記述してください.
tomlの例はこちら
| 名前 | 説明 | デフォルト値 |
|---|---|---|
| src | ソースファイルを含むディレクトリへの相対パス 例: src/main/java |
src |
| lang | プログラミング言語.以下を選択できます.java, kotlin, python, cpp |
java |
| clone_detector | クローン検出器.以下を選択できます.カッコ内は対応言語です.NiCad(java, python, cpp),SourcererCC(java, kotlin, python, cpp) |
NiCad |
| granularity | 検出するクローンの粒度.以下を選択できます.method,block |
block |
| similarity | 検出するクローンの類似度.0~10までの整数値dを入力すると,10*d%の類似度でクローンを検出します. | 8 |
自身のサーバを立ててCLIONEを使えます
- https://developer.github.com/apps/ を参考にして,GitHub Appsを作成してください
- NiCadを使いたい場合,ここからTxlとNiCadをインストールしてください
- このリポジトリをクローンして,
src/main/resources/github.properties,src/main/resources/verify.properties,src/main/resources/resource.propertiesに必要な情報を記載してください ./gradlew run(デフォルトポートは3000です)
CLIONEは単体ツールとしても利用できます. 過去のプルリクから対象のクローンを検出します.
- NiCadを使いたい場合,ここからTxlとNiCadをインストールしてください
- このリポジトリをクローンして,
src/main/resources/stand_alone.properties,src/main/resources/resource.propertiesに必要な情報を記載してください.
また,stand_alone.propertiesにsrcやlangなどの設定を記載してください ./gradlew standalone -Pargs = "user(or organization)_name/repo_name"
@inproceedings{clione,
title = {CLIONE: Clone Modification Support for Pull Request Based Development},
author = {Tasuku Nakagawa and Yoshiki Higo and Shinji Kusumoto},
booktitle = {the 27th Asia-Pacific Software Engineering Conference (APSEC)},
pages = {455-459},
month = {12},
year = {2020},
}
The paper is published here.
