Lightweight, Semi-automated Enactment of Pragmatic-Reuse Plans

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.

[1]  Mira Mezini,et al.  Integrating independent components with on-demand remodularization , 2002, OOPSLA '02.

[2]  M. S. Feather,et al.  Reuse in the context of a transformation-based methodology , 1989 .

[3]  Charles W. Krueger,et al.  Software reuse , 1992, CSUR.

[4]  Mohamed G. Gouda,et al.  Adaptive Programming , 1991, IEEE Trans. Software Eng..

[5]  Daniel M. Yellin,et al.  Protocol specifications and component adaptors , 1997, TOPL.

[6]  Paul Bassett The theory and practice of adaptive reuse , 1997, SSR '97.

[7]  Ralph E. Johnson,et al.  Designing Reuseable Classes , 1988 .

[8]  Ted J. Biggerstaff,et al.  Concepts and models , 1989 .

[9]  Arun Sen,et al.  The Role of Opportunism in the Software Design Reuse Process , 1997, IEEE Trans. Software Eng..

[10]  Victor R. Basili,et al.  Identifying and qualifying reusable software components , 1991, Computer.

[11]  Robert J. Walker,et al.  Supporting the Investigation and Planning of Pragmatic Reuse Tasks , 2007, 29th International Conference on Software Engineering (ICSE'07).

[12]  John A. Mariani,et al.  Software reclamation , 1990, Softw. Eng. J..

[13]  David Garlan,et al.  Architectural Mismatch: Why Reuse Is So Hard , 1995, IEEE Softw..

[14]  J. M. Neighbors,et al.  Draco: a method for engineering reusable software systems , 1989 .

[15]  Daniel Jackson,et al.  Software analysis: a roadmap , 2000, ICSE '00.

[16]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[17]  Jacky Estublier,et al.  Reuse and variability in large software applications , 2005, ESEC/FSE-13.

[18]  Giuseppe Visaggio,et al.  Extracting Reusable Funtions by Flow Graph-Based Program Slicing , 1997, IEEE Trans. Software Eng..

[19]  Rubén Prieto-Díaz,et al.  Software reusability , 1993 .