TY - GEN
T1 - Mining implicit design templates for actionable code reuse
AU - Lin, Yun
AU - Meng, Guozhu
AU - Xue, Yinxing
AU - Xing, Zhenchang
AU - Sun, Jun
AU - Peng, Xin
AU - Liu, Yang
AU - Zhao, Wenyun
AU - Dong, Jinsong
N1 - Publisher Copyright:
© 2017 IEEE.
PY - 2017/11/20
Y1 - 2017/11/20
N2 - In this paper, we propose an approach to detecting project-specific recurring designs in code base and abstracting them into design templates as reuse opportunities. The mined templates allow programmers to make further customization for generating new code. The generated code involves the code skeleton of recurring design as well as the semi-implemented code bodies annotated with comments to remind programmers of necessary modification. We implemented our approach as an Eclipse plugin called MICoDe. We evaluated our approach with a reuse simulation experiment and a user study involving 16 participants. The results of our simulation experiment on 10 open source Java projects show that, to create a new similar feature with a design template, (1) on average 69% of the elements in the template can be reused and (2) on average 60% code of the new feature can be adopted from the template. Our user study further shows that, compared to the participants adopting the copy-paste-modify strategy, the ones using MICoDe are more effective to understand a big design picture and more efficient to accomplish the code reuse task.
AB - In this paper, we propose an approach to detecting project-specific recurring designs in code base and abstracting them into design templates as reuse opportunities. The mined templates allow programmers to make further customization for generating new code. The generated code involves the code skeleton of recurring design as well as the semi-implemented code bodies annotated with comments to remind programmers of necessary modification. We implemented our approach as an Eclipse plugin called MICoDe. We evaluated our approach with a reuse simulation experiment and a user study involving 16 participants. The results of our simulation experiment on 10 open source Java projects show that, to create a new similar feature with a design template, (1) on average 69% of the elements in the template can be reused and (2) on average 60% code of the new feature can be adopted from the template. Our user study further shows that, compared to the participants adopting the copy-paste-modify strategy, the ones using MICoDe are more effective to understand a big design picture and more efficient to accomplish the code reuse task.
UR - http://www.scopus.com/inward/record.url?scp=85041435467&partnerID=8YFLogxK
U2 - 10.1109/ASE.2017.8115652
DO - 10.1109/ASE.2017.8115652
M3 - Conference contribution
T3 - ASE 2017 - Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering
SP - 394
EP - 404
BT - ASE 2017 - Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering
A2 - Nguyen, Tien N.
A2 - Rosu, Grigore
A2 - Di Penta, Massimiliano
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 32nd IEEE/ACM International Conference on Automated Software Engineering, ASE 2017
Y2 - 30 October 2017 through 3 November 2017
ER -