Mining implicit design templates for actionable code reuse

Loading...
Thumbnail Image
File version

Accepted Manuscript (AM)

Author(s)
Lin, Yun
Meng, Guozhu
Xue, Yinxing
Xing, Zhenchang
Sun, Jun
Peng, Xin
Liu, Yang
Zhao, Wenyun
Dong, Jinsong
Griffith University Author(s)
Primary Supervisor
Other Supervisors
Editor(s)

Rosu, G

DiPenta, M

Nguyen, TN

Date
2017
Size
File type(s)
Location

Univ Illinois Urbana Champaign, Urbana Champaign, IL

License
Abstract

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.

Journal Title
Conference Title

PROCEEDINGS OF THE 2017 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE'17)

Book Title
Edition
Volume
Issue
Thesis Type
Degree Program
School
Publisher link
Patent number
Funder(s)
Grant identifier(s)
Rights Statement
Rights Statement

© 2017 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

Item Access Status
Note
Access the data
Related item(s)
Subject

Other information and computing sciences not elsewhere classified

Persistent link to this record
Citation