Rule-directed code clone synchronization

Xiao Cheng, Hao Zhong, Yuting Chen, Zhenjiang Hu, Jianjun Zhao

研究成果: 著書/レポートタイプへの貢献会議での発言

4 引用 (Scopus)

抄録

Code clones are prevalent in software systems due to many factors in software development. Detecting code clones and managing consistency between them along code evolution can be very useful for reducing clone-related bugs and maintenance costs. Despite some early attempts at detecting code clones and managing the consistency between them, the state-of-the-art tool can only handle simple code clones whose structures are identical or quite similar. However, existing empirical studies show that clones can have quite different structures with their evolution, which can easily go beyond the capability of the state-of-the-art tool. In this paper, we propose CCSync, a novel, rule-directed approach, which paves the structure differences between the code clones and synchronizes them even when code clones become quite different in their structures. The key steps of this approach are, given two code clones, to (1) extract a synchronization rule from the relationship between the clones, and (2) once one code fragment is updated, propagate the modifications to the other following the synchronization rule. We have implemented a tool for CCSync and evaluated its effectiveness on five Java projects. Our results shows that there are many code clones suitable for synchronization, and our tool achieves precisions of up to 92% and recalls of up to 84%. In particular, more than 76% of our generated revisions are identical with manual revisions.

元の言語英語
ホスト出版物のタイトルProceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016
出版者IEEE Computer Society
ISBN(電子版)9781509014286
DOI
出版物ステータス出版済み - 7 5 2016
イベント24th IEEE International Conference on Program Comprehension, ICPC 2016 - Austin, 米国
継続期間: 5 16 20165 17 2016

出版物シリーズ

名前IEEE International Conference on Program Comprehension
2016-July

その他

その他24th IEEE International Conference on Program Comprehension, ICPC 2016
米国
Austin
期間5/16/165/17/16

Fingerprint

Synchronization
Software engineering
Computer systems
Costs

All Science Journal Classification (ASJC) codes

  • Hardware and Architecture
  • Software

これを引用

Cheng, X., Zhong, H., Chen, Y., Hu, Z., & Zhao, J. (2016). Rule-directed code clone synchronization. : Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016 [7503722] (IEEE International Conference on Program Comprehension; 巻数 2016-July). IEEE Computer Society. https://doi.org/10.1109/ICPC.2016.7503722

Rule-directed code clone synchronization. / Cheng, Xiao; Zhong, Hao; Chen, Yuting; Hu, Zhenjiang; Zhao, Jianjun.

Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016. IEEE Computer Society, 2016. 7503722 (IEEE International Conference on Program Comprehension; 巻 2016-July).

研究成果: 著書/レポートタイプへの貢献会議での発言

Cheng, X, Zhong, H, Chen, Y, Hu, Z & Zhao, J 2016, Rule-directed code clone synchronization. : Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016., 7503722, IEEE International Conference on Program Comprehension, 巻. 2016-July, IEEE Computer Society, 24th IEEE International Conference on Program Comprehension, ICPC 2016, Austin, 米国, 5/16/16. https://doi.org/10.1109/ICPC.2016.7503722
Cheng X, Zhong H, Chen Y, Hu Z, Zhao J. Rule-directed code clone synchronization. : Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016. IEEE Computer Society. 2016. 7503722. (IEEE International Conference on Program Comprehension). https://doi.org/10.1109/ICPC.2016.7503722
Cheng, Xiao ; Zhong, Hao ; Chen, Yuting ; Hu, Zhenjiang ; Zhao, Jianjun. / Rule-directed code clone synchronization. Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016. IEEE Computer Society, 2016. (IEEE International Conference on Program Comprehension).
@inproceedings{ee1e5f732afe4ad0bc8660d51d7b836d,
title = "Rule-directed code clone synchronization",
abstract = "Code clones are prevalent in software systems due to many factors in software development. Detecting code clones and managing consistency between them along code evolution can be very useful for reducing clone-related bugs and maintenance costs. Despite some early attempts at detecting code clones and managing the consistency between them, the state-of-the-art tool can only handle simple code clones whose structures are identical or quite similar. However, existing empirical studies show that clones can have quite different structures with their evolution, which can easily go beyond the capability of the state-of-the-art tool. In this paper, we propose CCSync, a novel, rule-directed approach, which paves the structure differences between the code clones and synchronizes them even when code clones become quite different in their structures. The key steps of this approach are, given two code clones, to (1) extract a synchronization rule from the relationship between the clones, and (2) once one code fragment is updated, propagate the modifications to the other following the synchronization rule. We have implemented a tool for CCSync and evaluated its effectiveness on five Java projects. Our results shows that there are many code clones suitable for synchronization, and our tool achieves precisions of up to 92{\%} and recalls of up to 84{\%}. In particular, more than 76{\%} of our generated revisions are identical with manual revisions.",
author = "Xiao Cheng and Hao Zhong and Yuting Chen and Zhenjiang Hu and Jianjun Zhao",
year = "2016",
month = "7",
day = "5",
doi = "10.1109/ICPC.2016.7503722",
language = "English",
series = "IEEE International Conference on Program Comprehension",
publisher = "IEEE Computer Society",
booktitle = "Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016",
address = "United States",

}

