Mining implicit design templates for actionable code reuse

Yun Lin, Guozhu Meng, Yinxing Xue, Zhenchang Xing, Jun Sun, Xin Peng, Yang Liu, Wenyun Zhao, Jinsong Dong

    Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

    17 Citations (Scopus)

    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.

    Original languageEnglish
    Title of host publicationASE 2017 - Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering
    EditorsTien N. Nguyen, Grigore Rosu, Massimiliano Di Penta
    PublisherInstitute of Electrical and Electronics Engineers Inc.
    Pages394-404
    Number of pages11
    ISBN (Electronic)9781538626849
    DOIs
    Publication statusPublished - 20 Nov 2017
    Event32nd IEEE/ACM International Conference on Automated Software Engineering, ASE 2017 - Urbana-Champaign, United States
    Duration: 30 Oct 20173 Nov 2017

    Publication series

    NameASE 2017 - Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering

    Conference

    Conference32nd IEEE/ACM International Conference on Automated Software Engineering, ASE 2017
    Country/TerritoryUnited States
    CityUrbana-Champaign
    Period30/10/173/11/17

    Fingerprint

    Dive into the research topics of 'Mining implicit design templates for actionable code reuse'. Together they form a unique fingerprint.

    Cite this