Lightweight, Semi-automated Enactment of Pragmatic-Reuse Plans

  • Authors:
  • Reid Holmes;Robert J. Walker

  • Affiliations:
  • Laboratory for Software Modification Research Department of Computer Science, University of Calgary, Calgary, Canada;Laboratory for Software Modification Research Department of Computer Science, University of Calgary, Calgary, Canada

  • Venue:
  • ICSR '08 Proceedings of the 10th international conference on Software Reuse: High Confidence Software Reuse in Large Systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reusing source code in a manner for which it has not been designed (which we term a pragmatic-reuse task) is traditionally regarded as poor practice. The unsystematic nature of these tasks increases the likelihood of a developer pursuing one that is infeasible or choosing not to pursue a feasible one. In previous work, we demonstrated that these risks can be mitigated by providing support to developers to help them systematically investigate and plan pragmatic-reuse tasks. But planning is only a small part of performing a pragmatic-reuse task; to enact a plan, the developer would have to manually extract the code they want to reuse and resolve any errors that arise from removing it from its originating system. This paper describes an approach that semi-automates the process of pragmatic-reuse plan enactment, automatically extracting the reused source code and resolving the majority of compilation errors for the developer through lightweight(i.e., computationally simple but analytically unsound) transformations. By reducing the number of low-level compilation issues (which are typically trivial but copious) that the developer must resolve, they are able to focus on the higher-level semantic and conceptual issues that are the main barrier to the successful completion of the reuse task. The efficacy of our approach to save developer effort is evaluated in a small-scale, controlled experiment on non-trivial pragmatic-reuse tasks. We find that our approach improves the likelihood of a pragmatic reuse task being successful, and decreases the time required to complete these tasks, as compared to a manual enactment approach.