TY - GEN

T1 - Rule-directed code clone synchronization

AU - Cheng, Xiao

AU - Zhong, Hao

AU - Chen, Yuting

AU - Hu, Zhenjiang

AU - Zhao, Jianjun

PY - 2016/7/5

Y1 - 2016/7/5

N2 - Code clones are prevalent in software systems due to many factors in software development. Detecting code clones and managing consistency between them along code evolution can be very useful for reducing clone-related bugs and maintenance costs. Despite some early attempts at detecting code clones and managing the consistency between them, the state-of-the-art tool can only handle simple code clones whose structures are identical or quite similar. However, existing empirical studies show that clones can have quite different structures with their evolution, which can easily go beyond the capability of the state-of-the-art tool. In this paper, we propose CCSync, a novel, rule-directed approach, which paves the structure differences between the code clones and synchronizes them even when code clones become quite different in their structures. The key steps of this approach are, given two code clones, to (1) extract a synchronization rule from the relationship between the clones, and (2) once one code fragment is updated, propagate the modifications to the other following the synchronization rule. We have implemented a tool for CCSync and evaluated its effectiveness on five Java projects. Our results shows that there are many code clones suitable for synchronization, and our tool achieves precisions of up to 92% and recalls of up to 84%. In particular, more than 76% of our generated revisions are identical with manual revisions.

AB - Code clones are prevalent in software systems due to many factors in software development. Detecting code clones and managing consistency between them along code evolution can be very useful for reducing clone-related bugs and maintenance costs. Despite some early attempts at detecting code clones and managing the consistency between them, the state-of-the-art tool can only handle simple code clones whose structures are identical or quite similar. However, existing empirical studies show that clones can have quite different structures with their evolution, which can easily go beyond the capability of the state-of-the-art tool. In this paper, we propose CCSync, a novel, rule-directed approach, which paves the structure differences between the code clones and synchronizes them even when code clones become quite different in their structures. The key steps of this approach are, given two code clones, to (1) extract a synchronization rule from the relationship between the clones, and (2) once one code fragment is updated, propagate the modifications to the other following the synchronization rule. We have implemented a tool for CCSync and evaluated its effectiveness on five Java projects. Our results shows that there are many code clones suitable for synchronization, and our tool achieves precisions of up to 92% and recalls of up to 84%. In particular, more than 76% of our generated revisions are identical with manual revisions.

UR - http://www.scopus.com/inward/record.url?scp=84979771503&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84979771503&partnerID=8YFLogxK

U2 - 10.1109/ICPC.2016.7503722

DO - 10.1109/ICPC.2016.7503722

M3 - Conference contribution

AN - SCOPUS:84979771503

T3 - IEEE International Conference on Program Comprehension

BT - Proceedings of the 24th IEEE International Conference on Program Comprehension, ICPC 2016 - co-located with ICSE 2016

PB - IEEE Computer Society

ER -