Sciweavers

SEKE
2005
Springer

An Empirical Study on Limits of Clone Unification Using Generics

13 years 10 months ago
An Empirical Study on Limits of Clone Unification Using Generics
Generics (templates) attempt to unify similar program structures to avoid redundancy. How well do generics serve this purpose in practice? We try to answer this question through empirical analysis from two case studies. First, we analyzed the Java Buffer library in which 68% of the code was redundant due to cloning. We were able to remove only 40% of the redundant code using the Java generics. Unification failed because the variations between cloned classes were either non-type parametric or non-parametric. To analyze whether this problem is specific to Java generics, we investigated the C++ Standard Template Library (STL), an exemplary application of C++ templates, as our second case study. Even though C++ templates are more powerful, we still found substantial cloning. We believe that we are dealing with a fundamental phenomenon that will cause many other class libraries and application programs to suffer from the code redundancy problem.
Hamid Abdul Basit, Damith C. Rajapakse, Stan Jarza
Added 28 Jun 2010
Updated 28 Jun 2010
Type Conference
Year 2005
Where SEKE
Authors Hamid Abdul Basit, Damith C. Rajapakse, Stan Jarzabek
Comments (0)