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.
KeywordsPragmatic software reuse lightweight source code transformations
Unable to display preview. Download preview PDF.
- 5.Holmes, R., Walker, R.J.: Supporting the investigation and planning of pragmatic reuse tasks. In: Proceedings of the International Conference on Software Engineering, pp. 447–457 (2007)Google Scholar
- 6.Neighbors, J.M.: Draco: A method for engineering reusable software systems. In: Biggerstaff, T.J., Perlis, A.J. (eds.) Software Reusability. Concepts and Models of ACM Press Frontier. ACM Press Frontier, vol. 1, pp. 295–319. Addison–Wesley, Boston, United States (1989)Google Scholar
- 7.Bassett, P.G.: The theory and practice of adaptive reuse. In: Proceedings of the Symposium on Software Reusability, pp. 2–9 (1997)Google Scholar
- 8.Mezini, M., Ostermann, K.: Integrating independent components with on-demand remodularization. In: Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 52–67 (2002)Google Scholar
- 9.Estublier, J., Vega, G.: Reuse and variability in large software applications. In: Proceedings of the Foundations of Software Engineering, pp. 316–325 (2005)Google Scholar
- 10.Feather, M.S.: Reuse in the context of a transformation-based methodology. In: Biggerstaff, T.J., Perlis, A.J. (eds.) Software Reusability. Concepts and Models, vol. 1, pp. 337–359. Addison-Wesley, Reading (1989)Google Scholar
- 11.Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. In: Adapter design pattern, Addison-Wesley, Reading (1994)Google Scholar
- 14.Johnson, R.E., Foote, B.: Designing reuseable [sic] classes. Journal of Object-Oriented Programming 1(2), 22–35 (1988)Google Scholar
- 15.Jackson, D., Rinard, M.: Software analysis: a roadmap. In: Proceedings of the Conference on The Future of Software Engineering, pp. 133–145 (2000)Google Scholar